Skip to content

ci(changelog): re-run the check when PR labels change - #6916

Open
FarhanAliRaza wants to merge 3 commits into
mainfrom
farhan/changelog-label-trigger
Open

ci(changelog): re-run the check when PR labels change#6916
FarhanAliRaza wants to merge 3 commits into
mainfrom
farhan/changelog-label-trigger

Conversation

@FarhanAliRaza

@FarhanAliRaza FarhanAliRaza commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

The `changelog` workflow gates on the `skip-changelog` / `changelog-version-edit` labels, but it only ran on the default `pull_request` types (`opened`, `synchronize`, `reopened`). Adding a label after the last push never starts a new run, and re-running the failed run replays the original event payload where the label does not exist yet, so the check keeps failing until someone pushes again (see run 32273787477 on #6866).

Add `labeled` and `unlabeled` to the trigger types so toggling a label re-evaluates the check with the current label set.

Review in cubic

@FarhanAliRaza
FarhanAliRaza requested a review from a team as a code owner August 19, 2026 16:51
@FarhanAliRaza FarhanAliRaza added the skip-changelog For doc/internal changes label Aug 19, 2026
@greptile-apps

greptile-apps Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The changelog workflow now reruns when pull-request labels change and reads the current labels through the GitHub API, ensuring changelog waivers are reevaluated rather than relying on stale event payloads.

  • Adds labeled and unlabeled pull-request event triggers.
  • Grants read access to pull-request metadata.
  • Uses API-derived label outputs for changelog and version-heading checks.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
.github/workflows/changelog.yml The workflow consistently fetches current PR labels and applies those outputs across all label-dependent checks; no eligible follow-up defect was identified.

Reviews (3): Last reviewed commit: "ci(changelog): restore the label trigger..." | Re-trigger Greptile

@codspeed-hq

codspeed-hq Bot commented Aug 19, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 27 untouched benchmarks
⏩ 8 skipped benchmarks1


Comparing farhan/changelog-label-trigger (105cefe) with main (d86f167)

Open in CodSpeed

Footnotes

  1. 8 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 1 file

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread .github/workflows/changelog.yml
@masenf

masenf commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Reviewbot comment seems legit. Can you also apply this change to the template CI workflow that's part of reflex-release

The skip-changelog and changelog-version-edit gates read
github.event.pull_request.labels, which is a snapshot taken when the run
was queued. A label applied after the last push is invisible to the run,
and "Re-run failed jobs" replays that same stale payload, so the check
keeps failing until someone pushes again.

Read the labels from the API at job time instead, so a re-run picks up
the current label set. This removes the need for the labeled/unlabeled
trigger types added earlier on this branch, which fired for every label
on every PR and cancelled in-progress runs for no change in outcome.

Same approach aiohttp uses for its CHANGES-fragment check.
@FarhanAliRaza FarhanAliRaza removed the skip-changelog For doc/internal changes label Aug 21, 2026
Dropping labeled/unlabeled left the opposite bug: removing skip-changelog
produced no run at all, so the green computed while the label was applied
stayed as the check's verdict and the gate silently stayed open.

The verdict is only valid for the label set it was computed under, so a
label change has to start a run. Keep the API read too: it is what makes
"Re-run failed jobs" pick up the current labels instead of replaying the
queued payload.
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