mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 18:31:13 -05:00
fix indent problem
This commit is contained in:
59
.github/workflows/dependabot-auto-merge.yml
vendored
59
.github/workflows/dependabot-auto-merge.yml
vendored
@@ -1,45 +1,32 @@
|
|||||||
# TODO
|
|
||||||
# repo->Settings->Pull Requests->Check "Allow auto-merge"
|
|
||||||
# Settings-Branches->Add/Edit branch protection rule for main:
|
|
||||||
# Check "Require status checks to pass before merging" and select build workflow (CI pipelilne name like 'build') to make sure PR only merges when it passes
|
|
||||||
|
|
||||||
name: Dependabot Auto-Merge
|
name: Dependabot Auto-Merge
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
types: [opened, synchronize, reopened]
|
types: [opened, synchronize, reopened]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
pull-requests: write # To approve PRs
|
pull-requests: write # To approve PRs
|
||||||
contents: write # to merge PRs
|
contents: write # to merge PRs
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
auto-merge:
|
auto-merge:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.actor == 'dependabot[bot]' # Only dependabot PRs
|
if: github.actor == 'dependabot[bot]' # Only dependabot PRs
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
users: actions/checkout@v4
|
users: actions/checkout@v4
|
||||||
|
|
||||||
- name: Fetch Dependabot metadata
|
- name: Fetch Dependabot metadata
|
||||||
id: metadata
|
id: metadata
|
||||||
uses: dependabot/fetch-metadata@v2
|
uses: dependabot/fetch-metadata@v2
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
# - name: Approve minor updates
|
# use admin to bypass the need for approval, human PRs still need two approvals
|
||||||
# if: steps.metadata.outputs.update-type == 'version-update:semver-minor'
|
- name: Enable auto-merge for minor updates
|
||||||
# run: |
|
if: steps.metadata.outputs.update-type == 'version-update:semver-minor'
|
||||||
# gh pr review "$PR_URL" --approve -b "Auto-approved minor update"
|
run: |
|
||||||
# env:
|
gh pr merge --squash --admin "$PR_URL"
|
||||||
# PR_URL: ${{ github.event.pull_request.html_url }}
|
env:
|
||||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
PR_URL: ${{ github.event.pull_request.html_url }}
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# use admin to bypass the need for approval, human PRs still need two approvals
|
|
||||||
- name: Enable auto-merge for minor updates
|
|
||||||
if: steps.metadata.outputs.update-type == 'version-update:semver-minor'
|
|
||||||
run: |
|
|
||||||
gh pr merge --squash --admin "$PR_URL"
|
|
||||||
env:
|
|
||||||
PR_URL: ${{ github.event.pull_request.html_url }}
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user