cli/.github/workflows/auto-merge.yml
Snider 1d73209e89 Add Architecture Decision Records (ADRs) (#312)
* docs: add Architecture Decision Records (ADRs)

Established a system for documenting architectural decisions.
- Created docs/adr directory
- Added ADR template (0000-template.md)
- Established ADR process in docs/adr/README.md
- Documented 4 key existing decisions (0001-0004)
- Integrated ADRs into mkdocs.yml and docs/index.md

* docs: add Architecture Decision Records (ADRs)

Established a system for documenting architectural decisions.
- Created docs/adr directory
- Added ADR template (0000-template.md)
- Established ADR process in docs/adr/README.md
- Documented 4 key existing decisions (0001-0004)
- Integrated ADRs into mkdocs.yml and docs/index.md
- Fixed formatting in pkg/io/local/client.go

* docs: add ADRs and fix auto-merge CI

- Added Architecture Decision Records (ADRs) to docs/adr/
- Integrated ADRs into mkdocs.yml and docs/index.md
- Localized .github/workflows/auto-merge.yml to fix "fatal: not a git repository" error in the reusable workflow by adding explicit --repo context.
2026-02-05 03:43:16 +00:00

50 lines
1.7 KiB
YAML

# This workflow is localized from host-uk/.github/.github/workflows/auto-merge.yml@dev
# because the reusable version is currently failing due to missing git context.
# See: https://github.com/host-uk/core/actions/runs/21697467567/job/62570690752
name: Auto Merge
on:
pull_request:
types: [opened, reopened, ready_for_review]
permissions:
contents: write
pull-requests: write
jobs:
merge:
runs-on: ubuntu-latest
steps:
- name: Auto Merge
uses: actions/github-script@v7
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
with:
github-token: ${{ github.token }}
script: |
const author = context.payload.pull_request.user.login;
const association = context.payload.pull_request.author_association;
// Trusted bot accounts (act as org members)
const trustedBots = ['google-labs-jules[bot]'];
const isTrustedBot = trustedBots.includes(author);
// Check author association
const trusted = ['MEMBER', 'OWNER', 'COLLABORATOR'];
if (!isTrustedBot && !trusted.includes(association)) {
core.info(`${author} is ${association} — skipping auto-merge`);
return;
}
await exec.exec('gh', [
'pr', 'merge', process.env.PR_NUMBER,
'--auto',
'--repo', `${context.repo.owner}/${context.repo.repo}`,
'--merge'
], {
env: {
...process.env,
GH_TOKEN: '${{ github.token }}'
}
});
core.info(`Auto-merge enabled for #${process.env.PR_NUMBER}`);