Skip to content

build(deps-dev): Bump @commitlint/cli from 17.6.1 to 17.6.3 #425

build(deps-dev): Bump @commitlint/cli from 17.6.1 to 17.6.3

build(deps-dev): Bump @commitlint/cli from 17.6.1 to 17.6.3 #425

Workflow file for this run

# Approve Pull Request
#
# Automatically approve a pull request when a review is requested from @flexdevelopment by certain
# users.
#
# References:
#
# - https://cli.github.com/manual/gh_pr_review
# - https://docs.github.com/actions/learn-github-actions/contexts
# - https://docs.github.com/actions/learn-github-actions/expressions
# - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#pull_request
# - https://docs.github.com/actions/using-workflows/using-github-cli-in-workflows
# - https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions
# - https://docs.github.com/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request
# - https://github.com/actions/checkout
# - https://github.com/dependabot/fetch-metadata
# - https://github.com/hmarr/debug-action
---
name: approve-pr
on:
pull_request:
types:
- review_requested
env:
GITHUB_TOKEN: ${{ secrets.PAT_BOT }}
jobs:
approve-pr:
runs-on: ubuntu-latest
steps:
- id: debug
name: Print environment variables and event payload
uses: hmarr/debug-action@v2.1.0
- id: dependabot-metadata
name: Fetch dependabot metadata
if: github.actor == 'dependabot[bot]'
uses: dependabot/fetch-metadata@v1.4.0
with:
skip-commit-verification: true
- id: checkout
name: Checkout ${{ github.head_ref }}
uses: actions/checkout@v3.5.2
with:
persist-credentials: false
ref: ${{ github.head_ref }}
- id: requested-reviewers
name: Get requested reviewers
run: |
echo "result=${{ join(github.event.pull_request.requested_reviewers.*.login, ',') }}" >>$GITHUB_OUTPUT
- id: approve
name: Approve pull request
if: |
contains(steps.requested-reviewers.outputs.result, 'flexdevelopment')
&& (github.actor == 'dependabot[bot]' || github.actor == 'unicornware')
&& steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major'
run: gh pr review ${{ github.event.number }} --approve --body 'lgtm 👍🏾'