Giter Club home page Giter Club logo

branch-name-lint's Introduction

Hi there ๐Ÿ‘‹

branch-name-lint's People

Contributors

b12k avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

lfdave

branch-name-lint's Issues

Problems running it inside Github Workflow

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

Allow push to develop and regular branches

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.