|
19 | 19 | id: check_workflows
|
20 | 20 | run: |
|
21 | 21 | # Get all running workflows except this one
|
22 |
| - running_workflows=$(gh run list --status in_progress --json workflowName,name --jq '.[].name' | grep -v "Auto Merge Approved PRs" | wc -l) |
| 22 | + running_workflows=$(gh run list --status in_progress --json workflowName,name --repo "$GITHUB_REPOSITORY" --jq '.[].name' | grep -v "Auto Merge Approved PRs" | wc -l) |
23 | 23 | echo "running_workflows=$running_workflows" >> $GITHUB_OUTPUT
|
24 | 24 |
|
25 | 25 | if [ "$running_workflows" -gt 0 ]; then
|
|
43 | 43 | echo "Looking for PRs with exact comment 'bot merge please' from $authorized_user..."
|
44 | 44 |
|
45 | 45 | # Get all open PRs
|
46 |
| - prs=$(gh pr list --state open --json number,title,url) |
| 46 | + prs=$(gh pr list --state open --json number,title,url --repo "$GITHUB_REPOSITORY") |
47 | 47 |
|
48 | 48 | if [ "$prs" = "[]" ]; then
|
49 | 49 | echo "No open PRs found."
|
|
65 | 65 | echo "Checking PR #$pr_number: $pr_title"
|
66 | 66 |
|
67 | 67 | # Get all comments for this PR
|
68 |
| - comments=$(gh pr view "$pr_number" --json comments --jq '.comments[]') |
| 68 | + comments=$(gh pr view "$pr_number" --json comments --jq '.comments[]' --repo "$GITHUB_REPOSITORY") |
69 | 69 |
|
70 | 70 | # Print all comment authors for debugging
|
71 | 71 | echo "Comments in PR #$pr_number:"
|
|
94 | 94 | echo "Attempting to merge PR #$pr_number..."
|
95 | 95 |
|
96 | 96 | # Check if PR can be merged
|
97 |
| - pr_mergeable=$(gh pr view "$pr_number" --json mergeable --jq '.mergeable') |
| 97 | + pr_mergeable=$(gh pr view "$pr_number" --json mergeable --jq '.mergeable' --repo "$GITHUB_REPOSITORY") |
98 | 98 |
|
99 | 99 | if [ "$pr_mergeable" = "MERGEABLE" ]; then
|
100 | 100 | # Merge the PR (specify repo explicitly since we're not in a git directory)
|
|
0 commit comments