Skip to content

Bump github.com/ikawaha/kagome-dict/ipa from 1.0.10 to 1.0.11 #9

Bump github.com/ikawaha/kagome-dict/ipa from 1.0.10 to 1.0.11

Bump github.com/ikawaha/kagome-dict/ipa from 1.0.10 to 1.0.11 #9

name: dependabot-check
on:
pull_request_target:
branches: [main]
paths:
- "go.sum"
- "go.mod"
permissions:
pull-requests: write
contents: write
jobs:
dependabot-auto-merge:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.6.0
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
- uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const ret = await github.rest.issues.listLabelsOnIssue({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number
});
const currentLabels = ret.data.map(label => label.name);
const addLabels = ['change-category/dependency'];
if ('${{ steps.metadata.outputs.update-type }}' == 'version-update:semver-major') {
addLabels.push('change-category/breaking');
}
const labels = currentLabels.concat(addLabels);
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
labels
});
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Approve if PR is patch update
if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-patch' }}
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Approve if PR is minor update
if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-minor' }}
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}