Skip to content

Skip running CI jobs from on-pr.yml if PR is draft - #773

Merged
kmabeeTT merged 2 commits into
mainfrom
kmabee/test_draft_pr
May 15, 2025
Merged

kmabeeTT merged 2 commits into
mainfrom
kmabee/test_draft_pr

Conversation

@kmabeeTT

@kmabeeTT kmabeeTT commented May 14, 2025 •

Copy link
Copy Markdown
Contributor

Ticket

None

Problem

  • I want us to be able to iterate on changes on branch with draft PR without triggering CI, especially for our contractor colleagues.

What's changed

Verification

  • Tested with pushes to this branch while in Draft, no longer triggers CI (jobs marked skipped)
  • Tested with pushes to this branch while not in Draft, triggers CI.
  • Observed that CI launches automatically when transition from Draft to Ready-For-Review

 - Inspired by changes from tt-mlir deployed in Feb
 - Allows us to iterate on changes without CI being triggered
@kmabeeTT
kmabeeTT force-pushed the kmabee/test_draft_pr branch from 2eae2d4 to d9ab422 Compare May 14, 2025 23:49
@kmabeeTT kmabeeTT changed the title Testing Skip running CI jobs from on-pr.yml if PR is draft May 14, 2025
@kmabeeTT
kmabeeTT marked this pull request as ready for review May 14, 2025 23:55
@kmabeeTT

Copy link
Copy Markdown
Contributor Author

Screenshot showing skipps jobs after pushing to this branch while in Draft. Nice!

Screenshot 2025-05-14 at 7 46 46 PM

@codecov-commenter

codecov-commenter commented May 15, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.76%. Comparing base (40384c3) to head (03eba83).
⚠️ Report is 329 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #773      +/-   ##
==========================================
+ Coverage   71.66%   71.76%   +0.09%     
==========================================
  Files          18       18              
  Lines        2580     2603      +23     
==========================================
+ Hits         1849     1868      +19     
- Misses        731      735       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kmabeeTT
kmabeeTT enabled auto-merge (squash) May 15, 2025 04:07

@nsumrakTT nsumrakTT left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think this is necessary.
"Normal" development workflow is to open a draft, check if everything is ok, and then upgrade PR to ready to review.
If for any reason you want to iterate without CI just add:
skip-checks:true
to the end of your commit message. Here is doc how to skip CI with several variants:
https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/skipping-workflow-runs

@nsumrakTT

Copy link
Copy Markdown
Contributor

Alternatively, for contractors we can use same workflow as for community members: CI will not run until someone from the team pushes a button allowing normal PR run.

@kmabeeTT
kmabeeTT merged commit 0683376 into main May 15, 2025
@kmabeeTT
kmabeeTT deleted the kmabee/test_draft_pr branch May 15, 2025 10:34
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.

4 participants