Skip to content
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

Add warning level to configuration options #9

Open
npetkov opened this issue May 30, 2017 · 2 comments
Open

Add warning level to configuration options #9

npetkov opened this issue May 30, 2017 · 2 comments

Comments

@npetkov
Copy link

npetkov commented May 30, 2017

It's great that poper now supports external config files. I have a hopefully simple feature request - could you please make the warning level of the messages configurable as well? This is desirable in cases where ill-formatted commit messages have already slipped upstream and would break CI builds configured with pronto's exit-code option.

@ivanovaleksey
Copy link

@npetkov could you provide some example?
You can specify how much commits you want to run a check on.

@npetkov
Copy link
Author

npetkov commented May 30, 2017

Yes, I'll try to clarify what I mean. Consider the check method. It returns an array of objects:

OpenStruct.new(commit: commit.oid, message: result) if result

So essentially, every "error" returned from poper will have a commit and message field. I think it would be useful if another field is added, called :level (in line with pronto naming), which is globally configurable via the configuration file:

OpenStruct.new(commit: commit.oid, message: result, level: [this should be configurable]) if result

This configurable "severity" is useful for certain cases where "non-compliant" commit messages (like merge commits) are unavoidable.

Of course, this would require a change in the poper-runner main method as well, but this is a matter of another issue:

def message_for(error)
  Message.new(nil, nil, error.level, error.message.capitalize, error.commit, self.class)
end

I hope this makes more sense now.

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

No branches or pull requests

2 participants