Skip to content

fix(deps)(deps-dev): bump @typescript-eslint/parser from 7.18.0 to 8.68.0 in /services/notification #8

fix(deps)(deps-dev): bump @typescript-eslint/parser from 7.18.0 to 8.68.0 in /services/notification

fix(deps)(deps-dev): bump @typescript-eslint/parser from 7.18.0 to 8.68.0 in /services/notification #8

Workflow file for this run

name: Auto-Merge CI-Passing PRs
on:
pull_request_target:
types: [opened, synchronize, reopened]
permissions:
contents: write
pull-requests: write
jobs:
auto-merge:
runs-on: ubuntu-latest
steps:
- name: Enable auto-merge for PRs
uses: actions/github-script@v7
with:
script: |
const pr = context.payload.pull_request;
// Don't auto-merge draft PRs
if (pr.draft) {
console.log('PR is draft, skipping auto-merge');
return;
}
// Don't auto-merge if PR is from the owner (manual merges for maintainers)
if (pr.user.login === context.repo.owner) {
console.log('PR is from repo owner, skipping auto-merge');
return;
}
try {
await github.rest.pulls.merge({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: pr.number,
merge_method: 'squash'
});
console.log(`PR #${pr.number} merged successfully`);
} catch (error) {
// If merge fails (conflicts, checks not passing), enable auto-merge
if (error.status === 405 || error.status === 422) {
try {
await github.graphql(`
mutation ($id: ID!, $method: PullRequestMergeMethod!) {
enablePullRequestAutoMerge(input: { pullRequestId: $id, mergeMethod: $method }) {
pullRequest { number }
}
}
`, {
id: pr.node_id,
method: 'SQUASH'
});
console.log(`Auto-merge enabled for PR #${pr.number}`);
} catch (graphqlError) {
console.log(`Could not enable auto-merge: ${graphqlError.message}`);
}
} else {
console.log(`Unexpected error: ${error.message}`);
}
}