Skip to content

3di | Fix the Enhance job for pull requests coming from forks (backport #7294) - #7328

Merged
fujitatomoya merged 2 commits into
lyricalfrom
mergify/bp/lyrical/pr-7294
Oct 24, 2026
Merged

fujitatomoya merged 2 commits into
lyricalfrom
mergify/bp/lyrical/pr-7294

Conversation

@mergify

@mergify mergify Bot commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Another small hotfix to the enhancement checker. The previous fix got the check running, but it still fell over on a pull request opened from a fork because a few steps were talking to the fork checkout instead of the base repository, and the metadata parser mishandled empty optional fields. This change addresses those cases so that the check behaviour for fork PRs is the same as for branch PRs.

@gbiggs @tfoote FYI this is the hotfix Denise mentioned in the latest email. I'll address all the comments and reviews in the other PRs as soon as I can. Thank you for your patience.

What I changed

  • Fetch the diff base from the trusted repository – Under pull_request_target the working copy is the PR head checkout, so on a fork its origin remote points at the fork, which doesn't have the base commit. The fetch now targets the base repo explicitly by URL (https://github.com/${BASE_REPO}.git) so the diff against rolling can always be computed.

  • Stop metadata field values at the end of the line – The parser used \s* for the value, which crosses line breaks, so an empty optional field such as :experience: would eat up the next line and hide :area:. The pattern now uses [ \t]* and anchors to end of the line, so a blank field stays blank and the following field is read correctly. Also added a regression test for the empty-field case, just in case.

  • Post the review comment on the base repository – gh pr review inferred the repo from the fork checkout, so it tried to review the wrong repository. It now passes --repo explicitly. The comment body is also written to a file and passed with --body-file instead of inline, so the multiline Markdown summary can't be broken by shell quoting.

  • Don't let the advisory comment fail the check – Posting that comment is informational, so it now runs with continue-on-error: true. The real gate is still the "Enforce required enhancements" step, which fails only when error-level enhancements are missing.


    This is an automatic backport of pull request 3di | Fix the Enhance job for pull requests coming from forks #7294 done by Mergify.

The job already checks out fork files as data and runs the checker from
rolling. This change finishes that design.

Field values in `.. meta::` now stop at the end of the line so a blank
`:experience:` does not hide `:area:`. The job fetches the pull
request base from ros2/ros2_documentation and posts the review there
too. Both of those steps were talking to the fork checkout.

(cherry picked from commit 829377a)
@fujitatomoya
fujitatomoya enabled auto-merge (squash) October 24, 2026 01:08
@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

HTML artifacts: https://github.com/ros2/ros2_documentation/actions/runs/40048431423/artifacts/12541974701.

To view the resulting site:

  1. Click on the above link to download the artifacts archive
  2. Extract it
  3. Open html-artifacts-7328/index.html in your favorite browser

@fujitatomoya
fujitatomoya merged commit 3fb10d4 into lyrical Oct 24, 2026
6 checks passed
@fujitatomoya
fujitatomoya deleted the mergify/bp/lyrical/pr-7294 branch October 24, 2026 01:14
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