Ghput Save

:octocat: ghput is a CI-friendly tool that puts * on GitHub.

Project README

ghput Build Status GitHub release

:octocat: ghput is a CI-friendly tool that puts * on GitHub.

Usage

Put comment to issue:

$ echo 'This is comment !!' | GITHUB_TOKEN=XXXXXxxxxxXXxxxx ghput issue-comment --owner k1LoW --repo myrepo --number 1

Put comment to issue on GitHub Actions:

ghput get owner and repo from GITHUB_REPOSITORY.

- name: Put comment
  run: echo 'This is comment !!' | ghput issue-comment --number 1
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Put comment to pull request:

$ echo 'This is comment !!' | GITHUB_TOKEN=XXXXXxxxxxXXxxxx ghput pr-comment --owner k1LoW --repo myrepo --number 2

Put comment to latest merged pull request:

$ echo 'Hello merged pull request !!' | GITHUB_TOKEN=XXXXXxxxxxXXxxxx ghput pr-comment --owner k1LoW --repo myrepo --latest-merged

Put issue to repo:

$ echo 'This is new isssue !!' | GITHUB_TOKEN=XXXXXxxxxxXXxxxx ghput issue --owner k1LoW --repo myrepo --title 'New Issue !!!!!'

Put commit to branch:

$ GITHUB_TOKEN=XXXXXxxxxxXXxxxx ghput commit --owner k1LoW --repo myrepo --branch main --file file.txt --path path/to/file.txt --message 'Commit file !!'

Put tag to branch:

$ GITHUB_TOKEN=XXXXXxxxxxXXxxxx ghput tag --owner k1LoW --repo myrepo --branch main --tag v0.0.1

Put a time based tag when the tag option is omitted ( default time format: %Y%m%d-%H%M%S%z )

$ GITHUB_TOKEN=XXXXXxxxxxXXxxxx ghput tag --owner k1LoW --repo myrepo --tag-time-format '%Y%m%d%H%M'

Put tag as release:

$ GITHUB_TOKEN=XXXXXxxxxxXXxxxx ghput tag --owner k1LoW --repo myrepo --tag v0.0.1 --release --release-title 'Code name: Elvis Juice' --release-body 'Release !!'

or

$ echo 'Release !!' | GITHUB_TOKEN=XXXXXxxxxxXXxxxx ghput tag --owner k1LoW --repo myrepo --tag v0.0.1 --release --release-title 'Code name: Elvis Juice'

Put file to Gist:

$ GITHUB_TOKEN=XXXXXxxxxxXXxxxx ghput gist --file file.txt
$ cat file.txt | GITHUB_TOKEN=XXXXXxxxxxXXxxxx ghput gist

Use on GitHub Enterprise:

$ export GITHUB_API_URL=https://git.my-company.com/api/v3/

Install

deb:

$ export GHPUT_VERSION=X.X.X
$ curl -o ghput.deb -L https://github.com/k1LoW/ghput/releases/download/v$GHPUT_VERSION/ghput_$GHPUT_VERSION-1_amd64.deb
$ dpkg -i ghput.deb

RPM:

$ export GHPUT_VERSION=X.X.X
$ yum install https://github.com/k1LoW/ghput/releases/download/v$GHPUT_VERSION/ghput_$GHPUT_VERSION-1_amd64.rpm

homebrew tap:

$ brew install k1LoW/tap/ghput

manually:

Download binany from releases page

go install:

$ go install github.com/k1LoW/ghput@latest

Alternatives

  • github-commenter: Command line utility for creating GitHub comments on Commits, Pull Request Reviews or Issues
Open Source Agenda is not affiliated with "Ghput" Project. README Source: k1LoW/ghput
Stars
34
Open Issues
0
Last Commit
4 months ago
Repository
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating