This is an automated email from the ASF dual-hosted git repository. rusackas pushed a commit to branch chore/label-merge-conflicts in repository https://gitbox.apache.org/repos/asf/superset.git
commit 71365b2572fadca6d5b3d568bc5b5db8291f4cde Author: Superset Dev <[email protected]> AuthorDate: Mon Jul 27 22:10:24 2026 -0700 feat(ci): auto-label PRs with merge conflicts via eps1lon/actions-label-merge-conflict Adds a scheduled job that applies the existing requires:rebase label (already defined, previously unused by any automation) to open PRs GitHub reports as CONFLICTING, and removes it once a rebase makes the PR mergeable again. Also strips need:merge if present, since a conflicting PR isn't actually ready to merge. Runs on a 2-hour schedule (plus workflow_dispatch) rather than the upstream README's suggested push + pull_request_target: [synchronize] trigger. The action always re-checks *every* open PR via GraphQL regardless of what triggered it (verified in its source), so the recommended trigger would re-sweep the entire open-PR backlog on every push to master and every push to any open PR - many times an hour on a repo this size. A schedule bounds that to a small, fixed number of sweeps a day instead. No commentOnDirty/commentOnClean: the label alone is the intended signal (matches the label's existing description), and posting a comment on every currently-conflicting PR the first time this runs would be a lot of one-time notification noise across the backlog. Pinned to eps1lon/actions-label-merge-conflict v3.1.0 (0273be72a0bbd58fcd71d0d6c02c209b50d1e5e1). Per the ASF Infra allowlist process this repo already follows for other actions, this will need an Infra ticket before the job can actually run. Co-Authored-By: Claude Fable 5 <[email protected]> --- .github/workflows/label-merge-conflicts.yml | 45 +++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/.github/workflows/label-merge-conflicts.yml b/.github/workflows/label-merge-conflicts.yml new file mode 100644 index 00000000000..9a337410907 --- /dev/null +++ b/.github/workflows/label-merge-conflicts.yml @@ -0,0 +1,45 @@ +name: Label Merge Conflicts + +# Sweeps every open PR and labels the ones GitHub reports as CONFLICTING with +# `requires:rebase` (removing it once a rebase makes the PR mergeable again), +# so the label can be used to filter the PR backlog for the ones that need a +# rebase before they can be reviewed/merged. +# +# The action itself always re-checks *every* open PR via GraphQL on each run +# regardless of what triggered it (see eps1lon/actions-label-merge-conflict's +# sources/main.ts) - there's no way to scope it to "just this PR". The +# project's own README suggests triggering on `push` (to the default branch) +# plus `pull_request_target: [synchronize]`, but on a repo with Superset's PR +# volume that combination would re-sweep the entire open-PR list on every +# merge to master *and* every push to *any* open PR - many times an hour. +# A schedule bounds that to a fixed, predictable cadence instead; adjust it +# if 2 hours turns out to be too slow or too chatty in practice. +on: + schedule: + - cron: "0 */2 * * *" + workflow_dispatch: + +permissions: + contents: read + pull-requests: write + +jobs: + label-merge-conflicts: + # Scheduled/dispatch workflows still run on forks that carry this file; + # skip anywhere but the canonical repo. + if: github.repository == 'apache/superset' + name: Label Merge Conflicts + runs-on: ubuntu-latest + steps: + # Do not bump this action version without opening an ASF Infra ticket + # to allow the new SHA first! + - uses: eps1lon/actions-label-merge-conflict@0273be72a0bbd58fcd71d0d6c02c209b50d1e5e1 # v3.1.0 + with: + dirtyLabel: "requires:rebase" + # A conflicting PR isn't actually ready to merge; strip that signal + # if it was previously set so reviewers don't act on a stale one. + removeOnDirtyLabel: "need:merge" + repoToken: ${{ secrets.GITHUB_TOKEN }} + # Intentionally no commentOnDirty/commentOnClean: the label alone is + # the signal (matches the label's existing description, and avoids + # a one-time comment storm across the whole backlog on first run).
