Bump github/codeql-action from 3.26.9 to 3.26.10 #196
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
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 }} |