Skip to content

Bump github/codeql-action from 3.26.9 to 3.26.10 #196

Bump github/codeql-action from 3.26.9 to 3.26.10

Bump github/codeql-action from 3.26.9 to 3.26.10 #196

name: pre-commit-ci-auto-merge
on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
jobs:
auto-merge:
runs-on: ubuntu-latest
if: github.actor == 'pre-commit-ci[bot]'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Auto merge PR
uses: actions/github-script@v7
with:
script: |
const prNumber = context.issue.number;
const repoOwner = context.repo.owner;
const repoName = context.repo.repo;
// Create a pull request review and approve it
await github.rest.pulls.createReview({
owner: repoOwner,
repo: repoName,
pull_number: prNumber,
event: 'APPROVE'
});
// Merge the pull request
await github.rest.pulls.merge({
owner: repoOwner,
repo: repoName,
pull_number: prNumber,
merge_method: 'squash' // You can change this to 'merge' or 'rebase'
});
github-token: ${{ secrets.AUTO_MERGE_JSON2GRAPH_PRE_COMMIT_CI }}