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

[ENG-5269] add changelog linter #1451

Merged
merged 3 commits into from
Oct 18, 2022
Merged

[ENG-5269] add changelog linter #1451

merged 3 commits into from
Oct 18, 2022

Conversation

dsokal
Copy link
Contributor

@dsokal dsokal commented Oct 18, 2022

Checklist

  • I've added an entry to CHANGELOG.md if necessary. You can comment this pull request with /changelog-entry [breaking-change|new-feature|bug-fix|chore] [message] and CHANGELOG.md will be updated automatically.

Why

Fixes https://linear.app/expo/issue/ENG-5269/add-ci-job-for-validating-eas-cli-changelog-format

How

  • Implement simple linter (it does not check whether the entry was added to the right section yet, but it's not trivial)
  • Fix invalid changelog entries.

Test Plan

CI + tested locally:
Screenshot 2022-10-18 at 11 13 14

@dsokal dsokal requested a review from szdziedzic October 18, 2022 09:25
@dsokal dsokal requested a review from wkozyra95 as a code owner October 18, 2022 09:25
@linear
Copy link

linear bot commented Oct 18, 2022

ENG-5269 Add CI job for validating EAS CLI changelog format

People make mistakes when adding the changelog entries on their own (some prefer not to use the changelog bot I guess). Mostly, mistakes are only related to style/format. But sometimes the entry is added under the section for an already released version.

We should look into creating a simple linter for changelog entries.

Few examples of mistakes I had to fix manually:

@github-actions
Copy link

github-actions bot commented Oct 18, 2022

Size Change: +231 B (0%)

Total Size: 41.1 MB

Filename Size Change
./packages/eas-cli/dist/eas-linux-x64.tar.gz 41.1 MB +231 B (0%)

compressed-size-action

@dsokal dsokal force-pushed the @dsokal/changelog-linter branch from 85b227e to cec4e4b Compare October 18, 2022 09:31
@codecov
Copy link

codecov bot commented Oct 18, 2022

Codecov Report

Merging #1451 (cec4e4b) into main (9201af5) will decrease coverage by 0.05%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1451      +/-   ##
==========================================
- Coverage   51.80%   51.75%   -0.04%     
==========================================
  Files         425      425              
  Lines       14676    14691      +15     
  Branches     3061     2892     -169     
==========================================
+ Hits         7601     7602       +1     
- Misses       7062     7076      +14     
  Partials       13       13              
Impacted Files Coverage Δ
.../eas-cli/src/credentials/manager/SelectPlatform.ts 28.58% <0.00%> (-2.19%) ⬇️
packages/eas-cli/src/metadata/utils/telemetry.ts 57.78% <0.00%> (-0.91%) ⬇️
packages/eas-cli/src/user/SessionManager.ts 85.84% <0.00%> (-0.11%) ⬇️
packages/eas-cli/src/build/build.ts 12.56% <0.00%> (-0.05%) ⬇️
packages/eas-cli/src/submit/submit.ts 25.46% <0.00%> (ø)
packages/eas-cli/src/submit/context.ts 100.00% <0.00%> (ø)
packages/eas-cli/src/commands/submit.ts 32.73% <0.00%> (ø)
packages/eas-cli/src/metadata/upload.ts 21.43% <0.00%> (ø)
packages/eas-cli/src/analytics/common.ts 100.00% <0.00%> (ø)
packages/eas-cli/src/metadata/context.ts 36.37% <0.00%> (ø)
... and 23 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@@ -12,6 +12,7 @@
"watch": "yarn start",
"eas": "packages/eas-cli/bin/run",
"lint": "eslint .",
"lint-changelog": "./scripts/bin/run lint-changelog",
Copy link
Contributor

Choose a reason for hiding this comment

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

If we only run that in CI, do we even need to have a script in package.json?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it could be helpful when you add an invalid changelog entry and want to verify the fix locally.

@dsokal dsokal merged commit 40aa1c7 into main Oct 18, 2022
@dsokal dsokal deleted the @dsokal/changelog-linter branch October 18, 2022 10:56
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.

3 participants