Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 29, 2025

Copilot agents cannot view push workflow results during development, making those runs wasteful. This change skips push-triggered workflows when the actor is github-copilot[bot] while preserving pull_request workflows that Copilot can see.

Changes:

  • Add conditional to main.yml CI job: if: ${{ github.event_name == 'pull_request' || github.actor != 'github-copilot[bot]' }}

Behavior:

  • ✅ Pull request workflows run for all PRs (including Copilot's)
  • ✅ Push workflows run for human developers
  • ⏭️ Push workflows skipped for Copilot commits

Note: The copilot-setup-steps.yml workflow is intentionally left unchanged as it serves a special purpose.

Original prompt

This section details on the original issue you should resolve

<issue_title>Only run pull_request workflows on Copilot tasks</issue_title>
<issue_description>The CI workflow(s) runs on each pushed commit and each pull request. The pull request runs are necessary because they run on the result of merging the pull request, while the push runs are useful during development and drafts. However, the Copilot Agent cannot start workflows without human permission, so it can't see the result of push runs during development. That makes the push runs pretty much useless to the agent. When the author of the pull request is Copilot, any on: push workflows should be skipped and only the on: pull_request workflow should be executed. This should free up a lot of wasted CI resources.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI self-assigned this Oct 29, 2025
Co-authored-by: jackfirth <8175575+jackfirth@users.noreply.github.com>
Copilot AI changed the title [WIP] Only run pull_request workflows for Copilot tasks Skip push workflows for Copilot PRs Oct 29, 2025
Copilot AI requested a review from jackfirth October 29, 2025 01:30
Copy link
Owner

@jackfirth jackfirth left a comment

Choose a reason for hiding this comment

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

@coveralls
Copy link

coveralls commented Oct 29, 2025

Pull Request Test Coverage Report for Build #34

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.003%) to 93.314%

Totals Coverage Status
Change from base Build #23: -0.003%
Covered Lines: 14292
Relevant Lines: 15316

💛 - Coveralls

…tion in main.yml

Co-authored-by: jackfirth <8175575+jackfirth@users.noreply.github.com>
@jackfirth jackfirth marked this pull request as ready for review October 29, 2025 02:46
@jackfirth jackfirth enabled auto-merge (squash) October 29, 2025 02:47
@jackfirth jackfirth merged commit c5e22b9 into master Oct 29, 2025
2 checks passed
@jackfirth jackfirth deleted the copilot/skip-push-workflows-for-copilot branch October 29, 2025 02:59
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.

Only run pull_request workflows on Copilot tasks

3 participants