chore(deps): Bump github.com/charmbracelet/bubbletea from 1.1.1 to 1.1.2 #64
Workflow file for this run
This file contains 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
# see https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#enable-auto-merge-on-a-pull-request | |
name: Dependabot auto-merge | |
on: pull_request | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
dependabot: | |
runs-on: ubuntu-latest | |
if: github.actor == 'dependabot[bot]' | |
steps: | |
- name: Dependabot metadata | |
id: metadata | |
uses: dependabot/fetch-metadata@dbb049abf0d677abbd7f7eee0375145b417fdd34 # v2.2.0 | |
with: | |
github-token: "${{ secrets.GITHUB_TOKEN }}" | |
- name: Check whether anyone besides dependabot has pushed | |
id: pr_author | |
run: | | |
EXTRA_AUTHORS=$(gh pr view "$PR_URL" --json commits --jq '.commits[] | .authors[] | .login' | sort | uniq | grep -v dependabot || echo -n '') | |
if [ -n "$EXTRA_AUTHORS" ]; then | |
echo "PR has authors in addition to dependabot: $EXTRA_AUTHORS" | |
echo "human_pushed=true" >> "$GITHUB_OUTPUT" | |
else | |
echo "human_pushed=false" >> "$GITHUB_OUTPUT" | |
fi | |
env: | |
PR_URL: ${{github.event.pull_request.html_url}} | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
- name: Enable auto-merge for Dependabot PRs | |
if: > | |
( steps.pr_author.human_pushed != 'true' ) && | |
( steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor' ) | |
run: gh pr merge --auto --squash "$PR_URL" && gh pr review --approve "$PR_URL" | |
env: | |
PR_URL: ${{github.event.pull_request.html_url}} | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
- name: Disable auto-merge if human modified PR | |
if: steps.pr_author.human_pushed == 'true' | |
run: | | |
echo "disabling auto-merge due to non-dependabot push" | |
gh pr merge --disable-auto "$PR_URL" | |
env: | |
PR_URL: ${{github.event.pull_request.html_url}} | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |