Skip to content

Route fork-guidance comment through release-notes-comments.yml - #349

Merged
Mpdreamz merged 2 commits into
mainfrom
fix/fork-guidance-comment
Sep 16, 2026
Merged

Mpdreamz merged 2 commits into
mainfrom
fix/fork-guidance-comment

Conversation

@Mpdreamz

@Mpdreamz Mpdreamz commented Sep 16, 2026 •

Copy link
Copy Markdown
Member

Replaces the fork-guidance job's direct github-script comment with a changelog-decision artifact upload, so the comment flows through release-notes-comments.yml and the single sticky comment system.

Affects: changelog PR comments, release-notes-changelog-file.yml

Prompt summary: Route fork-guidance comments through release-notes-comments.yml (which uses a state file so only one comment can be active at a time) instead of posting directly with a custom marker.

Why

The previous approach posted a comment directly using actions/github-script with a custom <!-- changelog-fork-guidance --> marker, bypassing the single sticky ### 📋 Changelog comment managed by release-notes-comments.yml. This meant fork PRs could end up with two concurrent changelog comments and the comment couldn't be tested in docs-builder.

What

Fork-guidance job now uploads an artifact instead of posting directly

The fork-guidance job downloads the changelog-decision artifact from the triggering release-notes run to verify the PR is specifically failing the file gate (status: missing-entry, gate: file). If confirmed, it writes its own changelog-decision artifact with is_fork: true, gate: file, status: missing-entry. release-notes-comments.yml then processes this artifact and calls docs-builder changelog github-comment, which renders the fork-specific guidance body via RenderMissingEntry.

No comment for skip/label-failure cases

Because the job checks the triggering run's artifact first, it only uploads guidance when the file gate actually failed — not for changelog:skip PRs or unlabeled PRs where the existing label-gate comment already covers the situation.

Permission change

pull-requests: write is replaced with actions: write since the job no longer posts comments directly.

Depends on

docs-builder feat/changelog-validate-onboarding-preflight — RenderMissingEntry extended with isFork parameter that renders the bash + docs-builder one-liner block.

🤖 Generated with Claude Code

When a fork PR from a non-Elastic-org-member triggers
release-notes-changelog-file, the preflight job sets should-submit=false
and previously did nothing. Add a fork-guidance job that posts a
upsert-safe PR comment with two options: a copy-pastable bash heredoc
(no tooling) and a docs-builder changelog add one-liner.

Also plumbs pr-number through preflight outputs so fork-guidance can
address the comment to the correct PR.

Co-Authored-By: Claude <[email protected]>
@Mpdreamz
Mpdreamz requested a review from a team as a code owner September 16, 2026 11:32
@Mpdreamz
Mpdreamz requested a review from akira28 September 16, 2026 11:32

@github-actions github-actions Bot 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.

Requesting changes: the fork-guidance comment upsert must paginate PR comments so reruns remain idempotent on threads with more than one comments page.


What is this? | From workflow: PR Review

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

…tifact

Replace the fork-guidance job's direct github-script comment with an artifact
upload. The job now downloads the triggering release-notes run's changelog-
decision artifact to verify the PR is specifically failing the file gate
(status: missing-entry, gate: file) before uploading its own changelog-decision
artifact with is_fork: true.

When release-notes-comments.yml processes this artifact, docs-builder's
RenderMissingEntry renders a fork-specific body with copy-pasteable bash and
docs-builder instructions — going through the single sticky comment system
rather than posting a parallel comment with a custom marker.

Co-Authored-By: Claude <[email protected]>
@Mpdreamz Mpdreamz changed the title Post guidance comment to fork PRs from non-org-members Route fork-guidance comment through release-notes-comments.yml Sep 16, 2026

@github-actions github-actions Bot 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.

Approved.


What is this? | From workflow: PR Review

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

@Mpdreamz
Mpdreamz merged commit 9980180 into main Sep 16, 2026
10 checks passed
@Mpdreamz
Mpdreamz deleted the fix/fork-guidance-comment branch September 16, 2026 12:16
@Mpdreamz Mpdreamz added enhancement New feature or request and removed automation labels Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants