Add regex matching to no-commit-to-branch hook by marcjay · Pull Request #376 · pre-commit/pre-commit-hooks · GitHub
Skip to content

Add regex matching to no-commit-to-branch hook - #376

Merged
asottile merged 6 commits into
pre-commit:masterfrom
marcjay:no-commit-to-branch-wildcard
Apr 20, 2019
Merged

asottile merged 6 commits into
pre-commit:masterfrom
marcjay:no-commit-to-branch-wildcard

Conversation

@marcjay

@marcjay marcjay commented Apr 9, 2019

Copy link
Copy Markdown
Contributor

Add wildcard matching to no-commit-to-branch hook, so that commits can be blocked on, for example, all release branches with 'release/*'

Addresses: #375

be blocked on, for example, all release branches with 'release/*'
feedback. Adds --pattern optional argument which can be used alongside
--branch to block commits to a branch which matches a supplied
regex expression
@marcjay marcjay changed the title Add wildcard matching to no-commit-to-branch hook Add regex matching to no-commit-to-branch hook Apr 20, 2019

@asottile asottile left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

otherwise looks great, thanks!

Comment thread pre_commit_hooks/no_commit_to_branch.py Outdated
mjay-taskize and others added 2 commits April 20, 2019 23:07
in no-commit-to-branch. Make other sets immutable to satisfy type-checking
and be consistent
@asottile

Copy link
Copy Markdown
Member

@marcjay

marcjay commented Apr 20, 2019

Copy link
Copy Markdown
Contributor Author

Thanks! Appreciate the crash-course in mypy and cheers for fixing

@asottile
asottile merged commit e6e26c3 into pre-commit:master Apr 20, 2019
@asottile

Copy link
Copy Markdown
Member

@marcjay
marcjay deleted the no-commit-to-branch-wildcard branch April 21, 2019 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants