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
Auto approve any pull request with the pull-request-number input #186
Merged
Merged
Changes from 6 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
1b5fe29
Update action metadata file
roryabraham 991aa97
Make action support pull-request-number input
roryabraham 63d73a5
Add test
roryabraham fc1366a
Update README instructions
roryabraham 628d28e
Commit changes to package.json after npm i
roryabraham b847b9c
Fix typo in README
roryabraham 2cee7f5
Update README to use workflow_dispatch inputs
roryabraham c1c1b4b
Allow prNumber to be undefined
roryabraham 7d3852f
Remove unnecessary 0s from tests
roryabraham 338288b
Revert changes to package.json
roryabraham 4e95c60
Rebuild action
roryabraham b88613a
Provide radix parameter for parseInt
roryabraham f3d0ebc
Rebuild action
roryabraham 1d9eaca
Merge branch 'v2' into Rory-AutoApproveAnyPullRequest
roryabraham d99be49
Fix conditional in main.ts
roryabraham 6bb4a3d
Rebuild action
roryabraham File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
To avoid the hard-coded example number, perhaps this snippet could use
workflow_dispatch
inputs so we could change this to a dynamic value.Alternatively, if you're looking to run this workflow after another Actions workflow that generates a pull request,
workflow_run
might be the trigger you're looking for?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.
Done!
Thanks for the suggestion! Actually, I currently have my
automerge
workflow happening in response to thepull_request
event, and it is successfully triggered after the workflow that generates a pull request. In case you're wondering why I submitted this PR, I am effectively trying to make a "subroutine" that:And I want that to happen all in one workflow, so that I can use https://github.com/softprops/turnstyle to prevent race conditions and merge conflicts. I'll use that subroutine in concert with https://github.com/convictional/trigger-workflow-and-wait to synchronously create a new version from any workflow that needs to do that. I'm hopeful that this will DRY up my workflows and simplify the handling of race conditions 😁