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

ci: verify semantic pull requests #1264

Merged
merged 17 commits into from Aug 16, 2022
Merged

Conversation

Shinigami92
Copy link
Member

In our last meeting we discussed that we want to allow only specific defined scopes so the CHANGELOG.md will get better updated automatically

This PR will add a guideline that explains which are good commit/PR titles and which are not (with historical real world examples and how to write them instead)

Also it will only allow a subset of types and scopes so the PR title must follow the new convention

Please note that the verifyCommit script doesn't need to be absolutely exact, as only the PR title is important at the end when merging the PR because we always use squash-merge rebase

Tip: You can check how we wrote commit messages in the history with following command:

git log --pretty=format:%s > commits.md

@Shinigami92 Shinigami92 added the c: infra Changes to our infrastructure or project setup label Aug 12, 2022
@Shinigami92 Shinigami92 self-assigned this Aug 12, 2022
@codecov
Copy link

codecov bot commented Aug 12, 2022

Codecov Report

Merging #1264 (46e468e) into main (f8c9f60) will decrease coverage by 0.01%.
The diff coverage is n/a.

❗ Current head 46e468e differs from pull request most recent head e8a010a. Consider uploading reports for the commit e8a010a to get more accurate results

@@            Coverage Diff             @@
##             main    #1264      +/-   ##
==========================================
- Coverage   99.63%   99.62%   -0.02%     
==========================================
  Files        2154     2156       +2     
  Lines      239914   237027    -2887     
  Branches     1007     1006       -1     
==========================================
- Hits       239039   236128    -2911     
- Misses        854      878      +24     
  Partials       21       21              
Impacted Files Coverage Δ
src/modules/internet/user-agent.ts 81.74% <0.00%> (-6.35%) ⬇️
src/modules/git/index.ts 100.00% <0.00%> (ø)
src/locales/he/name/index.ts 100.00% <0.00%> (ø)
src/locales/he/address/city.ts 100.00% <0.00%> (ø)
src/locales/he/address/state.ts 100.00% <0.00%> (ø)
src/locales/he/address/street.ts 100.00% <0.00%> (ø)
src/locales/he/name/last_name.ts 100.00% <0.00%> (ø)
src/locales/he/address/country.ts 100.00% <0.00%> (ø)
src/locales/he/cell_phone/formats.ts 100.00% <0.00%> (ø)
src/locales/he/name/male_first_name.ts 100.00% <0.00%> (ø)
... and 9 more

@Shinigami92
Copy link
Member Author

We need to discuss if we want a type revert or a scope revert (or both)?

So do we want e.g. feat(revert): , fix(revert): or chore(revert): where only feat and fix would showup in the changelog
or revert: which would also not showup in changelog 🤔

But using a type would be somewhat helpful as the git cli creates these prefixed commit messages automatically I assume

@ST-DDT
Copy link
Member

ST-DDT commented Aug 12, 2022

We need to discuss if we want a type revert or a scope revert (or both)?

IMO we should allow type revert. Although this might be connected to a bugfix usually.

@ST-DDT ST-DDT changed the title ci: verify semantic pull requests infra: verify semantic pull requests Aug 12, 2022
@ST-DDT ST-DDT changed the title infra: verify semantic pull requests ci: verify semantic pull requests Aug 12, 2022
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
Shinigami92 and others added 2 commits August 12, 2022 19:26
Co-authored-by: Eric Cheng <ericcheng9316@gmail.com>
@Shinigami92 Shinigami92 added this to the v7 - Current Major milestone Aug 12, 2022
@Shinigami92 Shinigami92 marked this pull request as ready for review August 12, 2022 18:34
@Shinigami92 Shinigami92 requested a review from a team August 12, 2022 18:34
@Shinigami92 Shinigami92 requested a review from a team as a code owner August 12, 2022 18:34
CONTRIBUTING.md Outdated Show resolved Hide resolved
@Shinigami92 Shinigami92 changed the title ci: verify semantic pull requests infra: verify semantic pull requests Aug 13, 2022
@Shinigami92 Shinigami92 changed the title infra: verify semantic pull requests ci: verify semantic pull requests Aug 13, 2022
@Shinigami92
Copy link
Member Author

Cannot name it infra yet, as it's not in the main branch 😅

CONTRIBUTING.md Outdated Show resolved Hide resolved
scripts/verifyCommit.ts Outdated Show resolved Hide resolved
@ST-DDT ST-DDT added p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug labels Aug 13, 2022
Copy link
Member

@ST-DDT ST-DDT left a comment

Choose a reason for hiding this comment

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

Please also add an example commit message for a changed locale file.

ST-DDT
ST-DDT previously approved these changes Aug 13, 2022
Shinigami92 and others added 2 commits August 13, 2022 19:59
Co-authored-by: Eric Cheng <ericcheng9316@gmail.com>
@Shinigami92 Shinigami92 enabled auto-merge (squash) August 16, 2022 08:47
@Shinigami92 Shinigami92 merged commit 5dd30f3 into main Aug 16, 2022
@ST-DDT ST-DDT deleted the verify-semantic-pull-requests branch August 16, 2022 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: infra Changes to our infrastructure or project setup p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants