github-fork-update

module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2024 License: MIT

README

github-fork-update

Go Version Go Report Card Code Coverage License

Description

github-fork-update is a tool to sync all forks in the owner's account from upstream.

Contributing

Please see our Contributing for how to contribute to the project.

Setting up for development

git clone https://github.com/mjdusa/github-fork-update.git

Pre-commit Hooks

When you clone this repository to your workstation, make sure to install the pre-commit hooks. GitHub repository

Installing tools
brew install pre-commit
brew install gitleaks
- or -
git clone https://github.com/gitleaks/gitleaks.git
cd gitleaks
make build
Check installed versions
pre-commit --version
pre-commit 3.3.2
Update configured pre-commit plugins

Updates repository versions in .pre-commit-config.yaml to the latest

pre-commit autoupdate
Install pre-commit into the local git
pre-commit install --install-hooks
Run pre-commit checks manually
pre-commit run --all-files

Running

make release
...
./dist/github-fork-update -auth=[github-auth-token]

Maintaining, Housekeeping, Greenkeeping, etc

Upgrade Go Version
go mod edit -go=<go_version> && go mod tidy
Upgrade Dependency Versions
go get -u && go mod tidy
Running golangci-lint Locally
golangci-lint run --verbose --tests=true --timeout=1m --config=.github/linters/.golangci.yml --issues-exit-code=0 --out-format=checkstyle

Profiling

Prereq
brew install graphviz
Creating PDF for CPU profiling
go tool pprof -pdf ./dist/github-fork-update cpu-profile.pprof > cpu-profile.pdf
Creating PDF for memory profiling
go tool pprof -pdf ./dist/github-fork-update mem-profile.pprof > mem-profile.pdf

Directories

Path Synopsis
cmd
internal
run

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL