danger / danger/danger-js

[BitBucketServer] Missing lines_of_code

Open
#545 1 comment 0 reactions 0 assignees View on GitHub
enhancement You Can Do This
Dominant language
TypeScript
Stars
5.5k
Forks
381
Avg merge
2h 8m
Merged PRs (30d)
6

Description

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:

```ruby
# 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
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.