Skip to content
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

Fix: Correctly mention bot accounts in release notes #1376

Merged
merged 3 commits into from
Jan 19, 2025

Conversation

jamietanna
Copy link
Contributor

@jamietanna jamietanna commented Jan 3, 2024

As noted in #60, bot accounts are currently being mis-mentioned, where
instead of linking through to dependabot[bot] it'll tag a user
@dependabot which isn't the same, and can result in unwanted
notifications.

To address this, we can retrieve the type of user that has authored a
Pull Request, looking at the __typename to determine if it's a Bot
or a User account, and provide a Markdown link to the Bot account's
app page.

Unfortunately this may result in a name such as:

@dependabot[bot]

But this is a better result than tagging the wrong account.

Closes #60.

@jamietanna jamietanna changed the title Don't @-mention bot accounts Fix: Don't @-mention bot accounts Jan 3, 2024
@jamietanna jamietanna changed the title Fix: Don't @-mention bot accounts Fix: Correctly mention bot accounts in release notes Jan 3, 2024
As noted in release-drafter#60, bot accounts are currently being mis-mentioned, where
instead of linking through to `dependabot[bot]` it'll tag a user
`@dependabot` which isn't the same, and can result in unwanted
notifications.

To address this, we can retrieve the type of user that has authored a
Pull Request, looking at the `__typename` to determine if it's a `Bot`
or a `User` account, and provide a Markdown link to the Bot account's
app page.

Unfortunately this may result in a name such as:

    @[dependabot[bot]](https://github.com/apps/dependabot)

But this is a better result than tagging the wrong account.

Closes release-drafter#60.
@jamietanna jamietanna force-pushed the feature/bot-accounts branch from 8dff34a to 8b04f12 Compare January 3, 2024 13:45
@jamietanna jamietanna marked this pull request as ready for review January 3, 2024 13:45
Copy link

@CFenner CFenner left a comment

Choose a reason for hiding this comment

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

👍

Verified

This commit was signed with the committer’s verified signature.
jetersen Joseph Petersen
@jamietanna
Copy link
Contributor Author

Thank you 🙇

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@jetersen jetersen merged commit d6eceac into release-drafter:master Jan 19, 2025
2 checks passed
@jetersen jetersen added the type: bug Something isn't working label Jan 19, 2025
@jetersen
Copy link
Member

@jamietanna Thank you for the contribution 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bot users don’t render quite right
4 participants