Skip to content

Render automated bot actors as plain text in publish emails - #9575

Merged
kevmoo merged 1 commit into
mainfrom
bot-actor-publish-email
Sep 15, 2026
Merged

kevmoo merged 1 commit into
mainfrom
bot-actor-publish-email

Conversation

@kevmoo

@kevmoo kevmoo commented Sep 9, 2026

Copy link
Copy Markdown
Member

When packages are published via automated GitHub Actions OIDC authentication, automated bots such as github-actions[bot] do not have standard user profiles at github.com/<actor>. Generating profile links for them produces broken URLs like https://github.com/github-actions%5Bbot%5D which return 404.

  • Update githubUserUrl in app/lib/shared/urls.dart to return null for bot identities (e.g. [bot] suffix) or invalid usernames.
  • Update createPackageUploadedEmail in app/lib/service/email/email_templates.dart to display unlinked @actor in plain text and HTML emails when actorUri is null.
  • Add unit tests in urls_test.dart and email_templates_test.dart.

When packages are published via automated GitHub Actions OIDC authentication, automated bots such as `github-actions[bot]` do not have standard user profiles at `github.com/<actor>`. Generating profile links for them produces broken URLs like `https://github.com/github-actions%5Bbot%5D` which return 404.

* Update `githubUserUrl` in `app/lib/shared/urls.dart` to return `null` for bot identities (e.g. `[bot]` suffix) or invalid usernames.
* Update `createPackageUploadedEmail` in `app/lib/service/email/email_templates.dart` to display unlinked `@actor` in plain text and HTML emails when `actorUri` is `null`.
* Add unit tests in `urls_test.dart` and `email_templates_test.dart`.
@kevmoo
kevmoo requested a review from isoos September 9, 2026 23:15
@kevmoo

kevmoo commented Sep 9, 2026

Copy link
Copy Markdown
Member Author

Follow-up to #9558 (commit b9c64c0).

When packages are published via automated GitHub Actions workflows, the OIDC actor is often github-actions[bot], which resulted in linking to https://github.com/github-actions%5Bbot%5D (404). This PR updates the logic to render bot actors as plain text without broken profile links.

@kevmoo
kevmoo merged commit d496de5 into main Sep 15, 2026
40 checks passed
@kevmoo
kevmoo deleted the bot-actor-publish-email branch September 15, 2026 15:37
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.

2 participants