8000 feat(inkless:sync): label upstream sync PRs with `upstream` by jeqo · Pull Request #829 · aiven/inkless · GitHub
[go: up one dir, main page]

Skip to content

feat(inkless:sync): label upstream sync PRs with upstream - #829

Merged
gqmelo merged 1 commit into
mainfrom
jeqo/upstream-pr-label
Oct 21, 2026
Merged

gqmelo merged 1 commit into
mainfrom
jeqo/upstream-pr-label

Conversation

@jeqo
@jeqo jeqo commented Oct 19, 2026
Copy link
Copy Markdown
Contributor

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.

@jeqo
jeqo requested a balanced review from Copilot October 19, 2026 08:50
Copilot AI 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.

🟢 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 upstream labeling 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
jeqo marked this pull request as ready for review October 19, 2026 09:12
@gqmelo
gqmelo merged commit a76409c into main Oct 21, 2026
13 checks passed
@gqmelo
gqmelo deleted the jeqo/upstream-pr-label branch October 21, 2026 12:51
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.

3 participants

0