Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 22 additions & 9 deletions .github/workflows/release-draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,18 +147,24 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
run: |
gh issue edit ${{ github.event.pull_request.number }} \
--repo "$GITHUB_REPOSITORY" \
--add-label "breaking-change-analyzed"
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
"/repos/$GITHUB_REPOSITORY/issues/${{ github.event.pull_request.number }}/labels" \
-f labels[]="breaking-change-analyzed" \
--silent

- name: Add breaking-change label if applicable
if: steps.analysis.outputs.has_breaking_changes == 'true'
env:
GH_TOKEN: ${{ github.token }}
run: |
gh issue edit ${{ github.event.pull_request.number }} \
--repo "$GITHUB_REPOSITORY" \
--add-label "breaking-change"
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
"/repos/$GITHUB_REPOSITORY/issues/${{ github.event.pull_request.number }}/labels" \
-f labels[]="breaking-change" \
--silent

- name: Post analysis result to PR
env:
Expand Down Expand Up @@ -186,9 +192,16 @@ jobs:
printf '*This analysis was performed by Claude Code Action*\n'
} > "$TMPFILE"

gh issue comment ${{ github.event.pull_request.number }} \
--repo "$GITHUB_REPOSITORY" \
--body-file "$TMPFILE"
TMPJSON=$(mktemp)
trap 'rm -f "$TMPFILE" "$TMPJSON"' EXIT
jq -n --rawfile body "$TMPFILE" '{body: $body}' > "$TMPJSON"

gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
"/repos/$GITHUB_REPOSITORY/issues/${{ github.event.pull_request.number }}/comments" \
--input "$TMPJSON" \
--silent

- name: Calculate version and update draft release
env:
Expand Down
Loading