-
Notifications
You must be signed in to change notification settings - Fork 2
misc: auto notify when issue is fixed #152
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
base: main
Are you sure you want to change the base?
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.
Looking better, only minor nits/questions left.
| if ! gh issue comment "$issue_number" --body "A change related to this issue was included in release: $CURRENT_TAG"; then | ||
| echo "::error::Failed to comment on issue #$issue_number" | ||
| exit 1 | ||
| fi |
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.
Suggestion: Does Markdown work in the --body argument? If so, it'd be nice to link readers to the release itself:
gh issue comment "$issue_number" --body "A change related to this issue was included in [release **$CURRENT_TAG**](https://github.com/${{ github.repository }}/releases/tag/$CURRENT_TAG)."| while read -r issue_number; do | ||
| if [ -n "$issue_number" ]; then | ||
| echo "Commenting on issue #$issue_number" | ||
| if ! gh issue comment "$issue_number" --body "A change related to this issue was included in [release **$CURRENT_TAG**](https://github.com/${{ github.repository }}/releases/tag/$CURRENT_TAG)."; then |
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.
Nice! I was taking a look at your example and I don't know how often this will be necessary; when a lot of changes are being released related to an issue, it will be hard to tell what change each comment is talking about.
Suggestion: It would be nice to include the pull request from each change
| while read -r issue_number; do | ||
| if [ -n "$issue_number" ]; then | ||
| echo "Commenting on issue #$issue_number" | ||
| if ! gh issue comment "$issue_number" --body "A change related to this issue was included in [release **$CURRENT_TAG**](https://github.com/${{ github.repository }}/releases/tag/$CURRENT_TAG)."; then |
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.
suggestion: I don't think we need the word "release" here, just $CURRENT_TAG should be fine?
A change related to this issue was included in v1.5.64
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.
Rather than checking the PR body for GitHub issue links, I was hoping we could be more intentional with these comments by using changelog entries. I think the current implementation will be much noisier than it needs to be
| for issue in $PR_ISSUES; do | ||
| if [ -n "$issue" ]; then | ||
| echo "Commenting on issue #$issue" | ||
| if ! gh issue comment "$issue" --body "A [change](https://github.com/${{ github.repository }}/pull/$pr_number) related to this issue was included in [**$CURRENT_TAG**](https://github.com/${{ github.repository }}/releases/tag/$CURRENT_TAG)."; then |
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'm seeing a test that looks like this:
A aws/aws-sdk-kotlin#1710 related to this issue was included in v1.5.64.
(no "change"). It looks correct here, so I just want to confirm you fixed it after that test ran?
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.
yes, thats being fix [change](https://github.com/${{ github.repository }}/pull/$pr_number)
Issue #
Description of changes
Add a GitHub Action that automatically comments on issues referenced in PRs merged since the last release.
Test pr: aws/aws-sdk-kotlin#1711
Test issue: aws/aws-sdk-kotlin#1714 (comment)
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.