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

If get-pkg-repo fails to get info, it should fall back to the original repo url #98

Closed
rsids opened this issue Sep 2, 2015 · 10 comments

Comments

@rsids
Copy link

rsids commented Sep 2, 2015

The changelog only includes issues when the repository url is a known url (eg bitbucket or github). When using a private url, the generator doesn't parse the issuenumbers

@stevemao
Copy link
Member

stevemao commented Sep 2, 2015

The intension was to use get-pkg-repo to get repo url info and if it fails, it should fall back to the original repo url. I'll have to have a look.

@rsids
Copy link
Author

rsids commented Sep 3, 2015

When you use an unknown repo, you have to specify the host, repo & commit value in the context object. That will relink the commits, but it won't link the issues.
Even if it would, there should be an extra option for the issue links. In the project we're using conventional changelog, the repo has an entirely different url as the issuetracker.

@oupala
Copy link
Contributor

oupala commented Sep 3, 2015

@rsids Could give an example about how to specify host, repo & commit value in the context object.

Thanks.

@rsids
Copy link
Author

rsids commented Sep 3, 2015

context: {
      // context goes here
      host: 'https://git.HOST.nl/projects/ON/repos',
      repository: 'REPONAME',
      issue: 'issues',
      linkReferences: false
},

I've just found that it won't link the issues since I hadn't specified the referenceActions in the parserOpts. Which shouldn't be necessary, since I just want to use the defaults.
With the referenceActions specified, the issues are appended, but all prefixed with a #, not with the prefix I specified in issuePrefixes, see #99.
Furthermore, our git repo is at https://git.HOST.nl/..., while are issuetracker is as https://jira.HOST.nl/..., now, all the issues are linkt to git.HOST.nl.

@stevemao
Copy link
Member

stevemao commented Sep 3, 2015

for host defaults, we only support three. PR welcome for more hosts #80

@stevemao
Copy link
Member

stevemao commented Sep 3, 2015

Blocked by #91 which is blocked by sindresorhus/read-pkg#2

@stevemao
Copy link
Member

stevemao commented Sep 3, 2015

Also @rsids please keep this issue focused. I already opened #80 to track for more host support. Let's keep this for the fallback if repo cannot be parsed by get-pkg-repo

@ghost
Copy link

ghost commented Sep 8, 2015

I'm encountering the same issue while working with a package hosted on an on-premise GitLab instance.

Here's the results of running get-pkg-repo directly:

get-pkg-repo package.json
{ protocol: 'https:',
  slashes: true,
  auth: null,
  host: 'gitlab.example.com',
  port: null,
  hostname: 'gitlab.example.com',
  hash: null,
  search: null,
  query: null,
  pathname: '/mygroup/mymodule.git',
  path: '/mygroup/mymodule.git',
  href: 'https://gitlab.example.com/mygroup/mymodule.git',
  browse: [Function] }

@raido
Copy link

raido commented Sep 11, 2015

I am having same issues with on premises repos. Futher more i would like to even link issues with tools like JIRA and others.

@stevemao
Copy link
Member

@raido #80

@stevemao stevemao changed the title Issues are only linked when repo is a known type If get-pkg-repo fails to get info, it should fall back to the original repo url Sep 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants