-
Notifications
You must be signed in to change notification settings - Fork 0
Add auto-approval before merging PR for develop updates #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -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." | ||||||
|
|
||||||
| # 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 | ||||||
|
||||||
| 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 |
There was a problem hiding this comment.
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_TOKENcannot 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: