Skip to content

Include GitHub Actions repository, commit, and run links in publish emails - #9558

Open
kevmoo wants to merge 5 commits into
masterfrom
github-actions-commit-link
Open

Include GitHub Actions repository, commit, and run links in publish emails#9558
kevmoo wants to merge 5 commits into
masterfrom
github-actions-commit-link

Conversation

@kevmoo

@kevmoo kevmoo commented Aug 28, 2026

Copy link
Copy Markdown
Member

When packages are published via automated GitHub Actions OIDC authentication, include actionable repository, git ref/tag, commit, workflow run, and actor links in maintainer notification emails.

  • Add Uri-based GitHub URL helpers (githubRepositoryUrl, githubCommitUrl, githubWorkflowRunUrl, githubRefUrl, githubUserUrl) in app/lib/shared/urls.dart.
  • Update createPackageUploadedEmail to format GitHub Actions repository, git ref/tag, commit, run, and actor details in both plain text and HTML emails.
  • Pass GitHub Actions metadata from agent.payload in PackageBackend._performTarballUpload.
  • Link commit revision hash in audit log summaries.
  • Add and update unit test coverage across affected components.

kevmoo added 2 commits August 28, 2026 20:05
…mails

When packages are published via automated GitHub Actions OIDC authentication, include actionable repository, commit, and workflow run links in maintainer notification emails.

* Add Uri-based GitHub URL helpers (githubRepositoryUrl, githubCommitUrl, githubWorkflowRunUrl) in app/lib/shared/urls.dart.
* Update createPackageUploadedEmail to format GitHub Actions repository, commit, and run details in both plain text and HTML emails.
* Pass GitHub Actions metadata from agent.payload in PackageBackend._performTarballUpload.
* Link commit revision hash in audit log summaries.
* Add and update unit test coverage across affected components.
…andling

* Extract ghPayload in PackageBackend._performTarballUpload to avoid repeating type checks.
* Promote local variables commitSha and runId in createPackageUploadedEmail to eliminate force unwraps.
* Add unit test coverage for package upload notifications without commit sha.
@kevmoo
kevmoo marked this pull request as ready for review August 28, 2026 20:21
@kevmoo

kevmoo commented Aug 28, 2026

Copy link
Copy Markdown
Member Author
image

we can do better than this!

kevmoo and others added 2 commits August 28, 2026 21:58
* Add githubRefUrl and githubUserUrl helper functions in app/lib/shared/urls.dart.
* Update createPackageUploadedEmail in app/lib/service/email/email_templates.dart to format the git tag/branch and triggering actor.
* Pass githubRef, githubRefType, and githubActor in PackageBackend._performTarballUpload.
* Add and update unit tests in urls_test.dart, email_templates_test.dart, and upload_test.dart.
@sigurdm

sigurdm commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Nice! Thank you!

Added a commit incorporating the git ref/tag and triggering actor into the email metadata as well.

@sigurdm sigurdm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@jonasfj are you also happy?

@kevmoo

kevmoo commented Sep 1, 2026

Copy link
Copy Markdown
Member Author

Will hold off until we have a +2 - @jonasfj

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