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

feat: adds lint-release-notes action #20

Merged
merged 1 commit into from
Sep 15, 2023
Merged

Conversation

greenkiwi
Copy link
Contributor

@greenkiwi greenkiwi commented Sep 12, 2023

Description

  • This adds a new lint-release-notes action that ensures that breaking change docs have been created and provides a preview of the release notes.
  • DEPRECATED: action actions-release/release-notes-preview

🚀 PR created with fotingo

@greenkiwi greenkiwi requested a review from a team as a code owner September 12, 2023 22:18
Copy link
Contributor

@tagoro9 tagoro9 left a comment

Choose a reason for hiding this comment

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

Just some minor comments

@@ -21,6 +21,8 @@ const OUTPUTS = {
new_release_major_version: "new-release-major-version",
new_release_minor_version: "new-release-minor-version",
new_release_patch_version: "new-release-patch-version",
last_release_version: "last-release-version",
Copy link
Contributor

Choose a reason for hiding this comment

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

Sort these alphabetically (not sure how the linter didn't pick this)

@@ -43,6 +43,12 @@ outputs:
new-release-patch-version:
description: "Patch version of the new release"
value: ${{ steps.semantic-release.outputs.new-release-patch-version }}
last-release-version:
Copy link
Contributor

Choose a reason for hiding this comment

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

Sort these alphabetically

Copy link
Contributor

Choose a reason for hiding this comment

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

Update the readme adding these to it (we haven't automated this - not sure if there is a way)

if (nextRelease) {
setOutput(OUTPUTS.last_release_version, lastRelease.version);
Copy link
Contributor

Choose a reason for hiding this comment

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

Update the tests to check for these outputs

@greenkiwi greenkiwi force-pushed the add-prerelease-support branch from 008a92c to def2346 Compare September 12, 2023 23:31
@github-actions
Copy link

github-actions bot commented Sep 12, 2023

Pull Request Test Coverage Report for Build 6193920728

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 87.879%

Totals Coverage Status
Change from base Build 6189939206: 0.0%
Covered Lines: 41
Relevant Lines: 44

💛 - Coveralls

Copy link
Contributor

@Toolo Toolo left a comment

Choose a reason for hiding this comment

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

+1 to updating the README and sorting params. Looks good otherwise

@greenkiwi greenkiwi force-pushed the add-prerelease-support branch 25 times, most recently from 4809008 to 504725d Compare September 14, 2023 08:04
@tagoro9
Copy link
Contributor

tagoro9 commented Sep 14, 2023

It seems the breaking changes comment shouldn't have been created though

@greenkiwi greenkiwi force-pushed the f/add-last-release-outputs branch from e1c21b7 to 875d39c Compare September 14, 2023 19:14
@greenkiwi
Copy link
Contributor Author

It seems the breaking changes comment shouldn't have been created though

@tagoro9 it will break until it can self reference the updated version of semantic release

    - name: Generate release notes
      id: release-notes-preview
      uses: open-turo/actions-release/semantic-release@v2
      env:
        GITHUB_TOKEN: ${{ inputs.github-token }}

Maybe there's a better way to do this. I'd copied how it was being done elsewhere. But it was good to pull the PRs apart.

@greenkiwi greenkiwi force-pushed the add-prerelease-support branch from 67dfbd0 to 21b69b4 Compare September 14, 2023 19:19
Base automatically changed from f/add-last-release-outputs to main September 14, 2023 19:19
@greenkiwi greenkiwi force-pushed the add-prerelease-support branch 15 times, most recently from 3310c0b to adbcde9 Compare September 15, 2023 04:31
@greenkiwi greenkiwi enabled auto-merge (rebase) September 15, 2023 04:32
This adds a new check that enforces that a breaking changes document has been created.
@greenkiwi greenkiwi force-pushed the add-prerelease-support branch from adbcde9 to 04e002a Compare September 15, 2023 04:33
@greenkiwi greenkiwi disabled auto-merge September 15, 2023 04:33
@greenkiwi greenkiwi enabled auto-merge (rebase) September 15, 2023 04:33
@github-actions
Copy link

Release notes preview

Below is a preview of the release notes if your PR gets merged.


2.3.0 (2023-09-15)

Features

  • release-notes-preview: add breaking changes doc check (04e002a)

@greenkiwi greenkiwi merged commit 7f20099 into main Sep 15, 2023
3 checks passed
@greenkiwi greenkiwi deleted the add-prerelease-support branch September 15, 2023 04:35
@github-actions
Copy link

🎉 This PR is included in version 2.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants