- Resolved merge conflicts in pkg/io/io.go, pkg/io/local/client.go, and pkg/release/release.go. - Reconciled io.Medium interface with upstream changes (unifying to fs.File for Open). - Integrated upstream validatePath logic into the local medium. - Completed migration of pkg/build and related packages to io.Medium. - Addressed previous code review feedback on MockMedium and TaskfileBuilder.
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
name: Auto Merge
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, reopened, ready_for_review]
|
|
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
auto-merge:
|
|
if: "!github.event.pull_request.draft"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check org membership and enable auto-merge
|
|
uses: actions/github-script@v7
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
|
with:
|
|
script: |
|
|
const { owner, repo } = context.repo;
|
|
const author = context.payload.pull_request.user.login;
|
|
|
|
try {
|
|
await github.rest.orgs.checkMembershipForUser({
|
|
org: owner,
|
|
username: author,
|
|
});
|
|
} catch {
|
|
core.info(`${author} is not an org member — skipping auto-merge`);
|
|
return;
|
|
}
|
|
|
|
await exec.exec('gh', [
|
|
'pr', 'merge', process.env.PR_NUMBER,
|
|
'--auto', '--squash',
|
|
]);
|
|
core.info(`Auto-merge enabled for #${process.env.PR_NUMBER}`);
|