Skip to content

Workflows: Include workflow run URL in cherry-pick PR comments#76577

Closed
jigangz wants to merge 3 commits intoWordPress:trunkfrom
jigangz:fix/add-workflow-run-url-to-pr-comments
Closed

Workflows: Include workflow run URL in cherry-pick PR comments#76577
jigangz wants to merge 3 commits intoWordPress:trunkfrom
jigangz:fix/add-workflow-run-url-to-pr-comments

Conversation

@jigangz
Copy link

@jigangz jigangz commented Mar 17, 2026

What?

Add a link to the GitHub Actions workflow run in the comments posted by the cherry-pick-wp-release workflow.

Why?

When the cherry-pick workflow comments on a PR (either for a successful cherry-pick or a conflict notification), there is no link back to the workflow run logs. This makes it harder for contributors to debug failures or verify the cherry-pick. See #76575.

How?

For each actions/github-script step that posts a PR comment, this PR:

  1. Adds a run_url environment variable using ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
  2. Appends a [Workflow run](${runUrl}) link to the comment body

This applies to both the success comment ("Comment on the PR") and the conflict comment ("Comment on the PR about conflict") steps.

Testing Instructions

This change only affects workflow comment formatting. It can be verified by:

  1. Triggering the cherry-pick workflow on a test PR with the appropriate label
  2. Confirming the resulting comment includes a clickable link to the workflow run

Fixes #76575

@jigangz jigangz requested a review from desrosj as a code owner March 17, 2026 12:52
@github-actions
Copy link

github-actions bot commented Mar 17, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @jigangzhou@jigangdeMacBook-Air.local.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Unlinked contributors: jigangzhou@jigangdeMacBook-Air.local.

Co-authored-by: desrosj <desrosj@git.wordpress.org>
Co-authored-by: jigangz <jigangz@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Mar 17, 2026
@github-actions
Copy link

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @jigangz! In case you missed it, we'd love to have you join us in our Slack community.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

Copy link
Member

@desrosj desrosj left a comment

Choose a reason for hiding this comment

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

Thanks for this, @jigangz!

A few changes for you whenever you have a chance.

@jigangz
Copy link
Author

jigangz commented Mar 17, 2026

Done! Switched both steps to pull the run URL directly from the context object instead of passing it through an environment variable. Also updated the comment text to match your suggestion.

If anything else looks off, let me know!

@desrosj desrosj added [Type] Build Tooling Issues or PRs related to build tooling GitHub Actions Pull requests that update GitHub Actions code labels Mar 17, 2026
@desrosj
Copy link
Member

desrosj commented Mar 17, 2026

Thanks @jigangz!

When you're able, can you please link your wordpress.org account to your GitHub one so that we can give you proper attribution in WordPress releases? The steps are included above in the Props Bot comment.

@jigangz
Copy link
Author

jigangz commented Mar 17, 2026

Done, just linked my wordpress.org account (@jigangz) to GitHub. Thanks for the heads up!

jigangz and others added 3 commits March 17, 2026 09:25
* HTML Block: Remove "unsaved changes" check

* Use onRequestClose directly

Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: ramonjd <ramonopoly@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: ntsekouras <ntsekouras@git.wordpress.org>
Add a link to the GitHub Actions workflow run in the comments
posted by the cherry-pick workflow, for both successful cherry-picks
and conflict notifications. This helps contributors quickly access
the workflow logs for debugging or verification.

Fixes WordPress#76575
@jigangz jigangz closed this Mar 17, 2026
@jigangz jigangz force-pushed the fix/add-workflow-run-url-to-pr-comments branch from 3cfb459 to 9438987 Compare March 17, 2026 16:26
@jigangz
Copy link
Author

jigangz commented Mar 17, 2026

Hey, sorry for the noise — I had to reopen this as a new PR (#76593). I rebased the branch to fix a git author email mismatch (my commits were showing an auto-generated local email instead of my GitHub-linked one), and that accidentally broke the branch history, which caused this PR to be closed automatically. Everything else is the same. Thanks!

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

Labels

First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository GitHub Actions Pull requests that update GitHub Actions code [Type] Build Tooling Issues or PRs related to build tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Include workflow run URL when commenting on PRs

2 participants