Repository navigation
Conversation
…act upload The three actions/github-script comment steps (post-success-comment, post-comment-only, post-failure-comment) and their four JS scripts are removed. In their place, a single shell step copies the staging metadata and YAML into .artifacts/changelog-decision/, calls changelog github-decision to stamp CommitOutcome, then uploads the changelog-decision artifact with if: always() and continue-on-error: true. The downstream release-notes-comments workflow (added in #323) picks up this artifact and posts the sticky comment with pull-requests: write, keeping comment responsibility out of the commit job. The config input is removed from the action; it was only used in the now- deleted post-failure-comment step. Co-Authored-By: Claude <[email protected]>
theletterf
approved these changes
Sep 2, 2026
| SKIP_LABELS: ${{ steps.meta.outputs.skip-labels }} | ||
| CONFIG_FILE: ${{ inputs.config }} | ||
| # Copy the generated YAML so the comment renderer can show it in comment-only mode | ||
| GENERATED=$(ls /tmp/changelog-staging/*.yaml 2>/dev/null | head -1) |
There was a problem hiding this comment.
Severity: P2 (Medium)
Allow this lookup to succeed when no YAML was generated. Missing-label evaluations upload metadata without a YAML file, but shell: bash enables -e -o pipefail, so the failing ls terminates this step before github-decision runs; the subsequent nonempty check is never reached. The upload then publishes raw staging metadata instead of the intended decision for the failure-comment path. Handle an empty glob without failing so metadata-only artifacts also reach decision recording.
Generated by Libra. React with 👍 or 👎 to give feedback on this comment.
This was referenced Oct 26, 2026
theletterf
added a commit
that referenced
this pull request
Oct 26, 2026
* Post changelog-file PR comments from the same run Remove the github-script comment steps and JS scripts from changelog/submit/apply. The action now records the decision with changelog github-decision and uploads it as changelog-decision, only in the cases where the JS steps commented: committed, commit failed, comment-only, and no-label. A new comment job in release-notes-changelog-file.yml and changelog-submit.yml posts the comment from that artifact through changelog/comment with the new current-run input. The apply job drops to pull-requests: read. The fork-guidance decision uses the same job. Related to elastic/docs-eng-team#1131. Replaces #324. Co-Authored-By: Claude Opus 5.5 <[email protected]> * TEMP: point changelog-file at this branch for the playground test (revert before merge) * Revert "TEMP: point changelog-file at this branch for the playground test (revert before merge)" This reverts commit 8b7b17c. --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The three
actions/github-scriptcomment steps and their four JS scripts are removed fromchangelog/submit/apply. Commenting now happens in the downstreamrelease-notes-commentsworkflow (added in #323). A new shell step records the commit outcome into the metadata and uploads it aschangelog-decisionso the comment workflow picks it up.Affects: Release notes, Automation
Why
Commenting from inside
submit/applyrequiredpull-requests: writeon the commit job. The JS scripts (post-success-comment.js,post-comment-only.js,post-failure-comment.js) were the only things in the repo that posted PR comments. Moving them to a dedicatedworkflow_runjob with its own token gives the commit job a narrower permission set and lets any future consumer opt into comments by copying one file instead of modifying the submit workflow. The three steps also lackedcontinue-on-error: true, so a transient 403 from the GitHub API could fail a run that otherwise committed the entry successfully.What
JS scripts removed
All four scripts in
changelog/submit/apply/scripts/(comment-helper.js,post-success-comment.js,post-comment-only.js,post-failure-comment.js) are deleted. Theconfiginput — used only bypost-failure-comment.js— is also removed from the composite.Record decision and stage comment artifactstepAfter the commit step, a single shell step runs
if: always()withcontinue-on-error: true. It copies the staging metadata and generated YAML into.artifacts/changelog-decision/, callschangelog github-decision --commit-outcome <committed|failed|none>to stamp the outcome, and sets--committed-filewhen the commit succeeded. The directory layout matches whatchangelog github-commentexpects.Upload decision artifactstepUploads
.artifacts/changelog-decisionaschangelog-decisionwithif: always()andcontinue-on-error: true,if-no-files-found: ignore. The downstreamrelease-notes-commentsworkflow (PR #323) picks this up withpull-requests: writeand posts or updates the sticky comment.Verify
Open a PR in a repo that has
release-notes-comments.ymlwired up. The Changelog submit workflow should complete without posting a comment itself. A few seconds later theChangelog PR commentsworkflow should run and post (or update) the sticky### 📋 Changelogcomment.Stack: 3 of 4, on top of #323. PR 4 drops
should-comment-success/should-comment-failurefromdocs-builderonce this PR is merged and no code reads those outputs.Risk:
elastic/cloudcurrently readsshould-comment-successandshould-comment-failurefromsubmit/apply/evaluate-artifact. Those outputs are onChangelogArtifactEvaluationService, notapply. They are dropped in the coordinateddocs-builderPR 4 — this PR does not touch them.Out of scope:
changelog/submit/evaluateis untouched.changelog-submit.ymlis untouched.elastic/cloud's consumer workflow must haverelease-notes-comments.ymlin place on its default branch before this PR is merged.