File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,12 +28,19 @@ jobs:
2828 GH_TOKEN : ${{ steps.otelbot-token.outputs.token }}
2929 PR_NUMBER : ${{ github.event.pull_request.number }}
3030 REPO : ${{ github.repository }}
31+ HEAD_REF : ${{ github.event.pull_request.head.ref }}
3132 run : |
3233 MARKER="<!-- api-change-detector -->"
3334
34- # Get list of apidiff files changed in this PR
35- api_files=$(gh api "repos/${REPO}/pulls/${PR_NUMBER}/files" --paginate \
36- --jq '.[] | select(.filename | startswith("docs/apidiffs/current_vs_latest/")) | .filename')
35+ # Get list of apidiff files changed in this PR.
36+ # otelbot/* PRs (release version bumps, post-release updates) only change the version
37+ # header in apidiff files — treat them as having no API changes so the cleanup path below runs.
38+ if [[ "$HEAD_REF" == otelbot/* ]]; then
39+ api_files=""
40+ else
41+ api_files=$(gh api "repos/${REPO}/pulls/${PR_NUMBER}/files" --paginate \
42+ --jq '.[] | select(.filename | startswith("docs/apidiffs/current_vs_latest/")) | .filename')
43+ fi
3744
3845 # Find existing bot comment (if any)
3946 comment_id=$(gh api "repos/${REPO}/issues/${PR_NUMBER}/comments" --paginate \
You can’t perform that action at this time.
0 commit comments