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

Add git conventional commit #227

Merged
merged 16 commits into from
May 5, 2021
Merged

Conversation

olblak
Copy link
Member

@olblak olblak commented May 1, 2021

Add Git conventional commit support to updatecli.
It can now be used from the scm configuration within target definition as defined in the following example.

  • Documentation pull request
targets:
  imageTag:
    name: "jenkins/jenkins docker tag"
    kind: yaml
    spec:
      file: "charts/jenkins/values.yaml"
      key: "jenkins.controller.imageTag"
    scm:
      git:
        url: "git@github.com:olblak/charts.git"
        branch: master
        user: olblak
        email: me@olblak.com
        directory: "/home/olblak/Project/Jenkins-infra/charts"
        commitMessage:
          type: fix
          scope: deps
commitMessage:
  type:       // Specify commit type, default set to chore
  scope:    // Specify commit scope,  *Optional
  footer:     // Specify commit footer message *Optional
  title:        // Override default body message
  hideCredit: // Remove "Made with ❤️️  by updatecli" from commit message
  body:      // Override default body message

If no "commitMessage" is defined then the default behavior displays a commit message like

Author: olblak <updatecli@updatecli.io>
Date:   Tue May 4 15:41:44 2021 +0200

    chore: Update key "dependencies[0].version" from file "charts/jenkins/r...
    
    ... equirements.yaml"
    
    Made with ❤️️  by updatecli

Signed-off-by: Olivier Vernin olivier@vernin.me

@olblak olblak added the enhancement New feature or request label May 1, 2021
@olblak olblak requested a review from dduportal May 1, 2021 05:53
Signed-off-by: Olivier Vernin <olivier@vernin.me>
olblak and others added 10 commits May 1, 2021 08:02
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Use pointer

Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
@dduportal
Copy link
Contributor

I got a few questions:

  • What is the result if the attribute commitMessage is not set? Does it keep the same behavior as before?
  • Could you add a result exemple in the PR message (until the doc PR is done)? So it would make clear what is the output

olblak added 5 commits May 4, 2021 14:13
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Fix unitest

Signed-off-by: Olivier Vernin <olivier@vernin.me>
@olblak olblak merged commit b836057 into updatecli:main May 5, 2021
@olblak olblak deleted the conventionnalCommits branch August 30, 2021 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants