|
29 | 29 |
|
30 | 30 | - name: Merge after 10 minutes if PR matches format |
31 | 31 | env: |
32 | | - GH_TOKEN: ${{ secrets.TAGBOT_PAT }} |
| 32 | + GH_TOKEN: ${{ secrets.AUTOMERGE_PAT }} |
33 | 33 | REPO: ${{ github.repository }} |
34 | 34 | PR_NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }} |
35 | 35 |
|
@@ -61,22 +61,11 @@ jobs: |
61 | 61 |
|
62 | 62 | jq = "[.state, (.draft|tostring), .title, .user.login, .base.ref, .head.ref, .head.repo.full_name, .created_at, .head.sha, (.body // \"\" | @base64)] | @tsv" |
63 | 63 |
|
64 | | - function meta(; retries=3, delay=5) |
65 | | - for attempt in 1:retries |
66 | | - try |
67 | | - f = split(sh(`gh api repos/$repo/pulls/$pr --jq $jq`), '\t'; keepempty=true) |
68 | | - state,draft,title,author,base,head,head_repo,created,sha,body64 = f |
69 | | - body = String(base64decode(body64)) |
70 | | - return (; state,draft,title,author,base,head,head_repo,created,sha,body) |
71 | | - catch e |
72 | | - if attempt < retries |
73 | | - @warn "Failed to fetch PR metadata (attempt $attempt/$retries), retrying in $(delay)s..." exception=e |
74 | | - sleep(delay) |
75 | | - else |
76 | | - rethrow() |
77 | | - end |
78 | | - end |
79 | | - end |
| 64 | + function meta() |
| 65 | + f = split(sh(`gh api repos/$repo/pulls/$pr --jq $jq`), '\t'; keepempty=true) |
| 66 | + state,draft,title,author,base,head,head_repo,created,sha,body64 = f |
| 67 | + body = String(base64decode(body64)) |
| 68 | + return (; state,draft,title,author,base,head,head_repo,created,sha,body) |
80 | 69 | end |
81 | 70 |
|
82 | 71 | function eligible(m) |
|
0 commit comments