Skip to content

About

Extract closed issues on given milestone for inclusion in changelog

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

closed-issues-for-milestone

A small tool used in the Agda release process. It retrieves the issues and pull requests that were closed for a given milestone in the GitHub repository agda/agda and prints them as a markdown list, ready to be pasted into the CHANGELOG.md.

Usage

closed-issues-for-milestone [--config FILE] <milestone>

The tool needs a GitHub access token in the environment variable GITHUB_TOKEN. A token without any special scopes suffices, since only public information is read; it is needed to avoid GitHub's strict rate limit for unauthenticated requests.

It also reads the release configuration of the Agda repository, by default from .github/release.yml in the current directory. Thus, the typical invocation is from the root of an Agda checkout:

cd agda
export GITHUB_TOKEN=...
closed-issues-for-milestone 2.8.0 > closed-issues.md

Options:

  • --config FILE: read the release configuration from FILE instead of .github/release.yml.
  • -h, --help: print usage information.

What gets listed

Of all the closed issues and pull requests assigned to the milestone, the following are dropped:

  • issues closed as not planned,
  • pull requests closed without being merged,
  • issues and pull requests carrying a label listed under changelog.exclude.labels in the release configuration, e.g.:
    changelog:
      exclude:
        labels:
          - not-in-changelog
          - documentation

The remaining issues and pull requests are printed to stdout as markdown, sorted into the following sections (sections without entries are omitted):

  • Consistency issues: issues with label false.
  • Internal errors: issues with label internal-error.
  • Regressions: remaining issues with a label regression in x.y.z.
  • Other issues: all remaining issues.
  • Pull requests: all pull requests.

Each entry also lists its regression in x.y.z labels, if it has any. Example:

Consistency issues
------------------

- [Issue #1234](https://github.com/agda/agda/issues/1234): Title of the issue (regression in 2.7.0)

Other issues
------------

- [Issue #2345](https://github.com/agda/agda/issues/2345): Title of another issue

Pull requests
-------------

- [PR #5678](https://github.com/agda/agda/issues/5678): Title of the pull request

Diagnostic output, including the lists of dropped issues and pull requests together with the reason why they were dropped, goes to stderr. It is worth reviewing it to catch issues that were labeled or closed incorrectly.

Installation

With cabal:

cabal install

With stack (pick the configuration for your GHC version):

stack install --stack-yaml stack-9.14.yaml

Supported GHC versions: see closed-issues-for-milestone.cabal.

License

BSD-3-Clause, see LICENSE.

About

Extract closed issues on given milestone for inclusion in changelog

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages