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
6 changes: 5 additions & 1 deletion .github/workflows/develop-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ jobs:
- name: "Auto-merge Pull Request"
if: (steps.check_merge_source.outputs.latest_from_develop == 'true' || steps.check_merge_source.outputs.latest_from_develop == 'not_merge') && inputs.auto_merge != false
run: |
gh pr merge "${{ steps.create_pr.outputs.URL }}" -t "chore(ci): Auto update develop to match main [skip ci]" -b "This was done automatically by the CI pipeline" --merge
# Approve PR
gh pr review "${{ steps.create_pr.outputs.URL }}" --approve --body "Auto-approved by CI for merging develop update."
Comment on lines +186 to +187
Copy link

Copilot AI Nov 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This approval step will fail. The default GITHUB_TOKEN cannot be used to approve pull requests that were created by the same token, as this is a GitHub Actions security restriction. You'll need to use a different authentication method, such as a GitHub App token or a personal access token (PAT) with appropriate permissions.

Consider using a GitHub App or storing a PAT in secrets and using it for the approval step:

gh pr review "${{ steps.create_pr.outputs.URL }}" --approve --body "Auto-approved by CI for merging develop update."
env:
  GITHUB_TOKEN: ${{ secrets.APPROVER_TOKEN }}

Copilot uses AI. Check for mistakes.

# Merge PR
gh pr merge "${{ steps.create_pr.outputs.URL }}" -t "chore(ci): Auto update develop to match main [skip ci]" -b "This was done automatically by the CI pipeline" --merge --auto
Copy link

Copilot AI Nov 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The --auto flag changes the merge behavior from immediately merging the PR to enabling auto-merge, which requires branch protection rules with required status checks or approvals. If branch protection is not configured with auto-merge enabled, this command will fail.

If you intend to merge immediately (as the original code did), remove the --auto flag. If you want to enable auto-merge and wait for conditions to be met, ensure your repository has the appropriate branch protection rules configured for the develop branch.

For immediate merge (original behavior):

gh pr merge "${{ steps.create_pr.outputs.URL }}" -t "chore(ci): Auto update develop to match main [skip ci]" -b "This was done automatically by the CI pipeline" --merge
Suggested change
gh pr merge "${{ steps.create_pr.outputs.URL }}" -t "chore(ci): Auto update develop to match main [skip ci]" -b "This was done automatically by the CI pipeline" --merge --auto
gh pr merge "${{ steps.create_pr.outputs.URL }}" -t "chore(ci): Auto update develop to match main [skip ci]" -b "This was done automatically by the CI pipeline" --merge

Copilot uses AI. Check for mistakes.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading