百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
D

danger

> DevOps
开源

在代码审查中不要说"你忘记了…"(在 Ruby 中)

5.7K stars0 点赞2 次浏览
访问官网GitHub

工具介绍

在代码审查中不要说"你忘记了…"(在 Ruby 中)

# Danger :no_entry_sign: Formalize your Pull Request etiquette. -------

What is Danger? • Vision • Helping Out • Plugin Development

------- ## What is Danger? Danger runs during your CI process, and gives teams the chance to automate common code review chores. This provides another logical step in your process, through this Danger can help lint your rote tasks in daily code review. You can use Danger to codify your teams norms. Leaving humans to think about harder problems. ## For example? You can: * Enforce CHANGELOGs * Enforce links to Trello/JIRA in PR/MR bodies * Enforce using descriptive labels * Look out for common anti-patterns * Highlight interesting build artifacts * Give specific files extra focus Danger provides the glue to let _you_ build out the rules specific to your team's culture, offering useful metadata and a comprehensive plugin system to share common issues. ## Getting Started Alright. So, actually, you may be in the wrong place. From here on in, this README is going to be for people who are interested in working on and improving on Danger. We keep all of the end-user documentation at [https://danger.systems](https://danger.systems). Some quick links: [Guides Index](https://danger.systems/guides.html), [DSL Reference](https://danger.systems/reference.html), [Getting Started](https://danger.systems/guides/getting_started.html) and [What does Danger Do?](https://danger.systems/guides/what_does_danger_do.html). ## I'm here to help out! Brilliant. So, let's get you set up. ```sh git clone https://github.com/danger/danger.git cd danger bundle install bundle exec rake spec ``` This sets everything up and runs all of the tests. #### Theory Danger has a [VISION.md](https://github.com/danger/danger/blob/master/VISION.md) file, which sums up the ideas around what Danger is. It is the lower bounds of what Danger means. Orta has written on handling and creating Danger [on the Artsy blog](http://artsy.github.io/blog/categories/danger/), too. #### Documentation The code you write may end up in the public part of the website — the easiest way to tell is that it is vastly overdocumented. If you are working in a space that looks over-documented, please be extra considerate to add documentation. We expect the consumers of that documentation to be non-rubyists, thus you should avoid specific jargon and try to provide duplicate overlapping examples. #### Testing So far, we've not really figured out the right way to make tests for our CLI commands. When we have done so, they've ended up being brittle. So, ideally, try to move any logic that would go into a command into separate classes, and test those. We're okay with the command not having coverage, but ideally the classes that make up what it does will. I'd strongly recommend using `bundle exec guard` to run your tests as you work. Any changes you make in the lib, or specs will have corresponding tests run instantly. #### Debugging Ruby is super dynamic. One of the best ways to debug Ruby code is by using [pry](https://pry.github.io/). We include pry for developers: when you have a problem, copy these two lines just before your problem and follow the instructions from "[I Want To Be A Danger Wizard](https://danger.systems/guides/troubleshooting.html#i-want-to-be-a-danger-wizard)." ```ruby require 'pry' binding.pry ``` ## License, Contributor's Guidelines and Code of Conduct We try to keep as much discussion as possible in GitHub issues, but also have a pretty inactive Slack --- if you'd like an invite, ping [@Orta](https://twitter.com/orta/) a DM on Twitter with your email. It's mostly interesting if you want to stay on top of Danger without all the emails from GitHub. > This project is open source under the MIT license, which means you have full access to the source code and can modify it to fit your own needs. > This project subscribes to the [Moya Contributors Guidelines](https://github.com/Moya/contributors) which TLDR: means we give out push access easily and often. > Contributors subscribe to the [Contributor Code of Conduct](https://contributor-covenant.org/version/1/3/0/) based on the [Contributor Covenant](https://contributor-covenant.org) version 1.3.0.

GitHub Issues· 0 开放

在 GitHub 查看全部

暂无开放 Issues,或尚未同步最近议题。

核心特点

  • •Enforce CHANGELOGs
  • •Enforce links to Trello/JIRA in PR/MR bodies
  • •Enforce using descriptive labels
  • •Look out for common anti-patterns
  • •Highlight interesting build artifacts
  • •Give specific files extra focus

> 标签

Rubyautomationbitbucketcicircle

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类DevOps
定价开源

> 相关工具

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理