From what I can tell, this is already available in the code, so it should hopefully be fairly easy to return it as an output.
|
pull_request_number = create_pull_request( |
How to specify that an Action has outputs: https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#outputs-for-docker-container-and-javascript-actions
End-to-end example including how to set the output: https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action
Use case: I have a process that needs to run on the PR that was created by this action. Right now I do:
prnumber=$(gh search prs --repo ${{ github.repository }} --state open --match title "$PR_TITLE" --json number --jq '.[].number')
... which works but is kinda janky. It'd be great if this action would just return the number of the PR that was created so I wouldn't have to do this extra step.
From what I can tell, this is already available in the code, so it should hopefully be fairly easy to return it as an output.
github-actions-version-updater/src/main.py
Line 79 in a7fd643
How to specify that an Action has outputs: https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#outputs-for-docker-container-and-javascript-actions
End-to-end example including how to set the output: https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action
Use case: I have a process that needs to run on the PR that was created by this action. Right now I do:
prnumber=$(gh search prs --repo ${{ github.repository }} --state open --match title "$PR_TITLE" --json number --jq '.[].number')... which works but is kinda janky. It'd be great if this action would just return the number of the PR that was created so I wouldn't have to do this extra step.