b12k / branch-name-lint Goto Github PK
View Code? Open in Web Editor NEWFlexible git branch name linter with some extra validating features
License: MIT License
Flexible git branch name linter with some extra validating features
License: MIT License
We found this package that works for validating branch names at the developer workstation via a git hook.
However we also want to enforce the branch name inside a Github Workflow running with the pull_request
event.
In that context, the library is not able to successfully get the name of the branch (I think to have found that uses this git command: git rev-parse --abbrev-ref HEAD
), getting something like HEAD instead of the name of the branch being merged.
That name comes in the workflow variable github.head_ref
but I have not found a way to inject that name into the library.
Can you think of a way that the name of the branch name can be successfully detected in different scenarios/injected via the command line?
Thanks in advance
If i want to allow push to develop branch, how can i configure the regular expression?.
i'm using
module.exports = {
pattern: ':type/:user/:month/:name',
params: {
type: ['feature', 'fix', 'docs', 'misc', 'improve', 'introduce'],
user: ['[a-z0-9-]+\\.[a-z0-9-]+'],
month: ['\\d{4}-\\d{2}'],
name: ['[a-z0-9-]+']
},
prohibited: ['ci', 'wip', 'main', 'test', 'build', 'master', 'release']
};
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.