-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add created_pull_numbers
output
#404
Conversation
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.
Thanks for the excellent contribution, @GuyAv46 🙌 I like the idea of outputting data about the created pull request numbers.
In the future, users may request a key-value pair mapping between targets and the corresponding created pull request. But, I also see the usefulness of space delimiting the pull request numbers, which makes it easy to use in successive run steps. Like you do here:
# Draft and then undraft the pull requests to trigger CI
run: |
for pr in ${{ steps.backport.outputs.successful_prs }}; do
gh pr ready $pr --undo
gh pr ready $pr
done
Rather than complicating how to retrieve the set of values in your use case, such a key-value pair mapping could be added as an additional output later. So, let's go for your suggested approach!
I'll make some small adjustments, e.g. the naming of the output, and then merge this.
README.md
Outdated
@@ -252,3 +252,4 @@ Output | Description | |||
-------|------------ | |||
`was_successful` | Whether or not the changes could be backported successfully to all targets. Either `true` or `false`. | |||
`was_successful_by_target` | Whether or not the changes could be backported successfully to all targets - broken down by target. Follows the pattern `{{label}}=true\|false`. | |||
`successful_prs` | Space separated list of the newly created PRs. |
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.
I'd like to rename this to created_pull_numbers
to allow further expansion of the number of outputs that may have some overlap with this one, e.g. an output that provides more data about the created pull requests or an output that provides data about the created issues.
This describes the output in more detail for clarification and allows expansion through created_issues, created_pulls, etc.
I decided to try my luck with JavaScript and implement the idea I suggested in #403
Feel free to suggest other options