Skip to content

Commit 76f7ebb

Browse files
committed
f
1 parent ab0bc73 commit 76f7ebb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/auto_merge_approved_prs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
id: check_workflows
2020
run: |
2121
# 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)
2323
echo "running_workflows=$running_workflows" >> $GITHUB_OUTPUT
2424
2525
if [ "$running_workflows" -gt 0 ]; then
@@ -43,7 +43,7 @@ jobs:
4343
echo "Looking for PRs with exact comment 'bot merge please' from $authorized_user..."
4444
4545
# 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")
4747
4848
if [ "$prs" = "[]" ]; then
4949
echo "No open PRs found."
@@ -65,7 +65,7 @@ jobs:
6565
echo "Checking PR #$pr_number: $pr_title"
6666
6767
# 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")
6969
7070
# Print all comment authors for debugging
7171
echo "Comments in PR #$pr_number:"
@@ -94,7 +94,7 @@ jobs:
9494
echo "Attempting to merge PR #$pr_number..."
9595
9696
# 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")
9898
9999
if [ "$pr_mergeable" = "MERGEABLE" ]; then
100100
# Merge the PR (specify repo explicitly since we're not in a git directory)

0 commit comments

Comments
 (0)