Feature: Comment on released PRs and issues - #25
Conversation
|
@ayshiff is attempting to deploy a commit to the Changesets Team on Vercel. A member of the Team first needs to authorize it. |
emmatown
left a comment
There was a problem hiding this comment.
I think this behaviour might be nice but it has a couple problems
- By doing on the
release.published, this will create a comment per package release rather than repo release which means it would comment on the same issues and PRs when multiple packages are released(which is the vast majority of the time) - Some people might(like myself) might be annoyed by being spammed on a bunch of closed issues and PRs whenever a release happens
- With all these requests, I would be afraid of the bot being rate limited
With all that in mind, I think a better place for this code would be https://github.com/changesets/action where we can easily make it configurable(it should be opt-in for now) and only leave one comment per whole repo release rather than GH release.
Alright I understand 👍 |
Closes #511
This PR adds a new feature that allows the bot to comment on PRs and issues that have been released.
My work is inspired by what semantic-release/github has done.
Here is a schema showing the workflow to retrieve the released Pull Requests and Issues.
Comment message
Here is a comment message example:
🦋 This work has been released in release version: v0.4.3
Release link: https://github.com/backstage/backstage/releases/tag/v0.4.3
Note that the message is the same for PRs and issues.
It might be interesting to have two different messages for the different cases?
Example
I also created a codesanbox where you can see the logic to get the issues and pull-requests associated to a release more easily.
NOTE: In the codesanbox, considering that the code does not run at the time the release is created, we will get more recent commits. This will not happen in the dropbot project.
Notes
I couldn't find a better way to find the tag associated to the release than looking through the tags until I found the tag corresponding to the release. Knowing that the service is paginated, I added the fetch logic with the
while.