Skip to content

Add CI workflow for PRs and Dependabot auto-merge#10

Merged
mahata merged 3 commits intomainfrom
add-dependabot-automerge
Mar 29, 2026
Merged

Add CI workflow for PRs and Dependabot auto-merge#10
mahata merged 3 commits intomainfrom
add-dependabot-automerge

Conversation

@mahata
Copy link
Copy Markdown
Owner

@mahata mahata commented Mar 29, 2026

Summary

  • Add ci.yml — runs tests, type checks, and build on every pull request, so PRs are validated before merge
  • Add dependabot-automerge.yml — enables auto-merge (squash) for all Dependabot PRs after CI passes

How it works

  1. Dependabot opens a PR with a dependency update
  2. ci.yml runs: npm test, npm run check, npm run build
  3. dependabot-automerge.yml detects the PR is from Dependabot and enables auto-merge
  4. Once CI passes, GitHub automatically merges the PR

Required repo settings

For auto-merge to work, you need to configure these in GitHub repo settings:

  1. Settings > General > Pull Requests — enable "Allow auto-merge"
  2. Settings > Rules > Rulesets (or Branch protection) — require the test status check to pass on main

- Add ci.yml: runs tests, type checks, and build on every pull request
- Add dependabot-automerge.yml: enables auto-merge for Dependabot PRs
  after CI passes
Copilot AI review requested due to automatic review settings March 29, 2026 12:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds GitHub Actions automation to validate pull requests via CI and to automatically enable auto-merge for Dependabot-authored dependency update PRs after checks pass.

Changes:

  • Introduce a PR-triggered CI workflow running tests, type checks, and build.
  • Add a Dependabot-only workflow that enables GitHub auto-merge (squash) on Dependabot PRs.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/ci.yml New PR CI workflow running npm test, npm run check, and npm run build.
.github/workflows/dependabot-automerge.yml New workflow to enable auto-merge for Dependabot PRs using gh pr merge --auto --squash.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/dependabot-automerge.yml Outdated
Comment thread .github/workflows/dependabot-automerge.yml Outdated
mahata and others added 2 commits March 29, 2026 21:34
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@mahata mahata merged commit 7f73e43 into main Mar 29, 2026
2 checks passed
@mahata mahata deleted the add-dependabot-automerge branch March 29, 2026 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants