Skip to content

Feature: Comment on released PRs and issues - #25

Closed
ayshiff wants to merge 2 commits into
changesets:masterfrom
ayshiff:feature/release-comment
Closed

Feature: Comment on released PRs and issues#25
ayshiff wants to merge 2 commits into
changesets:masterfrom
ayshiff:feature/release-comment

Conversation

@ayshiff

@ayshiff ayshiff commented Mar 22, 2021

Copy link
Copy Markdown

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.

@vercel

vercel Bot commented Mar 22, 2021

Copy link
Copy Markdown

@ayshiff is attempting to deploy a commit to the Changesets Team on Vercel.

A member of the Team first needs to authorize it.

@emmatown emmatown left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ayshiff

ayshiff commented Mar 22, 2021

Copy link
Copy Markdown
Author

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 👍
I'll close this PR and open one against changesets/action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature] Comment on issues when packages are released

2 participants