marcocesarato / php-conventional-changelog

A PHP tool built to generate a changelog from a project's commit messages and metadata following the conventionalcommits.org and automate versioning with semver.org.
GNU General Public License v3.0
230 stars 32 forks source link

Double slash after hostname in compare link #22

Open kyletaylored opened 3 years ago

kyletaylored commented 3 years ago

Seeing a double slash after the hostname in the version comparison link.

image

attiks commented 3 years ago

I ran into the same, seems like {{owner}} isn't populated

Create a .changelog file with this

<?php

return [
  'commitUrlFormat' => '{{host}}/{{repository}}/commit/{{hash}}',
  'compareUrlFormat' => '{{host}}/{{repository}}/compare/{{previousTag}}...{{currentTag}}',
];
marcocesarato commented 3 years ago

Hi, to check it I need to know the repository URL format to check how the regular expression works when parsing.

attiks commented 3 years ago
$ git remote show origin -n
* remote origin
  Fetch URL: git@github.com:UN-OCHA/iasc8.git
  Push  URL: git@github.com:UN-OCHA/iasc8.git
attiks commented 3 years ago

Might be easier to clean the URL, replacing // with / in get....Url methods

marcocesarato commented 3 years ago

Strange that the owner is not populated. However I have released a new version with url clean and that improve the url format detection.

attiks commented 3 years ago

:+1: