Closed abitrolly closed 2 years ago
Scopes are purely optional, and so we leave it to the contributors to decode what they want to include. Few things that come to mind are:
@ankitm123 I don't see anybody referencing scopes in https://github.com/jenkins-x/jx except dependency bot. Looks like they are unused. Is there a changelog generated from the conventional messages for jx
?
They are mostly used to give an idea to the reviewer which part of the code base is being changed. In an ideal world, scope would be used to ask for reviews from SMEs (Subject Matter Experts) of that part of the codebase. So say for example, reviewer A sees a commit message:
feat(helmfile): add next big thing
He knows the change is related to helmfiles, and would assign the PR to a reviewer who knows how helmfiles are used in the project.
As I said before, they are completely optional, and we dont normally include them.
Here is the list of all project change types and scopes from this repo sorted by usage.
✗ git log --pretty=format:%s | egrep -o "^(\w|[()])+:" | sort | uniq -c | sort -rh
1271 fix(regex):
574 fix:
543 chore:
346 chore(deps):
295 docs:
60 feat:
13 refactor:
13 chore(dependencies):
4 Fix:
4 doc:
3 brew:
2 fix(doc):
2 (docs):
2 debug:
2 Chore:
1 WIP:
1 Update:
1 update:
1 typofix:
1 i18n:
1 fix(sidebar):
1 fix(pencil):
1 fix(menu):
1 fix(Jenkinsfile):
1 fix(jenkinsfile):
1 fix(git):
1 fixes:
1 fixed:
1 fix(blog):
1 feat(pipelines):
1 feat(doc):
1 Feat:
1 Docs:
1 dep:
1 Closes:
1 chore(apps):
1 build(deps):
And here are stats from the jx
repo.
Sorry, what is the issue here? I am a bit confused ... You can see this: https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#commit-message-format
So in ur example, scope for these commits would be:
fix(sidebar):
fix(pencil):
fix(menu):
fix(Jenkinsfile):
fix(jenkinsfile):
sidebar, pencil, menu, Jenkinsfile, jenkinsfile ... Not super useful imo. It's not mandatory as defined by conventional commits.
@ankitm123 we are talking about jx
project right? There is no pencil
here, or I am missing something.
The issue is to get a handy lookup page without too much references to external sites.
The issue is to get a handy lookup page without too much references to external sites.
We can just mention that scope is optional in the docs. wdyt?
Yep.
But it still interesting to see how types/scopes are actually used. Because there are no changelogs generated, maybe there can be a link to script that is bumping versions?
Some of the most popular scopes for jx
.
87 vault
79 install
75 tekton
14 test
14 import
Does adding https://github.com/conventional-changelog/commitlint and formalizing the scopes make sense for jx
projects?
This is a Bug Report
Problem:
The "conventional commit message" at https://jenkins-x.io/community/code/#the-commit-message needs a scope, but no scopes are documented. What are scopes for main repo and for
jx-docs
?Page to Update:
https://jenkins-x.io/community/code/#the-commit-message