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

[BitBucketServer] Missing lines_of_code #545

Open
zdnk opened this issue Mar 27, 2018 · 1 comment
Open

[BitBucketServer] Missing lines_of_code #545

zdnk opened this issue Mar 27, 2018 · 1 comment
Labels
enhancement You Can Do This This idea is well spec'd and ready for a PR

Comments

@zdnk
Copy link
Contributor

zdnk commented Mar 27, 2018

Hello,

one thing I am missing is lines_of_code that was available in Ruby version of Danger. It helps to warn reviewers that PR is bigger than is standard or expected, or you can simply force documentation/tests update from certain number of lines like I did in Ruby danger:

  # Check if documentation is updated
  documentation_warning = 10
  documentation_error = 30
  documentation_message = "Documentation was not updated. Any change should be reflected in DCS."
  # Skip if is trivial
  if has_app_changes && !has_documentation_changes
    warn documentation_message if git.lines_of_code >= documentation_warning && (git.lines_of_code < documentation_error || is_trivial)
    fail documentation_message if git.lines_of_code >= documentation_error && !is_trivial
  end
@orta
Copy link
Member

orta commented Mar 27, 2018

Makes sense, I think it should be pretty easy to add this on to the git DSL. It wasn't added because I think GitHub has it in the PR metadata.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement You Can Do This This idea is well spec'd and ready for a PR
Projects
None yet
Development

No branches or pull requests

2 participants