Skip to content

New pagination

New pagination #1

name: Automate Dependabot Pull Requests
on:
pull_request:
types: [opened]
branches:
- main
jobs:
label-and-assign:
runs-on: ubuntu-latest
steps:
- name: Check if PR is from Dependabot
uses: actions/github-script@v5
with:
script: |
const isDependabot = context.payload.pull_request.user.login === 'dependabot-preview[bot]';
console.log('Is Dependabot PR:', isDependabot);
return { isDependabot };
- name: Apply labels and assignees
if: steps.check-if-dependabot.outputs.isDependabot
uses: actions/github-script@v5
with:
script: |
await github.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: ['Dependabot: Patch']
});
token: ${{ secrets.GH_TOKEN }}