Commit 018f155
fix(ci): reuse existing open docs PR instead of creating duplicates (#1461)
* fix(ci): reuse existing open docs PR instead of creating duplicates
The release workflow now checks for an existing open "regenerate API
documentation" PR before creating a new one. If found, it pushes new
docs changes to that PR's branch instead of spawning a duplicate.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(ci): address review findings in docs PR reuse logic
- Use git checkout -B to reset branch to current HEAD (avoids dirty
working tree conflict and keeps freshly generated docs)
- Use --force-with-lease for push since branch history is rewritten
- Guard git commit with diff --cached --quiet for no-change case
- Handle gh pr list failure gracefully with fallback to new PR
- Narrow PR search with --author and in:title filters
- Use separate CREATE_PR variable instead of dual-purpose state
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 1e69dd6 commit 018f155
1 file changed
Lines changed: 25 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
55 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
56 | 71 | | |
57 | | - | |
| 72 | + | |
58 | 73 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
64 | 81 | | |
65 | 82 | | |
66 | 83 | | |
| |||
0 commit comments