Skip to content

chore: Grant the Claude GitHub bot write permissions #1418

chore: Grant the Claude GitHub bot write permissions

chore: Grant the Claude GitHub bot write permissions #1418

name: Dependabot Dedupe
on:
pull_request:
permissions:
contents: write
pull-requests: write
jobs:
dependabot-dedupe:
runs-on: ubuntu-latest
# Run this job only if it's Dependabot creating or updating the PR
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Check out repo
uses: actions/checkout@v6
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: 20
- name: Install Yarn
run: corepack enable
- name: Restore Yarn cache
uses: actions/setup-node@v6
with:
node-version: 20
cache: yarn
- run: PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 yarn --immutable
- name: Run yarn dedupe
run: |
yarn dedupe
git add yarn.lock
if git diff --staged --quiet; then
echo "No deduplication needed"
else
git commit -m "chore: dedupe yarn.lock"
git push
fi