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

Wrong links in release-notes #145

Closed
efuturetoday opened this issue Oct 11, 2019 · 6 comments
Closed

Wrong links in release-notes #145

efuturetoday opened this issue Oct 11, 2019 · 6 comments

Comments

@efuturetoday
Copy link

efuturetoday commented Oct 11, 2019

Hello all,

first thanks for your awesome work! Currently, we are using a selfhosted Gitlab instance to manage our internal source codes. I have a npm-package that is using semantic-release in order to create a Gitlab release. The problem is that the release-notes have wrong commit links.

Every commit is like this /binary-factory/wp-theme-binary-factory-ci-test/dev/6ebe4ac but it should be /binary-factory/wp-theme-binary-factory-ci-test/commit/6ebe4ac.

Here is my package.json:

{
  "name": "@binary-factory/wp-starter",
  "version": "0.0.0",
  "private": true,
  "description": "",
  "main": "index.js",
  "scripts": {
    "gulp": "gulp --gulpfile node_modules/@binary-factory/wp-builder/gulpfile.js --cwd .",
    "up": "docker-compose up",
    "wp": "docker-compose exec wordpress wp",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "git@gitlab.binary-factory.de:binary-factory/wp-theme-binary-factory-ci-test.git"
  },
  "author": "binary-factory",
  "license": "ISC",
  "devDependencies": {
    "@binary-factory/wp-builder": "^1.0.1",
    "@semantic-release/changelog": "^3.0.4",
    "@semantic-release/exec": "^3.3.7",
    "@semantic-release/git": "^7.0.16",
    "@semantic-release/gitlab": "^4.0.0",
    "@types/jquery": "^3.3.30",
    "bootstrap": "^4.3.1",
    "gulp-cli": "^2.2.0",
    "jquery": "^3.4.1",
    "semantic-release": "^15.13.24"
  },
  "dependencies": {
    "normalize-scss": "^7.0.1",
    "sass-burger": "^1.3.1"
  },
  "release": {
    "plugins": [
      "@semantic-release/commit-analyzer",
      "@semantic-release/release-notes-generator",
      "@semantic-release/changelog",
      "@semantic-release/npm",
      [
        "@semantic-release/exec",
        {
          "prepareCmd": "npm run gulp bundle"
        }
      ],
      "@semantic-release/git",
      [
        "@semantic-release/gitlab",
        {
          "assets": [
            {
              "path": "package/*.zip",
              "label": "Theme"
            }
          ]
        }
      ]
    ]
  }
}

Do you have any clues what is the problem here?
Thank you in advance for your time!

Best regards
Oliver Haase

@pvdlg pvdlg transferred this issue from semantic-release/gitlab Oct 11, 2019
@pvdlg
Copy link
Member

pvdlg commented Oct 11, 2019

This is defined by the commit property passed to the conventional-changelog context.

By default conventional-changelog set it to commits but we set it in our default to commit for GitLab.

This value can also be set via this plugin commit option.

I guess you must have something somewhere that set that value to dev instead and override both defaults.

@efuturetoday
Copy link
Author

Hello pvdlg,

thank you for your fast response. That is a good catch for me - now I know which property controls the commit links. The strange thing is I do not modify the semantic-release context in any way and just using the official plugins for it. Side note: The @semantic-release/changelogplugin does indeed generate a correct changelog where the links to the commits are correct.

@pvdlg
Copy link
Member

pvdlg commented Oct 11, 2019

@semantic-release/changelog doesn't generate any changelog it just write the text generated by semantic-release/release-notes-generator into a file.

The changelog text we add to the GitLab release and the one we write in CHANGELOG.md is strictly the same. If you see a difference between those two it means GitLAb change it on its side.

@efuturetoday
Copy link
Author

efuturetoday commented Oct 11, 2019

@pvdlg it does make sense for me that the semantic-release/release-notes-generator does generate the changelog and the other plugins just consumes it. I will do a little test on my side and see if the @semantic-release/gitlab does send the right markdown to the gitlab backend. But I guess it will be fine. dev is the default branch for my repository. So it's possible, that Gitlab does process the markdown in any way and modify it. I will report the results here. Thank you for pointing this out!

@efuturetoday
Copy link
Author

You can close this issue. It is obsolete. Gitlab receives the correct changelog and modifies it. I will investigate further on Gitlab. Thank you for your time and fast response!

@pvdlg pvdlg closed this as completed Oct 11, 2019
@arkadioz
Copy link

arkadioz commented Jan 5, 2024

Hi @pvdlg @efuturetoday I have this same issue but with bitbucket, my commits links in the release notes and changelog look like:

https://bitbucket.org/my-workspace/my-repo/commit/commitnumber

but it should be:

https://bitbucket.org/my-workspace/my-repo/commits/commitnumber

notice it should have s in commits, I notice here it is well configured

but why is my config not applying it? Am I missing something like maybe setting it up in releaserc.json file? Let me know if you need to see my .releaserc.json file or anything, thanks

SOLVED: conventional-changelog/conventional-changelog-config-spec#90 (comment)

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

3 participants