ghput

command module
v0.0.0-...-dce9173 Latest Latest
Warning

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

Go to latest
Published: May 20, 2025 License: MIT Imports: 1 Imported by: 0

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/unfinishedf/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/unfinishedf/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/unfinishedf/ghput@latest

Alternatives

  • github-commenter: Command line utility for creating GitHub comments on Commits, Pull Request Reviews or Issues

Documentation

Overview

Copyright © 2020 NAME HERE <EMAIL ADDRESS>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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