https://github.com/danger/golang
⚠️ Stop saying "you forgot to …" in code review
https://github.com/danger/golang
hacktoberfest
Last synced: 6 months ago
JSON representation
⚠️ Stop saying "you forgot to …" in code review
- Host: GitHub
- URL: https://github.com/danger/golang
- Owner: danger
- Created: 2023-03-09T10:09:05.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-05-02T09:57:12.000Z (about 1 year ago)
- Last Synced: 2025-05-02T10:52:28.420Z (about 1 year ago)
- Topics: hacktoberfest
- Language: Go
- Homepage:
- Size: 80.1 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# Danger in Go
This is a Go version of the popular [Danger](https://danger.systems/) tool.
## Installation of command line tool
```shell
go install github.com/danger/golang/cmd/danger-go@latest
yarn global add danger
```
Requires [Danger JS](https://danger.systems/js) to run properly.
## Integrate into project
1. Create a new directory to house the *dangerfile.go* file. This repo uses `build/ci`.
2. Add a `dangerfile.go` to the directory with the following contents:
```go
package main
import "github.com/danger/golang"
func Run(d *danger.T, pr danger.DSL) {
d.Message("danger-go is running!", "", 0)
}
```
3. Run the following in the directory:
```shell
go mod init dangerfile
go get github.com/danger/golang
go mod tidy
```
## Running danger-go locally
The `danger-go` command line tool supports `local`, `pr`, and `ci` commands. `danger-go` wraps the corresponding `danger` (js) commands, so to get information about flags, run `danger --help`.
## CI integration
### GitHub Actions
See `.github/workflows/main.yml` as a reference.
## Authors
`danger-go` was developed by [Luno](https://github.com/luno/).