The GitHub integration provides the following features:
- Add GitHub web link for a change log entry's commit.
- Add web links for commit references that are detected in footers (see Automatic References)
- Recognize GitHub Issue and Pull Request References
The GitHub integration should work with both github.com and GitHub Enterprise installations. However, it was not yet tested with GitHub Enterprise.
By default, the GitHub server name, the repository owner and the repository name are read from the URL of the origin remote in the local git repository.
ChangeLog assumes, the remote URL follows the default schema used by github.com:
https://github.com/example-owner/example-repo.git
└────────┘ └───────────┘ └──────────┘
▲ ▲ ▲
│ │ │
│ │ └── Repository Name: "example-repo"
│ │
│ └── Repository Owner: "example-owner"
│
└── Host: "github.com"
Version 0.3 of ChangeLog introduced settings to customize this behavior:
- GitHub Remote Name
- Specifies the name of the git remote which's URL to parse.
- This allows automatically determining the GitHub project information when the remote is not
origin
- GitHub Host
- Allows explicitly specifying the host to use.
- This setting takes precedence over the host name parsed from the remote URL.
- GitHub Repository Owner
- Allows explicitly specifying the repository owner to use.
- This setting takes precedence over the owner name parsed from the remote URL.
- GitHub Repository Name
- Allows explicitly specifying the repository name to use.
- This setting takes precedence over the repository name parsed from the remote URL.
When both host, repository owner and repository name settings are specified, the remote URL is not parsed and the GitHub Remote Name setting has no effect.
To access private repositories, an access token must be specified. This can be achieved using either commandline parameters or environment variables. See Configuration - GitHub Access token for details.
Because GitHub has a quite low rate limit for unauthenticated API requests, it is recommended to use a access token even if you only access public repositories.
ChangeLog will recognize references to GitHub Issues and Pull Requests in commit message footers (see also Automatic References).
The following types of references are recognized:
#<id>
: Reference to an issue or pull request in the same project, e.g.#123
<user>/<repository>#<id>
: Reference to an issue or pull request in a different project, e.g.ap0llo/changelog#123
GH-<id>
: Reference to an issue or pull request in the same project, e.g.GH-123
When Reference Normalization is enabled, references are converted to their minimal form:
- When an Issue or Pull Request in the same repository is referenced, the reference is converted to the
#<id>
format.
For example, a referenceuser/repo#23
is replaced with#23
when generating the change log for theuser/repo
repository. - References to Issues or Pull Requests in other repository will use the full format
<user>/<repository>#<id>