Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ permissions:
pull-requests: write
contents: write

concurrency:
group: dependabot-auto-merge-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
dependabot:
runs-on: ubuntu-latest
Expand All @@ -18,6 +22,24 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Sync Dependabot branch with main when behind
if: |
startsWith(steps.metadata.outputs.dependency-type, 'direct') &&
steps.metadata.outputs.update-type != 'version-update:semver-major' &&
(
steps.metadata.outputs.update-type == 'version-update:semver-patch' ||
steps.metadata.outputs.update-type == 'version-update:semver-minor' ||
steps.metadata.outputs.update-type == ''
)
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
STATUS=$(gh pr view "$PR_NUMBER" --json mergeStateStatus -q .mergeStateStatus)
if [ "$STATUS" = "BEHIND" ]; then
gh pr update-branch "$PR_NUMBER"
fi

- name: Enable auto-merge for direct patch/minor updates
if: |
startsWith(steps.metadata.outputs.dependency-type, 'direct') &&
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ This repository is set up for long periods without manual maintenance: Dependabo
|----------|------|----------------|
| **CI** | `.github/workflows/ci.yml` | Every push and PR to `main` — `npm ci`, TypeScript, ESLint, Jest (`build-and-test`) |
| **Build Android APK** | `.github/workflows/android-build.yml` | After merge to `main` only (path filters; skips docs/Gemfile-only/.github-only changes); manual dispatch |
| **Dependabot auto-merge** | `.github/workflows/dependabot-auto-merge.yml` | Dependabot PRs — enables auto-merge for **direct** patch/minor updates after checks pass |
| **Dependabot auto-merge** | `.github/workflows/dependabot-auto-merge.yml` | Dependabot PRs — syncs branch with `main` if behind, then enables auto-merge for **direct** patch/minor updates when checks pass |
| **CodeQL** | `.github/workflows/codeql.yml` | Push/PR to `main` and weekly schedule — security analysis for JavaScript/TypeScript |

### Download a release APK from CI
Expand Down
Loading