jenkins-x / jx-docs

Source code used to build the Jenkins X documentation and website
http://jenkins-x.io/
Apache License 2.0
86 stars 358 forks source link

What are the project scopes? #3474

Closed abitrolly closed 2 years ago

abitrolly commented 2 years ago

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

ankitm123 commented 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:

abitrolly commented 2 years ago

@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?

ankitm123 commented 2 years ago

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.

abitrolly commented 2 years ago

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):
abitrolly commented 2 years ago

And here are stats from the jx repo.

Click to expand ``` ✗ git log --pretty=format:%s | egrep -o "^(\w|[()])+:" | sort | uniq -c | sort -rh 2908 fix: 1474 chore: 914 chore(deps): 604 feat: 81 docs: 75 refactor: 52 fix(tekton): 43 test: 42 Fix: 32 refactor(install): 31 feat(vault): 29 fix(vault): 27 fix(install): 16 style: 16 chore(vault): 14 chore(tekton): 12 feature: 11 chore(quality): 11 chore(install): 11 Chore: 9 fix(test): 8 fix(pipeline): 8 fix(import): 8 fix(git): 8 feat(tekton): 7 fix(boot): 7 feat(install): 6 refactor(vault): 6 fix(versionstreams): 6 fix(ingress): 6 feat(cve): 5 fix(logs): 5 fix(jenkins): 5 feat(application): 5 Feat: 5 chore(test): 4 test(vault): 4 revert: 4 refactor(common): 4 fix(windows): 4 fix(tests): 4 fix(quickstarts): 4 fix(preview): 4 fix(Jenkinsfile): 4 fix(jenkinsfile): 4 fix(cmd): 4 fix(bitbucket): 4 fix(applications): 4 feat(apps): 4 chore(github): 4 bug: 3 test(import): 3 fix(version): 3 fix(quickstart): 3 fix(init): 3 fix(gitops): 3 fixes: 3 fix(activity): 3 feat(terraform): 3 feat(prow): 3 feat(preview): 3 feat(ingress): 3 feat(git): 3 feat(devpod): 3 doc: 3 chore(docs): 3 chore(config): 3 chore(applications): 2 wip: 2 test(gke): 2 refactor(cmd): 2 fix(upgrade): 2 fix(terraform): 2 fix(sso): 2 fix(prow): 2 fix(helm): 2 fix(gke): 2 fix(eksctl): 2 fix(devpod): 2 fix(compliance): 2 fix(cli): 2 fix(certs): 2 fix(bdd): 2 fix(aws): 2 feat(versionstreams): 2 feat(kpipelines): 2 feat(helm): 2 feat(gitops): 2 feat(codeship): 2 feat(applications): 2 chore(tests): 2 chore(logging): 2 chore(import): 2 chore(Hound): 2 chore(hound): 2 bug(install): 1 vault(vault): 1 Typo: 1 test(uninstall): 1 test(status): 1 tests: 1 test(pki): 1 test(git): 1 refactor(tekton): 1 refactor(roles): 1 refactor(prow): 1 refactor(preview): 1 refactor(pki): 1 pipelinerunner: 1 nit: 1 Minikube: 1 fix(webhook): 1 fix(versions): 1 fix(uninstall): 1 fix(typo): 1 fix(tag): 1 fix(sync): 1 fix(storage): 1 fix(sourcerepositories): 1 fix(secreturl): 1 fix(secrets): 1 fix(release): 1 fix(rbac): 1 fix(promote): 1 fix(pegomock): 1 fix(minikube): 1 fix(login): 1 fix(lint): 1 fix(kpipelines): 1 fix(kipelines): 1 fix(issuer): 1 fix(hound): 1 fix(gits): 1 fix(gc): 1 fix(environments): 1 fix(eks): 1 fix(documentation): 1 fix(docs): 1 fix(devpods): 1 fix(cve): 1 fix(controller_team): 1 fix(controller): 1 fix(config): 1 fix(comments): 1 fix(cdx): 1 fix(buildnum): 1 fix(bitbucketcloud): 1 fix(auth): 1 fix(aks): 1 feat(versions): 1 feat(util): 1 feature(pki): 1 Feature: 1 feat(upgrade): 1 feat(tag): 1 feat(sourcerepository): 1 feat(pipelines): 1 feat(pipeline): 1 feat(kube): 1 feat(init): 1 feat(import): 1 feat(gits): 1 feat(draft): 1 feat(domain): 1 feat(diagnose): 1 feat(devpods): 1 feat(cmd): 1 feat(cloud): 1 feat(cli): 1 feat(chart): 1 feat(changelog): 1 feat(cdx): 1 feat(buildlogs): 1 feat(bitbucketcloud): 1 feat(bitbucket): 1 feat(aws): 1 docs(applications): 1 doc(jx): 1 chore(version): 1 chore(uninstall): 1 chore(typo): 1 chore(tidy): 1 chore(sso): 1 chore(services): 1 chore(service): 1 chore(preview): 1 chore(logs): 1 chore(loggind): 1 chore(jenkinsfile): 1 chore(help): 1 chore(git): 1 chore(gcloud): 1 chore(factory): 1 chore(doc): 1 chore(devpod): 1 chore(cve): 1 chore(create): 1 chore(compliance): 1 chore(code): 1 chore(buildnumbers): 1 chore(build): 1 chore(bitbucket): 1 chore(bdd): 1 (chore): 1 added: ```
ankitm123 commented 2 years ago

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

ankitm123 commented 2 years ago

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.

abitrolly commented 2 years ago

@ankitm123 we are talking about jx project right? There is no pencil here, or I am missing something.

abitrolly commented 2 years ago

The issue is to get a handy lookup page without too much references to external sites.

ankitm123 commented 2 years ago

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?

abitrolly commented 2 years ago

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?

abitrolly commented 2 years ago

Some of the most popular scopes for jx.

     87 vault
     79 install
     75 tekton
     14 test
     14 import
Click to expand ```bash 914 deps 87 vault 79 install 75 tekton 14 test 14 import 13 git 11 quality 10 applications 9 preview 9 pipeline 9 ingress 8 versionstreams 8 cve 7 cmd 7 boot 6 tests 6 prow 6 logs 6 devpod 6 bitbucket 5 terraform 5 jenkinsfile 5 jenkins 5 gitops 5 application 4 windows 4 version 4 quickstarts 4 Jenkinsfile 4 init 4 helm 4 gke 4 github 4 docs 4 config 4 common 4 apps 3 upgrade 3 uninstall 3 sso 3 quickstart 3 pki 3 kpipelines 3 hound 3 compliance 3 cli 3 bdd 3 aws 3 activity 2 versions 2 typo 2 tag 2 logging 2 Hound 2 gits 2 eksctl 2 devpods 2 codeship 2 certs 2 cdx 2 bitbucketcloud 1 webhook 1 util 1 tidy 1 sync 1 storage 1 status 1 sourcerepository 1 sourcerepositories 1 services 1 service 1 secreturl 1 secrets 1 roles 1 release 1 rbac 1 promote 1 pipelines 1 pegomock 1 minikube 1 login 1 loggind 1 lint 1 kube 1 kipelines 1 jx 1 issuer 1 help 1 gcloud 1 gc 1 factory 1 environments 1 eks 1 draft 1 domain 1 documentation 1 doc 1 diagnose 1 create 1 controller_team 1 controller 1 comments 1 code 1 cloud 1 chore 1 chart 1 changelog 1 buildnumbers 1 buildnum 1 buildlogs 1 build 1 auth 1 aks ```

Does adding https://github.com/conventional-changelog/commitlint and formalizing the scopes make sense for jx projects?