Skip to content

Fix: Correctly mention bot accounts in release notes#1376

Merged
jetersen merged 3 commits into
release-drafter:masterfrom
jamietanna:feature/bot-accounts
Jan 19, 2025
Merged

Fix: Correctly mention bot accounts in release notes#1376
jetersen merged 3 commits into
release-drafter:masterfrom
jamietanna:feature/bot-accounts

Conversation

@jamietanna

@jamietanna jamietanna commented Jan 3, 2024

Copy link
Copy Markdown
Contributor

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

@CFenner CFenner left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍

Comment thread lib/releases.js
Comment thread lib/releases.js
Comment thread lib/releases.js
@jamietanna

Copy link
Copy Markdown
Contributor Author

Thank you 🙇

@jetersen jetersen merged commit d6eceac into release-drafter:master Jan 19, 2025
@jetersen jetersen added the type: bug Something isn't working label Jan 19, 2025
@jetersen

Copy link
Copy Markdown
Member

@jamietanna Thank you for the contribution 👏

christopherklint97 pushed a commit to christopherklint97/release-drafter that referenced this pull request Mar 7, 2026
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