diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index 86aa4156358c..2d88388ce066 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -71,7 +71,8 @@ jobs: env: GH_TOKEN: ${{secrets.GH_TOKEN_JABREF_MACHINE_PR_APPROVE}} - name: Approve PR - if: steps.shouldrun.outputs.shouldrun == 'true' + # jabref-machine cannot approve its own PRs (ports); on-pr-labeled.yml approves those + if: steps.shouldrun.outputs.shouldrun == 'true' && github.event.pull_request.user.login != 'jabref-machine' # Guard: a push directly followed by adding the "automerge" label makes both this # workflow (live label query) and on-pr-labeled.yml approve — skip if an # un-dismissed approval by jabref-machine already exists. diff --git a/.github/workflows/binaries.yml b/.github/workflows/binaries.yml index 255101b771f6..eeaab2ab8510 100644 --- a/.github/workflows/binaries.yml +++ b/.github/workflows/binaries.yml @@ -5,7 +5,7 @@ on: branches: - main - main-release - - stable + - black-forest paths-ignore: - 'docs/**' - 'src/test/**' @@ -308,7 +308,7 @@ jobs: echo "should-notarize=false" >> "$GITHUB_OUTPUT" if [[ "${{ github.event_name }}" == "push" ]]; then - if [[ "${{ github.ref_name }}" == "main" || "${{ github.ref_name }}" == "stable" ]]; then + if [[ "${{ github.ref_name }}" == "main" || "${{ github.ref_name }}" == "black-forest" ]]; then echo "☁️ Push to \`${{ github.ref_name }}\` – will upload" echo "☁️ Push to \`${{ github.ref_name }}\` – will upload" >> $GITHUB_STEP_SUMMARY echo "upload-to-builds-jabref-org=true" >> "$GITHUB_OUTPUT" @@ -457,7 +457,7 @@ jobs: ] }' - if [[ "$GITHUB_REF" != "refs/heads/main" && "$GITHUB_REF" != "refs/heads/stable" && "$SHOULD_NOTARIZE" != "true" ]]; then + if [[ "$GITHUB_REF" != "refs/heads/main" && "$GITHUB_REF" != "refs/heads/black-forest" && "$SHOULD_NOTARIZE" != "true" ]]; then # drop macos-15-intel MATRIX_JSON="$(jq -c ' .include |= map(select(.os != "macos-15-intel")) ' <<<"$MATRIX_JSON")" else @@ -523,6 +523,9 @@ jobs: with: fetch-depth: 0 show-progress: 'false' + - name: Fetch upstream release tags + if: needs.conditions.outputs.should-build == 'true' && github.repository == 'JabRef/jabref-black-forest' + run: git fetch https://github.com/JabRef/jabref.git 'refs/tags/*:refs/tags/*' - name: Install GitVersion if: needs.conditions.outputs.should-build == 'true' id: pre-gitversion diff --git a/.github/workflows/jabls-native-smoke-test.yml b/.github/workflows/jabls-native-smoke-test.yml index a58d7dd1df44..94d86c7e2d0e 100644 --- a/.github/workflows/jabls-native-smoke-test.yml +++ b/.github/workflows/jabls-native-smoke-test.yml @@ -5,7 +5,7 @@ on: branches: - main - main-release - - stable + - black-forest paths: - 'jabls/**' - 'jabls-cli/**' diff --git a/.github/workflows/jabsrv-native-smoke-test.yml b/.github/workflows/jabsrv-native-smoke-test.yml index 09eb1b35c65c..fc4c60f92298 100644 --- a/.github/workflows/jabsrv-native-smoke-test.yml +++ b/.github/workflows/jabsrv-native-smoke-test.yml @@ -5,7 +5,7 @@ on: branches: - main - main-release - - stable + - black-forest paths: - 'jabsrv/**' - 'jabsrv-cli/**' diff --git a/.github/workflows/on-pr-bug-linked.yml b/.github/workflows/on-pr-bug-linked.yml index 4f0f45481b3e..2bd5416db4cb 100644 --- a/.github/workflows/on-pr-bug-linked.yml +++ b/.github/workflows/on-pr-bug-linked.yml @@ -2,7 +2,7 @@ name: Inherit label and milestone from linked issue # [impl->req~ci.port-to-other-branch.label-driven-ports~1] # [impl->adr~single-stable-branch-with-automatic-ports~1] -# Adds "dev: into-stable" when a PR into main links an issue of type "bug" for the +# Adds "dev: send-to-black-forest" when a PR into main links an issue of type "bug" for the # first time: at creation, or when an edit of the body adds a new issue link. A push never # triggers this, and a link that was already there never counts again - so a maintainer's # decision to remove (or add) the label by hand sticks. @@ -28,7 +28,7 @@ jobs: (github.event.action == 'opened' || github.event.changes.body) runs-on: ubuntu-slim steps: - - name: 'Add "dev: into-stable" for a newly linked bug' + - name: 'Add "dev: send-to-black-forest" for a newly linked bug' env: # PAT: a label added with GITHUB_TOKEN would not trigger the "Would merge into the other branch" check GH_TOKEN: ${{ secrets.GH_TOKEN_JABREF_MACHINE_PR_APPROVE }} @@ -67,8 +67,9 @@ jobs: fi # GitHub stores the type name in lower case ("bug") while the issue template writes "Bug" if [ "$labeled" = false ] && [ "${type,,}" = "bug" ]; then - gh pr edit "$PR_NUMBER" --add-label "dev: into-stable" - echo "Added \`dev: into-stable\`" >> "$GITHUB_STEP_SUMMARY" + # `gh pr edit` queries fields that need the read:org scope, which the token lacks + gh api "repos/JabRef/jabref/issues/$PR_NUMBER/labels" -f "labels[]=dev: send-to-black-forest" > /dev/null + echo "Added \`dev: send-to-black-forest\`" >> "$GITHUB_STEP_SUMMARY" labeled=true fi done diff --git a/.github/workflows/on-pr-labeled.yml b/.github/workflows/on-pr-labeled.yml index 90fcacb9c40f..f6286b7c15d4 100644 --- a/.github/workflows/on-pr-labeled.yml +++ b/.github/workflows/on-pr-labeled.yml @@ -10,16 +10,28 @@ jobs: name: Auto Merge if: > github.event.label.name == 'automerge' && - github.repository == 'JabRef/jabref' && - github.event.pull_request.head.repo.full_name == 'JabRef/jabref' + (github.repository == 'JabRef/jabref' || github.repository == 'JabRef/jabref-black-forest') && + github.event.pull_request.head.repo.full_name == github.repository runs-on: ubuntu-slim + permissions: + contents: read + pull-requests: write # Same concurrency group as automerge.yml's automerge job: serializes the # two workflows per PR so the approve guard below cannot race. concurrency: group: automerge-pr-${{ github.event.pull_request.number }} cancel-in-progress: false steps: + - name: Approve a port PR + # jabref-machine cannot approve its own PRs (ports, opened from the other repository); + # github-actions[bot] does it instead - for ports only + if: github.event.pull_request.user.login == 'jabref-machine' && startsWith(github.event.pull_request.head.ref, 'port-') + run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - name: Approve PR + if: github.event.pull_request.user.login != 'jabref-machine' # Guard: automerge.yml (running for a push made just before the label was added) # queries labels live and may approve concurrently — skip if an un-dismissed # approval by jabref-machine already exists. @@ -51,7 +63,7 @@ jobs: steps: - name: Create pr_number.txt run: echo "${{ github.event.pull_request.number }}" > pr_number.txt - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 + - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7 with: name: pr_number path: pr_number.txt diff --git a/.github/workflows/port-to-other-branch.yml b/.github/workflows/port-to-other-branch.yml index e23b01d287e4..acf30c2bcce9 100644 --- a/.github/workflows/port-to-other-branch.yml +++ b/.github/workflows/port-to-other-branch.yml @@ -2,8 +2,10 @@ name: Port to other branch # [impl->req~ci.port-to-other-branch.label-driven-ports~1] # [impl->adr~single-stable-branch-with-automatic-ports~1] -# Keeps "main" and "stable" in sync: a PR into main labeled "dev: into-stable" is -# ported to stable once merged; a PR into stable is always ported to main once merged. +# Keeps "main" of JabRef/jabref and "black-forest" of JabRef/jabref-black-forest in sync: a PR into +# main labeled "dev: send-to-black-forest" is ported to black-forest once merged; a PR into +# black-forest is always ported to main once merged. The same file lives on both branches; the +# repository it runs in decides the direction. # Before the merge, the port is simulated, so a conflict shows up as a failed check on the PR. # # pull_request_target: the port needs a push-capable token, and the PR may come from a fork. @@ -22,11 +24,17 @@ concurrency: group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.event.merge_group.head_ref }}-${{ github.event.action == 'closed' && 'port' || 'check' }}" cancel-in-progress: ${{ github.event.action != 'closed' }} +env: + # The other side of the port; the owner is always JabRef + TARGET_REPO: ${{ github.repository == 'JabRef/jabref' && 'jabref-black-forest' || 'jabref' }} + TARGET: ${{ github.repository == 'JabRef/jabref' && 'black-forest' || 'main' }} + SOURCE: ${{ github.repository == 'JabRef/jabref' && 'main' || 'black-forest' }} + jobs: check: # Fixed name: it is listed as a required status check, whichever branch is the target name: Would merge into the other branch - if: github.repository == 'JabRef/jabref' && github.event.action != 'closed' + if: (github.repository == 'JabRef/jabref' || github.repository == 'JabRef/jabref-black-forest') && github.event.action != 'closed' runs-on: ubuntu-slim permissions: contents: read @@ -49,27 +57,25 @@ jobs: PR_NUMBER=$(sed -E 's#.*/pr-([0-9]+)-.*#\1#' <<< "$QUEUE_REF") fi gh pr view "$PR_NUMBER" --json state,baseRefName,headRefName,headRepositoryOwner,headRepository,labels \ - --jq '"state=\(.state|@sh)\nbase=\(.baseRefName|@sh)\nhead_repo=\("\(.headRepositoryOwner.login)/\(.headRepository.name)"|@sh)\nhead_ref=\(.headRefName|@sh)\ninto_stable=\(any(.labels[]; .name == "dev: into-stable"))"' > pr.env + --jq '"state=\(.state|@sh)\nbase=\(.baseRefName|@sh)\nhead_repo=\("\(.headRepositoryOwner.login)/\(.headRepository.name)"|@sh)\nhead_ref=\(.headRefName|@sh)\nlabeled=\(any(.labels[]; .name == "dev: send-to-black-forest"))"' > pr.env # shellcheck disable=SC1091 source pr.env port=false # A port PR (head "port-*" in this repository - a fork branch of that name is just a branch) # carries a change the other branch already has - never port it back. - if [ "$state" = "OPEN" ] && ! { [ "$head_repo" = "JabRef/jabref" ] && [[ "$head_ref" == port-* ]]; }; then - if [ "$base" = "stable" ] || { [ "$base" = "main" ] && [ "$into_stable" = "true" ]; }; then + if [ "$state" = "OPEN" ] && [ "$base" = "$SOURCE" ] && ! { [ "$head_repo" = "$GH_REPO" ] && [[ "$head_ref" == port-* ]]; }; then + # Into main, the label decides; everything merged into black-forest goes back to main + if [ "$base" != "main" ] || [ "$labeled" = "true" ]; then port=true fi fi - target=main - [ "$base" = "main" ] && target=stable { echo "number=$PR_NUMBER" echo "base=$base" - echo "target=$target" echo "port=$port" } >> "$GITHUB_OUTPUT" if [ "$port" != "true" ]; then - echo "Nothing to check for #$PR_NUMBER: not a port candidate (base \`$base\`, label \`dev: into-stable\` $([ "$into_stable" = true ] && echo present || echo absent))" >> "$GITHUB_STEP_SUMMARY" + echo "Nothing to check for #$PR_NUMBER: not a port candidate (base \`$base\`, label \`dev: send-to-black-forest\` $([ "$labeled" = true ] && echo present || echo absent))" >> "$GITHUB_STEP_SUMMARY" fi # The base branch tip, explicitly: on merge_group the event's ref is the queued commit, which # contains the PR - the composite action and the merge driver must come from the trusted base. @@ -87,7 +93,6 @@ jobs: env: PR_NUMBER: ${{ steps.pr.outputs.number }} BASE_REF: ${{ steps.pr.outputs.base }} - TARGET: ${{ steps.pr.outputs.target }} HEAD_SHA: ${{ github.event.merge_group.head_sha || github.event.pull_request.head.sha }} QUEUE_REF: ${{ github.event.merge_group.head_ref }} GIT_AUTHOR_NAME: github-actions[bot] @@ -96,28 +101,31 @@ jobs: GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com run: | set -euo pipefail - if ! git ls-remote --exit-code --heads origin "$TARGET" > /dev/null; then - echo "Branch \`$TARGET\` does not exist yet - nothing to check" >> "$GITHUB_STEP_SUMMARY" + target_url="https://github.com/JabRef/$TARGET_REPO.git" + if ! git ls-remote --exit-code --heads "$target_url" "$TARGET" > /dev/null; then + echo "Branch \`$TARGET\` does not exist yet in JabRef/$TARGET_REPO - nothing to check" >> "$GITHUB_STEP_SUMMARY" exit 0 fi + git fetch --no-tags "$target_url" "$TARGET" + target=$(git rev-parse FETCH_HEAD) if [ -n "$QUEUE_REF" ]; then # The queued commit merges this PR onto the previous queue entry (or the base tip), so its # first parent bounds exactly this PR's change even when several PRs are batched. - git fetch --no-tags origin "$TARGET" "$QUEUE_REF" + git fetch --no-tags origin "$QUEUE_REF" parent=$(git rev-parse "$HEAD_SHA^1") else - git fetch --no-tags origin "$TARGET" "+refs/pull/$PR_NUMBER/head:refs/remotes/pr/$PR_NUMBER" + git fetch --no-tags origin "+refs/pull/$PR_NUMBER/head:refs/remotes/pr/$PR_NUMBER" parent=$(git merge-base "origin/$BASE_REF" "$HEAD_SHA") fi # The PR as it lands: one commit carrying the PR's whole change (squash merge) squash=$(git commit-tree "$HEAD_SHA^{tree}" -p "$parent" -m "Squash of #$PR_NUMBER") - git checkout -q "origin/$TARGET" + git checkout -q "$target" if git cherry-pick --no-commit "$squash"; then - echo "✅ PR #$PR_NUMBER applies cleanly to \`$TARGET\`" >> "$GITHUB_STEP_SUMMARY" + echo "✅ PR #$PR_NUMBER applies cleanly to \`$TARGET\` of JabRef/$TARGET_REPO" >> "$GITHUB_STEP_SUMMARY" exit 0 fi { - echo "❌ PR #$PR_NUMBER conflicts with \`$TARGET\` in:" + echo "❌ PR #$PR_NUMBER conflicts with \`$TARGET\` of JabRef/$TARGET_REPO in:" echo git diff --name-only --diff-filter=U | sed 's/^/- `/; s/$/`/' echo @@ -126,79 +134,82 @@ jobs: exit 1 port: - name: Port to ${{ github.event.pull_request.base.ref == 'stable' && 'main' || 'stable' }} + name: Port to ${{ github.repository == 'JabRef/jabref' && 'black-forest' || 'main' }} permissions: - contents: write - pull-requests: write + contents: read env: - TARGET: ${{ github.event.pull_request.base.ref == 'stable' && 'main' || 'stable' }} PR_NUMBER: ${{ github.event.pull_request.number }} - GH_REPO: ${{ github.repository }} if: > - github.repository == 'JabRef/jabref' && + (github.repository == 'JabRef/jabref' || github.repository == 'JabRef/jabref-black-forest') && github.event.action == 'closed' && github.event.pull_request.merged && - !(github.event.pull_request.head.repo.full_name == 'JabRef/jabref' && startsWith(github.event.pull_request.head.ref, 'port-')) && + !(github.event.pull_request.head.repo.full_name == github.repository && startsWith(github.event.pull_request.head.ref, 'port-')) && ( - github.event.pull_request.base.ref == 'stable' || - (github.event.pull_request.base.ref == 'main' && contains(github.event.pull_request.labels.*.name, 'dev: into-stable')) + (github.repository == 'JabRef/jabref-black-forest' && github.event.pull_request.base.ref == 'black-forest') || + (github.repository == 'JabRef/jabref' && github.event.pull_request.base.ref == 'main' && contains(github.event.pull_request.labels.*.name, 'dev: send-to-black-forest')) ) runs-on: ubuntu-slim steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 with: + # The action pushes the port branch with the credential this checkout persists; the + # repository's own token cannot push to the other repository, the PAT can + token: ${{ secrets.GH_TOKEN_JABREF_MACHINE_PR_APPROVE }} fetch-depth: 0 submodules: 'false' show-progress: 'false' - uses: ./.github/actions/changelog-cherry-pick-driver - - name: Check that ${{ env.TARGET }} exists + - name: Check that ${{ env.TARGET }} exists in JabRef/${{ env.TARGET_REPO }} id: target run: | - if git ls-remote --exit-code --heads origin "$TARGET" > /dev/null; then + if git ls-remote --exit-code --heads "https://github.com/JabRef/$TARGET_REPO.git" "$TARGET" > /dev/null; then echo "exists=true" >> "$GITHUB_OUTPUT" else - echo "Branch \`$TARGET\` does not exist yet - nothing to port" >> "$GITHUB_STEP_SUMMARY" + echo "Branch \`$TARGET\` does not exist yet in JabRef/$TARGET_REPO - nothing to port" >> "$GITHUB_STEP_SUMMARY" echo "exists=false" >> "$GITHUB_OUTPUT" fi - name: Cherry-pick into a port PR if: steps.target.outputs.exists == 'true' id: port - uses: korthout/backport-action@2e830a1d0b8269505846ddd407a70876913ad1f8 # v4.6.0 + uses: korthout/backport-action@8560fb503c275d433c56f05a2f64850093baa9f7 # v4.7.0 with: - # A PAT, so that CI runs on the port PR and jabref-machine (another account) can approve it - github_token: ${{ secrets.GH_TOKEN_UPDATE_GRADLE_WRAPPER }} + # jabref-machine's PAT: it has to push to the other repository, and CI runs on the port PR + github_token: ${{ secrets.GH_TOKEN_JABREF_MACHINE_PR_APPROVE }} target_branches: ${{ env.TARGET }} # The target comes from the base branch and the label above, not from "backport " labels label_pattern: ^()$ branch_name: port-${pull_number}-to-${target_branch} pull_title: "[Port to ${target_branch}] ${pull_title}" pull_description: | - Port of #${pull_number} to `${target_branch}`, see [Branching strategy](https://devdocs.jabref.org/contributing.html#branching-strategy). + Port of ${{ github.repository }}#${pull_number} to `${target_branch}`, see [Branching strategy](https://devdocs.jabref.org/contributing.html#branching-strategy). If this PR is a draft, the cherry-pick conflicted: the conflicting files are committed with Git's conflict markers left in. Resolve the markers locally, push, and mark the PR ready. # A PR branch usually contains merges from main; the squash commit is what gets ported merge_commits: skip experimental: > - {"conflict_resolution": "draft_commit_conflicts"} + {"conflict_resolution": "draft_commit_conflicts", "downstream_repo": "${{ env.TARGET_REPO }}"} - name: Auto-merge a clean port if: steps.port.outputs.was_successful == 'true' env: - # jabref-machine's token: "On PR labeled" only fires for labels added with a PAT, and it approves as jabref-machine + # The port PR lives in the other repository, where only the PAT has rights. The label + # triggers "On PR labeled" there, which approves the port and enables auto-merge. GH_TOKEN: ${{ secrets.GH_TOKEN_JABREF_MACHINE_PR_APPROVE }} + GH_REPO: JabRef/${{ env.TARGET_REPO }} CREATED: ${{ steps.port.outputs.created_pull_numbers }} run: | for pr in $CREATED; do gh pr edit "$pr" --add-label automerge - echo "✅ Port PR #$pr opened with auto-merge" >> "$GITHUB_STEP_SUMMARY" + echo "✅ Port PR $GH_REPO#$pr opened with auto-merge" >> "$GITHUB_STEP_SUMMARY" done - name: Report a conflicting port if: steps.target.outputs.exists == 'true' && steps.port.outputs.was_successful != 'true' env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.GH_TOKEN_JABREF_MACHINE_PR_APPROVE }} + GH_REPO: JabRef/${{ env.TARGET_REPO }} CREATED: ${{ steps.port.outputs.created_pull_numbers }} run: | for pr in $CREATED; do gh pr edit "$pr" --add-label "status: changes-required" done - echo "❌ Port of #$PR_NUMBER to \`$TARGET\` conflicts - resolve it in the draft port PR ${CREATED:+#$CREATED}" | tee -a "$GITHUB_STEP_SUMMARY" + echo "❌ Port of #$PR_NUMBER to \`$TARGET\` of $GH_REPO conflicts - resolve it in the draft port PR ${CREATED:+$GH_REPO#$CREATED}" | tee -a "$GITHUB_STEP_SUMMARY" exit 1 diff --git a/.github/workflows/pr-changelog.yml b/.github/workflows/pr-changelog.yml index fd1804d7f169..4bfe05fe940e 100644 --- a/.github/workflows/pr-changelog.yml +++ b/.github/workflows/pr-changelog.yml @@ -16,7 +16,10 @@ permissions: jobs: changelog_modification_consistency: name: CHANGELOG.md needs to be modified if indicated - if: (github.event.pull_request.user.login != 'dependabot[bot]') && (github.event.pull_request.user.login != 'renovate-bot') + if: >- + (github.event.pull_request.user.login != 'dependabot[bot]') && + (github.event.pull_request.user.login != 'renovate-bot') && + !startsWith(github.event.pull_request.title, '[Port to ') runs-on: ubuntu-slim steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 @@ -42,7 +45,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: CHANGELOG.md modified id: changelog_modified - uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v47 + uses: tj-actions/changed-files@9426d40962ed5378910ee2e21d5f8c6fcbf2dd96 # v47.0.6 with: files: | CHANGELOG.md @@ -77,7 +80,7 @@ jobs: steps: - name: Create pr_number.txt run: echo "${{ github.event.number }}" > pr_number.txt - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 + - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7 with: name: pr_number path: pr_number.txt diff --git a/.github/workflows/pr-format.yml b/.github/workflows/pr-format.yml index efd1da806077..f7e745ee59b7 100644 --- a/.github/workflows/pr-format.yml +++ b/.github/workflows/pr-format.yml @@ -11,9 +11,9 @@ permissions: jobs: check_title_format: - name: PR title must not contain "issue " + name: PR title describes the change if: > - (github.event.pull_request.head.repo.full_name != 'JabRef/jabref') && + (github.event.pull_request.head.repo.full_name != github.repository) && !( (github.event.pull_request.user.login == 'dependabot[bot]') || (github.event.pull_request.user.login == 'renovate-bot') || ( @@ -30,11 +30,18 @@ jobs: TITLE=$(gh pr view "${{ github.event.number }}" --json title --template '{{.title}}') echo "Title: $TITLE" - if echo "$TITLE" | grep -Eiq 'issue ?#?[0-9]+|fix(es|ed)? ?(for ?)?#[0-9]+'; then + # Matches "issue 123", "issue-123", "issue_#123", "Fix for #123", "fix-for-issue-123", "Resolves #123", ... + if echo "$TITLE" | grep -Eiq 'issue[-_ ]?#?[0-9]+|(fix(es|ed)?|resolve[sd]?|close[sd]?)[-_ ]?(for[-_ ]?)?#[0-9]+'; then echo "❌ Title references an issue number instead of describing the change — not allowed." exit 1 fi + # A title without any whitespace is a single word or a branch name (e.g., "fix-for-issue-123") — not a description + if ! echo "$TITLE" | grep -q '[[:space:]]'; then + echo "❌ Title looks like a branch name or a single word instead of describing the change — not allowed." + exit 1 + fi + echo "✅ Title format OK" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -42,7 +49,7 @@ jobs: no-html-comments: if: > - (github.event.pull_request.head.repo.full_name != 'JabRef/jabref') && + (github.event.pull_request.head.repo.full_name != github.repository) && !( (github.event.pull_request.user.login == 'dependabot[bot]') || (github.event.pull_request.user.login == 'renovate-bot') || ( @@ -75,15 +82,10 @@ jobs: mandatory-checks-section-exists: if: > - (github.event.pull_request.head.repo.full_name != 'JabRef/jabref') && + (github.event.pull_request.head.repo.full_name != github.repository) && + !contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.pull_request.author_association) && !( - (github.event.pull_request.user.login == 'dependabot[bot]') || (github.event.pull_request.user.login == 'renovate-bot') || - ( - startsWith(github.event.pull_request.title, '[Bot] ') || - startsWith(github.event.pull_request.title, 'Bump ') || - startsWith(github.event.pull_request.title, 'New Crowdin updates') || - startsWith(github.event.pull_request.title, 'Update Gradle Wrapper from') - ) + (github.event.pull_request.user.login == 'dependabot[bot]') || (github.event.pull_request.user.login == 'renovate-bot') ) name: Mandatory Checklist present runs-on: ubuntu-slim @@ -107,7 +109,7 @@ jobs: checklist-checked: if: > - (github.event.pull_request.head.repo.full_name != 'JabRef/jabref') && + (github.event.pull_request.head.repo.full_name != github.repository) && !( (github.event.pull_request.user.login == 'dependabot[bot]') || (github.event.pull_request.user.login == 'renovate-bot') || ( @@ -151,12 +153,63 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_REPO: ${{ github.repository }} + license-checked: + if: > + (github.event.pull_request.head.repo.full_name != github.repository) && + !contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.pull_request.author_association) && + !( + (github.event.pull_request.user.login == 'dependabot[bot]') || (github.event.pull_request.user.login == 'renovate-bot') + ) + name: MIT license confirmed + runs-on: ubuntu-slim + steps: + - name: Check that the MIT license checkbox is ticked + run: | + set -e + + BODY=$(gh pr view "${{ github.event.number }}" --json body --template '{{.body}}') + + if ! CHECKLIST=$(printf '%s\n' "$BODY" | awk ' + /^### Checklist[[:space:]]*$/ { found = 1; in_checklist = 1; next } + /^#+ / { in_checklist = 0 } + in_checklist { print } + END { if (!found) exit 1 } + '); then + echo "❌ The Checklist section is missing." + exit 1 + fi + + LICENSE_LINES=$(printf '%s\n' "$CHECKLIST" | grep -E "^- \[.\] I own the copyright of the code submitted and I license it under the \[MIT license\]" || true) + + if [ -n "$LICENSE_LINES" ]; then + LICENSE_COUNT=$(printf '%s\n' "$LICENSE_LINES" | wc -l | tr -d '[:space:]') + else + LICENSE_COUNT=0 + fi + + if [ "$LICENSE_COUNT" -ne 1 ]; then + echo "❌ Expected exactly one MIT license checkbox, found $LICENSE_COUNT." + exit 1 + fi + + echo "Found license line: $LICENSE_LINES" + + if ! printf '%s\n' "$LICENSE_LINES" | grep -q "^- \[x\] "; then + echo "❌ The MIT license checkbox must be ticked ([x]). We cannot accept code without the permission to license it under MIT." + exit 1 + fi + + echo "✅ MIT license confirmed." + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + upload-pr-number: runs-on: ubuntu-slim steps: - name: Create pr_number.txt run: echo "${{ github.event.number }}" > pr_number.txt - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 + - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7 with: name: pr_number path: pr_number.txt diff --git a/.github/workflows/pr-modifications.yml b/.github/workflows/pr-modifications.yml index cb3b2e136723..86fc01a2f390 100644 --- a/.github/workflows/pr-modifications.yml +++ b/.github/workflows/pr-modifications.yml @@ -17,7 +17,7 @@ jobs: merge_conflict_job: name: Find merge conflicts if: > - (github.event.pull_request.head.repo.full_name != 'JabRef/jabref') && + (github.event.pull_request.head.repo.full_name != github.repository) && !( (github.event.pull_request.user.login == 'dependabot[bot]') || (github.event.pull_request.user.login == 'renovate-bot') || ( @@ -37,7 +37,7 @@ jobs: no-force-push: if: > - (github.event.pull_request.head.repo.full_name != 'JabRef/jabref') && + (github.event.pull_request.head.repo.full_name != github.repository) && !( (github.event.pull_request.user.login == 'dependabot[bot]') || (github.event.pull_request.user.login == 'renovate-bot') || ( @@ -95,7 +95,7 @@ jobs: other_than_main: name: Source branch is other than "main" if: > - (github.event.pull_request.head.repo.full_name != 'JabRef/jabref') && + (github.event.pull_request.head.repo.full_name != github.repository) && !( (github.event.pull_request.user.login == 'dependabot[bot]') || (github.event.pull_request.user.login == 'renovate-bot') || ( diff --git a/.github/workflows/tests-code.yml b/.github/workflows/tests-code.yml index eff6f42dd1c5..10f4782edc64 100644 --- a/.github/workflows/tests-code.yml +++ b/.github/workflows/tests-code.yml @@ -5,7 +5,7 @@ on: branches: - main - main-release - - stable + - black-forest pull_request: merge_group: workflow_dispatch: diff --git a/.jbang/ChangelogCherryPickMergeDriver.java b/.jbang/ChangelogCherryPickMergeDriver.java index d4a5e036e6b5..25adb9cbcb87 100644 --- a/.jbang/ChangelogCherryPickMergeDriver.java +++ b/.jbang/ChangelogCherryPickMergeDriver.java @@ -14,7 +14,7 @@ //JAVA 25+ //DEPS org.jspecify:jspecify:1.0.0 -/// Git merge driver for `CHANGELOG.md` when a change is ported between `main` and `stable` +/// Git merge driver for `CHANGELOG.md` when a change is ported between `main` and `black-forest` /// (see `.github/workflows/port-to-other-branch.yml`). /// /// [impl->adr~single-stable-branch-with-automatic-ports~1] diff --git a/AGENTS.md b/AGENTS.md index eac3668adde3..3daedb9763a6 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -484,7 +484,7 @@ See [ADR-0000](docs/decisions/0000-use-markdown-architectural-decision-records.m ### Branches -- `main` is the development branch; pull requests target it. `stable` is the last release plus ported fixes; CI labels a PR `dev: into-stable` when it links a bug issue (maintainers may add or remove the label by hand) and ports it after the merge. Never add that label to a port PR (`port--to-`). See [docs/contributing.md](docs/contributing.md#branching-strategy). +- `main` is the development branch; pull requests target it. `black-forest` in JabRef/jabref-black-forest is the last release plus ported fixes; CI labels a PR `dev: send-to-black-forest` when it links a bug issue (maintainers may add or remove the label by hand) and ports it after the merge. Never add that label to a port PR (`port--to-`). See [docs/contributing.md](docs/contributing.md#branching-strategy). ### Commits diff --git a/GitVersion.yml b/GitVersion.yml index 134478574fa3..d3dc46c3a252 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -17,3 +17,10 @@ branches: # (v6.0-alpha.6 + 956 commits reached 34956, hence 50000 for beta). Stay below 60000: GitVersion always uses that for a stable release. # Ignored while `label` is empty. pre-release-weight: 50000 + # Release branch of JabRef/jabref-black-forest; that repository has no `main`, so pull requests there need it as a source + black-forest: + regex: ^(black-forest|gh-readonly-queue/black-forest/.*)$ + label: '' + is-main-branch: true + pull-request: + source-branches: [main, black-forest] diff --git a/docs/contributing.md b/docs/contributing.md index c91cd16d40e9..bad77c55417f 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -7,32 +7,33 @@ Please head to our [contributing guide in the main repository](https://github.co ## Branching strategy -JabRef has two long-lived branches (see [ADR-0073](decisions/0073-single-stable-branch-with-automatic-ports.md)): +JabRef has two long-lived branches in two repositories (see [ADR-0073](decisions/0073-single-stable-branch-with-automatic-ports.md)): - `main` is the development branch. Every pull request targets `main`, unless the change only makes sense for the released version. -- `stable` is the last regular release plus the fixes ported to it. Releases are tagged on `stable`. It is a [long-lived release branch](https://martinfowler.com/articles/branching-patterns.html#long-lived-release-branch) in the terms of Martin Fowler's branching patterns; fixes are made on `main` and cherry-picked, as the [hotfix branch](https://martinfowler.com/articles/branching-patterns.html#hotfix-branch) pattern recommends. +- `black-forest` in [JabRef/jabref-black-forest](https://github.com/JabRef/jabref-black-forest) is the last regular release plus the fixes ported to it. Releases are tagged on `black-forest`. It is a [long-lived release branch](https://martinfowler.com/articles/branching-patterns.html#long-lived-release-branch) in the terms of Martin Fowler's branching patterns; fixes are made on `main` and cherry-picked, as the [hotfix branch](https://martinfowler.com/articles/branching-patterns.html#hotfix-branch) pattern recommends. ### Getting a fix into the released version -Open the pull request against `main` as usual. CI adds the label `dev: into-stable` when the pull request links an issue of type "bug": at creation, or when an edit of the description newly links one. Maintainers add or remove the label by hand when the fix should or should not reach users before the next regular release; CI never overrides that decision (a push does not re-add the label). +Open the pull request against `main` as usual. CI adds the label `dev: send-to-black-forest` when the pull request links an issue of type "bug": at creation, or when an edit of the description newly links one. Maintainers add or remove the label by hand when the fix should or should not reach users before the next regular release; CI never overrides that decision (a push does not re-add the label). The label triggers two things: -1. The check "Would merge into the other branch" simulates the port. If it fails, the fix conflicts with `stable`; resolve that before or after the merge, as described below. -2. After the merge, CI ([korthout/backport-action](https://github.com/korthout/backport-action)) cherry-picks the change into a pull request `[Port to stable] ...` from the branch `port--to-stable`. A clean port carries the `automerge` label and merges once CI passes. A conflicting port is opened as a draft whose commit contains the conflicting files with Git's conflict markers (`<<<<<<<`, `=======`, `>>>>>>>`) left in, so the diff shows exactly what needs resolving; the workflow run of the original pull request fails. +1. The check "Would merge into the other branch" simulates the port. If it fails, the fix conflicts with `black-forest`; resolve that before or after the merge, as described below. +2. After the merge, CI ([korthout/backport-action](https://github.com/korthout/backport-action)) cherry-picks the change into a pull request `[Port to black-forest] ...` in JabRef/jabref-black-forest from the branch `port--to-black-forest`. A clean port carries the `automerge` label and merges once CI passes. A conflicting port is opened as a draft whose commit contains the conflicting files with Git's conflict markers (`<<<<<<<`, `=======`, `>>>>>>>`) left in, so the diff shows exactly what needs resolving; the workflow run of the original pull request fails. -A pull request against `stable` is always ported to `main` the same way, so `main` never lacks a fix that users have. +A pull request against `black-forest` is always ported to `main` the same way, so `main` never lacks a fix that users have. -Ports are done for the change as merged, so a port pull request must never be labeled `dev: into-stable` again. +Ports are done for the change as merged, so a port pull request must never be labeled `dev: send-to-black-forest` again. ### Resolving a conflicting port ```bash -git fetch origin -git switch port--to-stable +git remote add black-forest https://github.com/JabRef/jabref-black-forest.git # once +git fetch black-forest +git switch -c port--to-black-forest black-forest/port--to-black-forest # resolve the conflict markers, then git add -A && git commit -git push -gh pr ready +git push black-forest HEAD +gh pr ready --repo JabRef/jabref-black-forest ``` `CHANGELOG.md` rarely conflicts: the port merges the added and removed entries of `## [Unreleased]` on entry level. @@ -40,13 +41,15 @@ Add the changelog entry once, in the branch the pull request targets; do not add ### Releases (maintainers) -- Regular release: prepare `CHANGELOG.md` on `main` as before (rename `## [Unreleased]` to the version and add a fresh `## [Unreleased]`), then merge `main` into `stable` and tag on `stable`. Always take `main`'s `CHANGELOG.md` in that merge; the union merge attribute would otherwise combine both unreleased blocks silently instead of reporting a conflict: +- Regular release: prepare `CHANGELOG.md` on `main` as before (rename `## [Unreleased]` to the version and add a fresh `## [Unreleased]`), then merge `main` into `black-forest` and tag on `black-forest`. Always take `main`'s `CHANGELOG.md` in that merge; the union merge attribute would otherwise combine both unreleased blocks silently instead of reporting a conflict: ```bash - git switch stable - git merge --no-commit main - git checkout main -- CHANGELOG.md + git fetch black-forest + git switch -c black-forest black-forest/black-forest + git merge --no-commit origin/main + git checkout origin/main -- CHANGELOG.md git commit + git push black-forest black-forest ``` -- Hotfix release: on `stable`, rename `## [Unreleased]` to the version, tag, and re-add an empty `## [Unreleased]`. The port of that commit to `main` conflicts by design: insert the version section below `main`'s `## [Unreleased]` and remove the ported entries from it. +- Hotfix release: on `black-forest`, rename `## [Unreleased]` to the version, tag, and re-add an empty `## [Unreleased]`. The port of that commit to `main` conflicts by design: insert the version section below `main`'s `## [Unreleased]` and remove the ported entries from it. diff --git a/docs/decisions/0073-single-stable-branch-with-automatic-ports.md b/docs/decisions/0073-single-stable-branch-with-automatic-ports.md index 200264603ff0..9ab4bee1e2d2 100644 --- a/docs/decisions/0073-single-stable-branch-with-automatic-ports.md +++ b/docs/decisions/0073-single-stable-branch-with-automatic-ports.md @@ -35,20 +35,20 @@ How do we ship a fix for the current release without shipping the development st Chosen option: "A single `stable` branch, ports driven by a label and done by CI", because it isolates releases from `main` with one branch and keeps the contributor workflow unchanged: a pull request still targets `main`; a label decides whether the change also reaches the release. * `main` is the development branch. Every pull request targets `main` unless the change only makes sense for the released version. -* `stable` is the last regular release plus the fixes ported to it. A regular release merges `main` into `stable` (taking `main`'s `CHANGELOG.md` as a whole, since the union merge attribute would combine both unreleased blocks without a conflict) and tags on `stable`; a hotfix release tags `stable` as it is. In the terms of Martin Fowler's [branching patterns](https://martinfowler.com/articles/branching-patterns.html), `stable` is a [long-lived release branch](https://martinfowler.com/articles/branching-patterns.html#long-lived-release-branch), and a fix follows the [hotfix branch](https://martinfowler.com/articles/branching-patterns.html#hotfix-branch) recommendation: it is made on the [mainline](https://martinfowler.com/articles/branching-patterns.html#mainline) and cherry-picked to the release branch. -* A pull request into `main` labeled `dev: into-stable` is ported to `stable` after the merge. CI adds the label when the pull request links an issue of type "bug", but only when the link is new (pull request creation, or a description edit that adds it), so a maintainer's manual decision for or against the label is never reverted by a later push. A pull request into `stable` is always ported to `main` after the merge, so `main` never lacks a fix that users have. +* `stable` is the last regular release plus the fixes ported to it. It is the branch `black-forest` of its own repository, [JabRef/jabref-black-forest](https://github.com/JabRef/jabref-black-forest) (a fork of JabRef/jabref), so that port pull requests, their CI runs, and release builds stay out of the main repository, and the branch gets its own rules without touching `main`'s. A regular release merges `main` into `black-forest` (taking `main`'s `CHANGELOG.md` as a whole, since the union merge attribute would combine both unreleased blocks without a conflict) and tags on `black-forest`; a hotfix release tags `black-forest` as it is. In the terms of Martin Fowler's [branching patterns](https://martinfowler.com/articles/branching-patterns.html), `black-forest` is a [long-lived release branch](https://martinfowler.com/articles/branching-patterns.html#long-lived-release-branch), and a fix follows the [hotfix branch](https://martinfowler.com/articles/branching-patterns.html#hotfix-branch) recommendation: it is made on the [mainline](https://martinfowler.com/articles/branching-patterns.html#mainline) and cherry-picked to the release branch. +* A pull request into `main` labeled `dev: send-to-black-forest` is ported to `black-forest` after the merge. CI adds the label when the pull request links an issue of type "bug", but only when the link is new (pull request creation, or a description edit that adds it), so a maintainer's manual decision for or against the label is never reverted by a later push. A pull request into `black-forest` is always ported to `main` after the merge, so `main` never lacks a fix that users have. * Before the merge, the port is simulated as a required check ("Would merge into the other branch", which also reports on the merge queue's commit), so a conflict is visible on the pull request itself. After the merge, CI cherry-picks the squash commit into a port pull request using [korthout/backport-action](https://github.com/korthout/backport-action), which auto-merges when CI passes. If the cherry-pick conflicts, the port pull request is opened as a draft whose commit contains the conflicting files with Git's conflict markers left in, and the workflow run fails: a maintainer resolves the markers in that pull request. * `CHANGELOG.md` keeps one `## [Unreleased]` section per branch. heylogs rejects a second unreleased section on `main` in every spelling (`unique-release` for a duplicate `[Unreleased]`, `date-displayed` for a variant such as `[Unreleased (stable)]`), and it would only mirror what `stable`'s own changelog already shows. A changelog entry is written once, in the branch the pull request targets; the port carries it over with a merge driver that applies the added and removed entries of `## [Unreleased]` on entry level (`.jbang/ChangelogCherryPickMergeDriver.java`). A plain cherry-pick would always conflict there, because the neighbouring entries differ between the branches. -* When a hotfix release renames `## [Unreleased]` to a version on `stable`, the port of that commit conflicts on `main` by design and is resolved by hand: the version section is inserted below `main`'s `## [Unreleased]`, and the ported entries are removed from it. +* When a hotfix release renames `## [Unreleased]` to a version on `black-forest`, the port of that commit conflicts on `main` by design and is resolved by hand: the version section is inserted below `main`'s `## [Unreleased]`, and the ported entries are removed from it. ### Consequences * Good, because the released version can be fixed and re-released within hours, from a branch whose only changes since the release are the ported fixes. * Good, because a contributor does nothing new; bug fixes get the label automatically, and maintainers correct it with one click. * Good, because the conflict check turns "will this fix still apply to the release?" into a question answered before the merge. -* Bad, because a change that conflicts needs a maintainer to resolve the port pull request, and until then `stable` lacks the fix. -* Bad, because `stable` only serves the latest regular release; older releases (JabRef 5 while 6 is current) get no fixes. This is the current situation, so nothing is lost. -* Bad, because the branch protection of `main` (required checks, merge queue, auto-merge) has to be duplicated for `stable` in the repository settings. +* Bad, because a change that conflicts needs a maintainer to resolve the port pull request, and until then `black-forest` lacks the fix. +* Bad, because `black-forest` only serves the latest regular release; older releases (JabRef 5 while 6 is current) get no fixes. This is the current situation, so nothing is lost. +* Bad, because the branch protection of `main` (required checks, merge queue, auto-merge) has to be set up again for `black-forest` in the other repository, and the automation there needs the same tokens. ### Confirmation @@ -88,9 +88,12 @@ The fix is made on the release branch and merged forward, the approach Fowler de Setting up the branch (once, by an administrator): -1. Create `stable` at the next regular release from the release commit on `main`: `git push origin :refs/heads/stable`. The workflows, the composite action, and the merge driver must be present on `stable`, because `pull_request_target` runs the workflow of the base branch; an older release tag lacks them, so creating `stable` from it requires porting this infrastructure by hand first. Then re-add an empty `## [Unreleased]` section to its `CHANGELOG.md`. -2. Copy the branch protection of `main` to `stable`: the same required status checks, the merge queue, and "Allow auto-merge". Without it, the `automerge` label on a clean port pull request has nothing to wait for and GitHub refuses to enable auto-merge. -3. Create the label `dev: into-stable`. +1. Fork JabRef/jabref as JabRef/jabref-black-forest and create `black-forest` there from the release commit on `main`: `git push :refs/heads/black-forest`. The workflows, the composite action, and the merge driver must be present on `black-forest`, because `pull_request_target` runs the workflow of the base branch; an older release tag lacks them, so creating the branch from it requires porting this infrastructure by hand first. Then re-add an empty `## [Unreleased]` section to its `CHANGELOG.md`. +2. Protect `black-forest` like `main`: required status checks, the merge queue, and "Allow auto-merge". Without it, the `automerge` label on a clean port pull request has nothing to wait for and GitHub refuses to enable auto-merge. +3. Give jabref-machine write access to the fork and store both tokens there as well (`GH_TOKEN_JABREF_MACHINE_PR_APPROVE`, `GH_TOKEN_UPDATE_GRADLE_WRAPPER`): the port job pushes to and opens pull requests in the other repository, which `GITHUB_TOKEN` cannot, and `on-pr-labeled.yml` enables auto-merge with the second token. Allow GitHub Actions to approve pull requests in the fork's Actions settings, since github-actions[bot] approves the ports. +4. Clone the labels of JabRef/jabref to the fork (`gh label clone JabRef/jabref -R JabRef/jabref-black-forest`) and create `dev: send-to-black-forest` in JabRef/jabref. + +Until 2026-10-27, the branch was `stable` in JabRef/jabref itself; it moved to the separate repository to keep the ports out of the main repository's pull request list. The maintainer workflow is documented in [Branching strategy](https://devdocs.jabref.org/contributing.html#branching-strategy). diff --git a/docs/requirements/ci.md b/docs/requirements/ci.md index 6c61e1a851cf..2ab008900a9a 100644 --- a/docs/requirements/ci.md +++ b/docs/requirements/ci.md @@ -13,9 +13,9 @@ Workflows that run in `pull_request_target` context must not write attacker-cont A pull request referencing an issue pins that issue and assigns its author only if the author is one of the issue's assignees or the issue has none. Otherwise the pull request author is warned once on the pull request, the issue receives one note per pull request, and the incident is recorded per GitHub login in the `STRANGE_USERS` repository secret. The pull request that causes an author's third recorded incident is closed automatically; earlier incidents do not affect pull requests that follow the policy. -## CI workflow must port eligible merged pull requests between main and stable +## CI workflow must port eligible merged pull requests between main and black-forest `req~ci.port-to-other-branch.label-driven-ports~1` -A pull request into `main` that carries the label `dev: into-stable`, and every pull request into `stable`, is checked before the merge for whether its squashed change applies to the other branch; a conflict fails the check. After the merge, the change is cherry-picked into a port pull request against the other branch. A clean port is auto-merged once CI passes; a conflicting port is opened as a draft whose commit contains the conflicting files with Git's conflict markers left in, and the run fails. Port pull requests themselves are never ported back. The label is added automatically when a pull request into `main` newly links an issue of type "bug" (at creation or by a description edit); it is never added again for a link that was already there, so a manual removal or addition of the label is kept. +A pull request into `main` of JabRef/jabref that carries the label `dev: send-to-black-forest`, and every pull request into `black-forest` of JabRef/jabref-black-forest, is checked before the merge for whether its squashed change applies to the other branch; a conflict fails the check. After the merge, the change is cherry-picked into a port pull request against the other branch in its repository. A clean port is auto-merged once CI passes; a conflicting port is opened as a draft whose commit contains the conflicting files with Git's conflict markers left in, and the run fails. Port pull requests themselves are never ported back. The label is added automatically when a pull request into `main` newly links an issue of type "bug" (at creation or by a description edit); it is never added again for a link that was already there, so a manual removal or addition of the label is kept. diff --git a/skills/developers/jabref-contributor/SKILL.md b/skills/developers/jabref-contributor/SKILL.md index 80cd0e75bdb9..0e92e4c1f802 100644 --- a/skills/developers/jabref-contributor/SKILL.md +++ b/skills/developers/jabref-contributor/SKILL.md @@ -47,8 +47,8 @@ Requires JDK 25+ for Gradle (the wrapper downloads a JDK itself): ## Branches -- `main` is the development branch; pull requests target it. `stable` is the last release plus ported fixes and only receives pull requests for changes that make no sense on `main`. -- CI labels a pull request into `main` with `dev: into-stable` when it links an issue of type "bug"; after the merge, CI ports it to `stable` in a separate port pull request. Maintainers add or remove the label by hand; never add it to a port pull request (`port--to-`). +- `main` is the development branch; pull requests target it. `black-forest` in JabRef/jabref-black-forest is the last release plus ported fixes and only receives pull requests for changes that make no sense on `main`. +- CI labels a pull request into `main` with `dev: send-to-black-forest` when it links an issue of type "bug"; after the merge, CI ports it to `black-forest` in JabRef/jabref-black-forest in a separate port pull request. Maintainers add or remove the label by hand; never add it to a port pull request (`port--to-`). - Add the `CHANGELOG.md` entry once, in the branch the pull request targets; the port carries it over. - Details: .