From 244cdfa6a31ee358ec1380633d92284b0797e332 Mon Sep 17 00:00:00 2001 From: Gregor Zeitlinger Date: Wed, 1 Jul 2026 18:00:14 +0000 Subject: [PATCH 1/2] ci: label breaking api changes from committed diffs Signed-off-by: Gregor Zeitlinger --- .github/workflows/detect-api-changes.yml | 44 ++++++++++++++++++++++-- docs/content/internals/stability.md | 3 +- 2 files changed, 44 insertions(+), 3 deletions(-) diff --git a/.github/workflows/detect-api-changes.yml b/.github/workflows/detect-api-changes.yml index e529e2ec7..4d2b3a211 100644 --- a/.github/workflows/detect-api-changes.yml +++ b/.github/workflows/detect-api-changes.yml @@ -30,6 +30,7 @@ jobs: REPO: ${{ github.repository }} run: | MARKER="" + BREAKING_LABEL="breaking-api-change" api_files=$(gh api "repos/${REPO}/pulls/${PR_NUMBER}/files" --paginate \ --jq '.[] | select(.filename | startswith("docs/apidiffs/current_vs_latest/")) | .filename') @@ -40,6 +41,7 @@ jobs: if [[ -z "$api_files" ]]; then echo "No API diff files changed." gh pr edit "$PR_NUMBER" --repo "$REPO" --remove-label "api-change" 2>/dev/null || true + gh pr edit "$PR_NUMBER" --repo "$REPO" --remove-label "$BREAKING_LABEL" 2>/dev/null || true if [[ -n "$comment_id" ]]; then gh api --method DELETE "repos/${REPO}/issues/comments/${comment_id}" fi @@ -57,7 +59,44 @@ jobs: | sort \ | sed 's/^/- /') - body=$(cat </dev/null || true + + body=$(cat < Date: Thu, 2 Jul 2026 07:01:09 +0000 Subject: [PATCH 2/2] fix: address review feedback on api change labels Signed-off-by: Gregor Zeitlinger --- .github/workflows/detect-api-changes.yml | 2 +- docs/content/internals/stability.md | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/detect-api-changes.yml b/.github/workflows/detect-api-changes.yml index 4d2b3a211..f0de28c7a 100644 --- a/.github/workflows/detect-api-changes.yml +++ b/.github/workflows/detect-api-changes.yml @@ -64,7 +64,7 @@ jobs: while IFS= read -r file; do [[ -z "$file" ]] && continue content=$(gh api \ - -H "Accept: application/vnd.github.raw+json" \ + -H "Accept: application/vnd.github.raw" \ "repos/${REPO}/contents/${file}?ref=${HEAD_SHA}") if grep -Eq '^[[:space:]]*(\*\*\*!|---!|\+\+\+!)' <<<"$content"; then breaking_files+=("$file") diff --git a/docs/content/internals/stability.md b/docs/content/internals/stability.md index e9487c39a..d960c7ffa 100644 --- a/docs/content/internals/stability.md +++ b/docs/content/internals/stability.md @@ -29,4 +29,5 @@ are stored under `docs/apidiffs/`. Pull requests that change `docs/apidiffs/current_vs_latest/` are automatically labeled `api-change` for additional maintainer review. If the committed API diff contains breaking-change -markers, the pull request is also labeled `breaking-api-change`. +markers such as `***!`, `---!`, or `+++!`, the pull request is also labeled +`breaking-api-change`.