https://github.com/suddengunter/go-linter-enforcer
This simple app checks if provided git repos are following your golangci-lint config and if not - updates repo config and pushes update to a remote branch
https://github.com/suddengunter/go-linter-enforcer
bitbucket git go golangci-lint hacktoberfest linter
Last synced: 3 months ago
JSON representation
This simple app checks if provided git repos are following your golangci-lint config and if not - updates repo config and pushes update to a remote branch
- Host: GitHub
- URL: https://github.com/suddengunter/go-linter-enforcer
- Owner: SuddenGunter
- License: apache-2.0
- Created: 2021-11-10T19:16:52.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-29T19:48:52.000Z (over 3 years ago)
- Last Synced: 2025-01-23T13:13:52.233Z (5 months ago)
- Topics: bitbucket, git, go, golangci-lint, hacktoberfest, linter
- Language: Go
- Homepage:
- Size: 88.9 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-linter-enforcer
This simple app checks if provided git repos are following your golangci-lint config and if not - updates repo config and pushes update to a remote branch## Current status
Very early version, absolutely not production ready. If it deletes all your production repos - that's on you.## Modes
Architecture of the app allows writing integrations with different Git-based hosting providers independently.
Currently, the only supported mode is `bitbucket`.## Demo
Create some default user and repo in your bitbucket cloud. Your demo repository must have it's `Repository details > Advanced > Language` set to `Go`.
Set your env variables:
```env
GIT_SSH_PRIVATE_KEY_PATH=/home/gunter/.ssh/PRIVATE_KEY
SSH_PRIVATE_KEY_PASSWORD=YOUR_PASSWORD # optional
GIT_USERNAME=bitbucketuser42
GIT_EMAIL=user@bitbucket
BITBUCKET_LOGIN=bitbucketuser42 # same as your GIT_USERNAME, temporary inconvenience that could be fixed later
BITBUCKET_APP_PASSWORD=YOUR_BITBUCKET_APP_PASSWORD
BITBUCKET_ORGANIZATION=your_org
MODE=bitbucket
```Replace `example.golangci.yml` with your preferred config.
Build & run:
```cgo
go build -o app .
./app
```