Repository navigation
feat(inkless:sync): label upstream sync PRs with upstream - #829
Merged
Merged
Conversation
Sync PRs were labeled by hand, and the label was missing on several of them. The `upstream` label marks PRs that bring apache/kafka commits, so a reviewer or a release-notes pass can tell them apart from Inkless changes. The `Inkless PR labels` workflow adds the label when a PR opens or reopens against `main` or `inkless-4.*`. It matches the `sync/upstream-*` and `inkless-*-sync-*` branch names first. Otherwise it lists the first-parent merges of the PR and checks whether the second parent is reachable from an `apache/kafka` branch. A merge of `main` into a feature branch has an Inkless commit there, so it doesn't match. Most PRs have no merge commit, so the workflow fetches `apache/kafka` only when the merge list is not empty. The list is assigned to a variable first, because a failed `git rev-list` inside a `for` list doesn't stop the shell under `set -e`. The workflow runs on `pull_request_target` and fetches commit objects only (`--filter=tree:0`), so it never reads PR content. It runs from the base branch, so the release branches need this file before their sync PRs get the label from the workflow. The sync guides now pass `--label upstream` to `gh pr create`, so the label doesn't depend on the workflow. Testing: the detect step run against GitHub reports `upstream=true` for a past sync merge with a neutral branch name, and `upstream=false` without an `apache/kafka` fetch for a range with no merges. Assisted-by: Claude Sonnet 5.5
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No blocking issues remain, and the labeling workflow avoids executing PR code.
No open issues 🎉
What changed in this PR
This PR makes upstream Kafka sync PRs easier to identify for review and release notes.
Changes:
- Adds automatic
upstreamlabeling based on branch names or merge ancestry. - Fetches commit objects without checking out or executing PR code.
- Updates sync guides to apply the label explicitly when creating PRs.
| File | Description |
|---|---|
inkless-sync/RELEASE-SYNC-GUIDE.md |
Adds labeled PR creation and release-branch workflow guidance. |
inkless-sync/RELEASE-SYNC-ACTION-PLAN.md |
Updates the release sync PR command and labeling instructions. |
inkless-sync/README.md |
Adds labeling to the agent workflow. |
inkless-sync/MAIN-SYNC-PROMPT.md |
Requires the label in PR preparation instructions. |
inkless-sync/MAIN-SYNC-ACTION-PLAN.md |
Adds labeled PR creation and explains automatic detection. |
.github/workflows/inkless-pr-labels.yml |
Implements upstream sync detection and labeling. |
Review effort: Balanced
jeqo
marked this pull request as ready for review
October 19, 2026 09:12
gqmelo
approved these changes
Oct 21, 2026
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.
Sync PRs were labeled by hand, and the label was missing on several of them. The
upstreamlabel marks PRs that bring apache/kafka commits, so a reviewer or a release-notes pass can tell them apart from Inkless changes.The
Inkless PR labelsworkflow adds the label when a PR opens or reopens againstmainorinkless-4.*. It matches thesync/upstream-*andinkless-*-sync-*branch names first. Otherwise it lists the first-parent merges of the PR and checks whether the second parent is reachable from anapache/kafkabranch. A merge ofmaininto a feature branch has an Inkless commit there, so it doesn't match.Most PRs have no merge commit, so the workflow fetches
apache/kafkaonly when the merge list is not empty. The list is assigned to a variable first, because a failedgit rev-listinside aforlist doesn't stop the shell underset -e.The workflow runs on
pull_request_targetand fetches commit objects only (--filter=tree:0), so it never reads PR content. It runs from the base branch, so the release branches need this file before their sync PRs get the label from the workflow.The sync guides now pass
--label upstreamtogh pr create, so the label doesn't depend on the workflow.Testing: the detect step run against GitHub reports
upstream=truefor a past sync merge with a neutral branch name, andupstream=falsewithout anapache/kafkafetch for a range with no merges.