Skip to content

Commit

Permalink
add introduction to -help output
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Oct 14, 2024
1 parent 8c68907 commit 50b11ed
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,8 @@ External reference with `GH-` prefix is also supported.
> [!Note]
> Custom autolinks are [configured][gh-config-autolink] on your repository. [The API to fetch the custom autolinks configuration][gh-api-autolink]
> requires "Administration" repository permissions (read). When the permission lacks, `changelog-from-release`
> ignores the custom autolinks.
> ignores the custom autolinks. You need to set your personal access token to the `GITHUB_TOKEN` environment
> variable.

### Issue URL

Expand Down
16 changes: 14 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,19 @@ import (
const version = "v3.7.2"

func usage() {
fmt.Fprint(os.Stderr, "Usage: changelog-from-release [flags]\n\n")
fmt.Fprint(os.Stderr, `Usage: changelog-from-release [FLAGS]
changelog-from-release is a (too) small command line tool to generate changelog
from GitHub Releases. This tool fetches releases of the repository via GitHub
API and generates the changelog to stdout in Markdown format. References like
#123 or @rhysd are automatically linked.
Please read the document for more details:
https://github.com/rhysd/changelog-from-release#readme
Flags:
`)
flag.PrintDefaults()
}

Expand Down Expand Up @@ -64,7 +76,7 @@ func main() {
ver := flag.Bool("v", false, "Output version to stdout")
heading := flag.Int("l", 1, "Heading level of each release section")
drafts := flag.Bool("d", true, "Include draft releases")
prerelease := flag.Bool("p", false, "Include prereleases")
prerelease := flag.Bool("p", false, "Include pre-releases")
ignore := flag.String("i", "", "Pattern to ignore release tags in regular expression")
extract := flag.String("e", "", "Pattern to extract release tags in regular expression")
remote := flag.String("r", "", "Remote repository URL to generate changelog")
Expand Down

0 comments on commit 50b11ed

Please sign in to comment.