Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Add a release notes generator #2692

Merged
merged 6 commits into from
Jun 6, 2023
Merged

Conversation

jeffmaury
Copy link
Contributor

Fixes #1458

What does this PR do?

Add a new release generator tool. This tool extracts all merged PRs for a milestone and checks for sections delimited by // release-notes. If such sections are found for a PR, it will be added to the release notes document in addition to the PR title and link. An example can be found at https://github.com/jeffmaury/test-release-notes/actions/runs/4665291287

PRs are grouped according to conventional commits prefixes, using a translation table. If prefix is not found in the table, Other category is assumed

A workflow is also added to allow manual invocation of the tool

Screenshot/screencast of this PR

N/A

What issues does this PR fix or reference?

Fixes #1458

How to test this PR?

The tool can also be run:

  1. Go the the tools folder
  2. Run yarn build
  3. Run node --token your_github_token --organization github_organization (or --user github_user if it's a user) --repo github_repo

Fixes containers#1458

Signed-off-by: Jeff MAURY <jmaury@redhat.com>
@jeffmaury jeffmaury requested review from a team and benoitf as code owners May 30, 2023 15:08
@jeffmaury jeffmaury requested review from cdrage and lstocchi and removed request for a team May 30, 2023 15:08
Signed-off-by: Jeff MAURY <jmaury@redhat.com>
Signed-off-by: Jeff MAURY <jmaury@redhat.com>
.github/workflows/release-notes.yaml Outdated Show resolved Hide resolved
tools/yarn.lock Outdated Show resolved Hide resolved
tools/tsconfig.json Show resolved Hide resolved
tools/release-notes-generator.ts Outdated Show resolved Hide resolved
tools/release-notes-generator.ts Outdated Show resolved Hide resolved
.eslintrc.json Show resolved Hide resolved
.github/workflows/release-notes.yaml Outdated Show resolved Hide resolved
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */

/* Modules */
"module": "CommonJS", /* Specify what module code is generated. */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think our modules are now using node16 or esnext

@benoitf
Copy link
Collaborator

benoitf commented May 31, 2023

curious: in the title, it is referencing (#5) is there a reason ?

@jeffmaury jeffmaury changed the title build: Add a release notes generator (#5) build: Add a release notes generator May 31, 2023
Signed-off-by: Jeff MAURY <jmaury@redhat.com>
- Code refactoring
- Switch module to esnext

Signed-off-by: Jeff MAURY <jmaury@redhat.com>
Comment on lines 24 to 25
description: 'Milestone to generate release notes from'
required: true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe need to add placeholder (example in the description) with the format of the expected value

is it: 1.0.0, v1.0.0 or milestone number like 18 for 1.1.0 https://github.com/containers/podman-desktop/milestone/18

- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe nodejs 18 now that it's the LTS

},
"dependencies": {
"@octokit/graphql": "^5.0.6",
"@types/node": "^20.2.4"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's 18 as we're using nodejs 18 in electron (and you were running the generator with v16)

['feat', 'Features'],
['fix', 'Bug Fixes'],
['docs', 'Documentation'],
['chore', 'Other'],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is chore not already a dedicated section ?
Like 'Chore'. I would say Other is not what is already specified

Copy link
Collaborator

@benoitf benoitf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • need example in the description of the github action
  • probably need an update of RELEASE.md to call this action ?
  • should bump to nodejs 18 (and ensure @types/node is 18 as well, not 20)
  • Keep chore as a dedicated section (To me other is what is not matching a conventional commit prefix)

Signed-off-by: Jeff MAURY <jmaury@redhat.com>
@benoitf
Copy link
Collaborator

benoitf commented Jun 5, 2023

hello, is there something preventing to merge this PR ?

@jeffmaury
Copy link
Contributor Author

hello, is there something preventing to merge this PR ?

Waiting for @deboer-tim feedback

@jeffmaury jeffmaury merged commit 18e3c0d into containers:main Jun 6, 2023
9 checks passed
@jeffmaury jeffmaury deleted the GH-1458 branch June 6, 2023 09:07
@podman-desktop-bot podman-desktop-bot added this to the 1.1.0 milestone Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Release note automation
3 participants