Skip to content
This repository was archived by the owner on May 16, 2023. It is now read-only.
Open
Show file tree
Hide file tree
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
7 changes: 5 additions & 2 deletions .github/workflows/auto-approve.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Dependabot auto-approve
on: pull_request_target
on: pull_request
permissions:
pull-requests: write
jobs:
Expand All @@ -11,9 +11,12 @@ jobs:
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/[email protected]
- name: Checkout code
uses: actions/checkout@v3
- name: Approve a PR
run: |
if [ "$(gh pr status --json reviewDecision -q .currentBranch.reviewDecision)" == "REVIEW_REQUIRED" ];
gh pr status --json reviewDecision
if [ "$(gh pr status --json reviewDecision -q .currentBranch.reviewDecision)" != "APPROVED" ];
then gh pr review --approve "$PR_URL"
else echo "PR already approved, skipping additional approvals to minimize emails/notification noise.";
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
- name: Build And Deploy
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/gh-pr-status.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Get results of `gh pr status`
on: pull_request
permissions:
pull-requests: write
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
BODY=$(gh pr status --json reviewDecision)
gh pr comment "$PR_URL" -b $BODY
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}