Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/enum-auto-updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,12 @@ jobs:
echo "ERROR: Cannot find module directory for $module"
continue
fi


# Branch name for the module
branchName="enum-update/${moduleName#aws-}"

# Check for existing PR with the same name
prExists=$(gh pr list --state open --search "chore(${moduleName#aws-}): add new enum values for ${moduleName#aws-}" --json number,title -q '.[].number')
prExists=$(gh pr list --state open --head ${branchName} --base main --json number,title -q '.[].number')

# If a PR exists, close it
if [[ -n "$prExists" ]]; then
Expand All @@ -92,7 +95,6 @@ jobs:
fi

# Create/switch to branch for the module
branchName="enum-update/${moduleName#aws-}"
echo "Creating/switching to branch: $branchName"
git checkout -B "$branchName" $original_branch # -B forces branch creation/reset

Expand Down
Loading