- Resolved merge conflicts with latest dev branch. - Restored Medium abstraction in pkg/cli/daemon.go and context checks in pkg/container/linuxkit.go. - Refactored pkg/repos/registry.go to be truly medium-agnostic (removed filepath.Abs). - Updated pkg/cli/daemon_test.go to use MockMedium. - Verified all builds and tests pass locally.
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}`);
|