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

Semantic release tool is creating "git notes" is there documentation on why is that, and a way to disable this? #452

Open
hpe-ykoehler opened this issue May 18, 2023 · 2 comments

Comments

@hpe-ykoehler
Copy link

I have the following semantic-release configuration file:

{
  "branches": [
    "mainline",
    { name: "devel", prerelease: 'alpha'}
  ],
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    "@semantic-release/changelog",
    ["@semantic-release/exec", {
      "prepareCmd": "echo '${nextRelease.version}' > version"
    }],
    ["@semantic-release/git", {
      "assets": ["CHANGELOG.md", "version"],
      "message": "chore(release): [KR-24] ${nextRelease.version}"
    }]
  ]
}

and I am seeing some commit related to "git notes" with a channel in it.

Notes added by 'git notes add'

{"channels":["devel"]}

etc...

I am not familiar with git notes but in our organization we do not really use those, how can I disable the creation of those? Or learn more about what is the purpose, etc.

@dalssaso
Copy link

I've been experiencing the same behaviour and I couldn't find a way to disable it

The issue here is a bit worst I can't even push it to our private gitlab instance as it's not allowed 😢

I coulnd't find this option on the code which is weird because there's no reference on for ref/notes/ in the code (im no expert in JS btw, so I could've missed it)

@dalssaso
Copy link

Just an update here from my part.

I found the "issue" and it turns out it's not possible to disable it because it's how semantic-release keeps track of the releases it generates (I'm not entirely sure about how because i didn't go that deep)

The part of the code that does these pushes is here: https://github.com/semantic-release/semantic-release/blob/master/lib/git.js#L250

I also found this that helped me understand what is happening: semantic-release/semantic-release#2017

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

No branches or pull requests

2 participants