Skip to content

feat(github): Allow to skip CI for some commits.#5612

Merged
lotas merged 1 commit intomainfrom
feat/github-skip-commit
Aug 10, 2022
Merged

feat(github): Allow to skip CI for some commits.#5612
lotas merged 1 commit intomainfrom
feat/github-skip-commit

Conversation

@lotas
Copy link
Copy Markdown
Contributor

@lotas lotas commented Aug 8, 2022

For a single commit push event with a message that contains "[skip ci]" or "[ci skip]" no tasks would be created.

Fixes #5311

@lotas
Copy link
Copy Markdown
Contributor Author

lotas commented Aug 8, 2022

This is currently implemented for the "push" events with a single commit in it only.

I'm not sure if we should also support pull requests with titles that includes "[ci skip]" keyword.

@petemoore
Copy link
Copy Markdown
Member

I like it.
It occurs to me it might(?) already be possible to implement this in the .taskcluster.yml via json-e, if there is a way to check if the commit message contains the allowed skip terms via json-e, I guess it could return an empty list of tasks. But I've no idea how that would look in json-e and I think your solution is much easier for users.

One thing I'd like to call out is that in general, interpretation of commit messages is likely to be project-specific, so I think taskgraph is a better place to interpret directives in commit messages for anything else we add, but for the one and only case of skipping tasks, it indeed needs to be either json-e or the taskcluster github service that does this, since taskgraph requires that a task is already running.

@lotas lotas force-pushed the feat/github-skip-commit branch from 5288942 to 62d28de Compare August 9, 2022 13:18
@lotas lotas marked this pull request as ready for review August 9, 2022 13:27
@lotas lotas requested a review from a team as a code owner August 9, 2022 13:27
@lotas lotas requested review from matt-boris and petemoore and removed request for a team August 9, 2022 13:27
For a single commit push event with a message that contains "[skip ci]"
or "[ci skip]" no tasks would be created.

Fixes #5311
@lotas lotas force-pushed the feat/github-skip-commit branch from 62d28de to a5444c7 Compare August 9, 2022 13:32
Copy link
Copy Markdown
Member

@petemoore petemoore left a comment

Choose a reason for hiding this comment

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

Love it, thanks for adding the tests too!

@lotas lotas merged commit 9bbc4d8 into main Aug 10, 2022
@lotas lotas deleted the feat/github-skip-commit branch August 10, 2022 14:53
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.

Add a way to skip CI with github integration when commits contain [ci skip]

2 participants