Skip to content

ci: Setting up conditional CI runs depending on PR comment trigger #3580

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: develop-2.0.0
Choose a base branch
from

Conversation

michalChrobot
Copy link
Collaborator

@michalChrobot michalChrobot commented Aug 5, 2025

This PR aims to address the issue of "overdoing" the CI tests which due to distribution times often lead to very long wait times.

First thing is that I failed to notice that targets and drafts conditions are configured as separate items in a list (see PR job trigger changes). In our CI, basic triggers in a list are combined with an OR operator, meaning the job will run if any of the conditions are met. This lead to test being executed on draft PRs. What I'm changing is

  1. The REQUIRED check will only look for PR comment triggers which in our case will be either /ci ngo or /ci ignore. You just have to type a comment on the PR with one of those texts to satisfy the required check
  2. This will then trigger our usual PR related CI. If you type /ci ngo then all our usual CI will run. If you will type /ci ignore then no CI will run and your PR will be green. This can be used when you are changing some things (for example .md file) that you are 100% sure won't affect CI nor anything else. Note that /ci ignore comment will indicate that YOU TAKE RESPONSIBILITY AND YOU ACKNOWLEDGE that no testing is needed for your PR. Ofc anything will be detected by our daily CI but I just want to mention that we should be careful with using that option
  3. I added additional thing that if all your changes are inside Documentation~ folder the CI will not run even on /ci ngo command. In the future I will add DOCS spelling validation etc but for now we don't have it so that's the first step

Note that the PR comment check will be REQUIRED for PRs targeting develop, develop-2.0.0 and release/ branches BUT you can still use them on ANY branch to trigger PR testing if you want.
Note that for draft PRs this check will be there as required but the flow should be that you type /ci ngo when you are ready for testing so usually when you move from draft to open state

This change should improve our workflow with CI as well as save some resources for others

Additional stuff

I also used that occasion to remove disable-burst file. We are not using it and I included more advanced version in #3557 so if we ever need it we can reuse that one. Because of that I will remove it to avoid any confusion

Steps after approval

I will modify the required status checks to pass before merging a given PR (you can see that for this PR it awaits Pull request trigger). I will modify it in a way that merging to develop, develop-2.0.0 and release/ branches will REQURE the PR comments check.

Note that PR comments won't work in this PR (so I need to validate it after merging) because the job definition itself does not exist on the pull request's target branch. CI evaluates PR comments against the job definitions present in the target branch, not the source branch of the PR.

This may be a little disruptive (since such change affects all PRs) so I will do it after approval/when merging

Backport

#3581

@michalChrobot michalChrobot self-assigned this Aug 5, 2025
@michalChrobot
Copy link
Collaborator Author

/ci ngo

Copy link
Collaborator

@NoelStephensUnity NoelStephensUnity left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Collaborator

@EmandM EmandM left a comment

Choose a reason for hiding this comment

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

I know I'm a bit late to the conversation, but I think I'd prefer to have everything run by default, and the /ci ignore can ignore all the checks, and then /ci ngo can re-enable the checks. Having to remember to make an extra comment on every PR sounds like it'll frustrate me over time.

@NoelStephensUnity
Copy link
Collaborator

I know I'm a bit late to the conversation, but I think I'd prefer to have everything run by default, and the /ci ignore can ignore all the checks, and then /ci ngo can re-enable the checks. Having to remember to make an extra comment on every PR sounds like it'll frustrate me over time.

@michalChrobot
This is a good point. Can we do this?

@michalChrobot
Copy link
Collaborator Author

hmm, ok, let me see what I can do

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.

3 participants