Bump github.com/go-playground/validator/v10 from 10.27.0 to 10.28.0 #59
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Dependabot reviewer | |
on: pull_request_target | |
permissions: | |
pull-requests: write | |
contents: write | |
issues: write | |
jobs: | |
review-dependabot-pr: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }} | |
steps: | |
- name: Fetch PR Review Status | |
id: pr_review_status | |
run: | | |
review_state=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
"https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews" \ | |
| jq -r '.[-1].state') | |
echo "The latest review state of the PR is: $review_state" | |
echo "::set-output name=state::$review_state" | |
env: | |
GITHUB_TOKEN: ${{ secrets.OZGEN_BOT_TOKEN }} | |
- name: Dependabot metadata | |
if: steps.pr_review_status.outputs.state != 'APPROVED' | |
id: dependabot-metadata | |
uses: dependabot/fetch-metadata@v1.3.1 | |
- name: Enable auto-merge for Dependabot PRs | |
if: steps.pr_review_status.outputs.state != 'APPROVED' | |
run: gh pr merge --auto --merge "$PR_URL" | |
env: | |
PR_URL: ${{github.event.pull_request.html_url}} | |
GITHUB_TOKEN: ${{secrets.OZGEN_BOT_TOKEN}} | |
- name: Approve updates | |
if: steps.pr_review_status.outputs.state != 'APPROVED' | |
run: gh pr review $PR_URL --approve -b "I'm **approving** this pull request because **it includes dependency update**" | |
env: | |
PR_URL: ${{github.event.pull_request.html_url}} | |
GITHUB_TOKEN: ${{secrets.OZGEN_BOT_TOKEN}} |