Skip to content

Run CI on pull requests instead of pushes to main - #12

Merged
imanimanyara merged 1 commit into
mainfrom
ci/pr-only-triggers
Oct 2, 2026
Merged

imanimanyara merged 1 commit into
mainfrom
ci/pr-only-triggers

Conversation

@imanimanyara

Copy link
Copy Markdown
Member

Converts push-to-main CI triggers to pull-request-only CI, per the org rule that changes reach main through a pull request.

  • Removed push: branches: [main] from the affected workflows.
  • Ensured workflow_dispatch is present so a maintainer can re-run by hand.
  • Existing pull_request filters and schedule triggers are unchanged. Tag-driven release workflows are untouched.

CodeQL workflows keep their weekly schedule, which still analyses the default branch.

The org rule is that every change reaches main through a pull request,
so CI belongs on pull_request, where it gates the change before it
lands. A push trigger on main runs after the change has already landed
and re-runs every check a second time when a pull request merges.

Drop the push-to-main trigger and make sure workflow_dispatch is
present so a maintainer can still re-run the workflow by hand. Existing
pull_request filters and any schedule are unchanged; tag-driven release
workflows are untouched.
Copilot AI balanced review requested due to automatic review settings October 2, 2026 10:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The workflow triggers correctly implement the stated policy without altering existing PR filters or schedules.

Review effort: Balanced
Findings: None

What changed in this PR

Updates CI triggers to align with pull-request-only changes to main.

Changes:

  • Removes push-to-main triggers.
  • Adds manual workflow_dispatch triggers.
  • Preserves CodeQL’s weekly schedule.
File Description
.github/​workflows/​codeql.yml Runs CodeQL on PRs, manually, and weekly.
.github/​workflows/​ci.yml Runs CI on PRs or manual dispatch.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@imanimanyara
imanimanyara merged commit 4101d1d into main Oct 2, 2026
20 checks passed
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