lerna-changelog icon indicating copy to clipboard operation
lerna-changelog copied to clipboard

Unable to get output to render

Open jordanpapaleo opened this issue 7 years ago • 15 comments

Hi -

I globally installed lerna-changelog:

image

I setup my config:

{
  "lerna": "2.0.0",
  "version": "0.7.0",
  "ignoreCommitters": false,
  "changelog": {
    "repo": "clearcapital/ccp",
    "labels": {
      "feature": ":rocket: New Feature",
      "bug": ":bug: Bug Fix"
    },
    "cacheDir": ".changelog"
  }
}

I verified that I am using correct labels for labels in my repo.

image

image

I created my GitHub API access token selecting the repo option as I have a private repo. I used that key to authenticate.

When I run lerna-changelog:

image

The cacheDir at my application root is created but nothing to 'CopyPasta' in the console. I feel like I am missing something really dumb here.

How do I get the output to copy into a changelog.md file?

Thanks!.

Jordan

jordanpapaleo avatar Dec 01 '17 06:12 jordanpapaleo

The setup looks good, you just need to have some releases/tags first, otherwise there is nothing to be shown 😉

You can see below all the steps necessary to gather the list of releases: https://github.com/lerna/lerna-changelog/blob/bcc8a3a6e9445c69c5713183c86708b97cbcbb3a/src/changelog.ts#L36-L66

emmenko avatar Dec 01 '17 12:12 emmenko

Good Morning!

So isn't this supposed to use the labels applied in GitHub?

Uses github PR/Issue names categorized by labels with configurable headings

Here is an example from closed issues on my project:

image

Here are tags from my git tags:

release/0.2.0-mba
v0.1.1
v0.1.2
v0.1.3
v0.10.0
v0.10.1
v0.10.3
v0.11.0
v0.12.0
v0.13.0
v0.14.0
v0.14.1
v0.14.2
v0.15.0
v0.16.0
v0.16.1
v0.2.0
v0.3.0
v0.4.0
v0.5.0
v0.6.0
v0.7.0
v0.7.1
v0.8.0
v0.9.0
v0.9.1
v0.9.2
v0.9.3

I am super pumped on this project and hope we can figure this out.

jordanpapaleo avatar Dec 01 '17 16:12 jordanpapaleo

Ah I see. I guess at this point the easiest and quickest way to find out where the problem is is to debug through the steps I linked above.

Simply add some logs into the node_modules/lerna-changelog file and see where things are missing 🕵️

Thanks

emmenko avatar Dec 02 '17 09:12 emmenko

@jordanpapaleo I'm having the same issue. Were you able to figure out what went wrong?

dannyphillips avatar Dec 12 '17 00:12 dannyphillips

No. I have not had the chance to debug the lerna code but it’s on my list. I’ll post whatever I find out. Will you do the same?

I love to see a step by step showing it work.

jordanpapaleo avatar Dec 12 '17 04:12 jordanpapaleo

Any luck on this? I can't for the life of me figure out how to get lerna-changelog to produce any output whatsoever...

lerna.json

  "lerna": "2.8.0",
  "packages": [
    "packages/*"
  ],
  "version": "0.0.3",
  "changelog": {
    "repo": "myorg/myrepo",
    "labels": {
      "enhancement": ":rocket: Enhancement",
      "bug": ":bug: Bug Fix"
    },
    "cacheDir": ".changelog"
  }
}

I've tried doing commits then lerna-changelog, branching then doing commits which fix/reference issues with labels then doing a PR and merging then lerna-changelog. All with no output generated, am I missing something, am I doing something wrong?

taicho avatar Feb 14 '18 20:02 taicho

Is it a private repo? I think my issue might be with correctly authenticating.

But I have made no progress on it yet.

jordanpapaleo avatar Feb 15 '18 01:02 jordanpapaleo

@jordanpapaleo It is indeed a private repo. That being said, I authenticated using a personal token (with full repo permissions) ala GITHUB_AUTH and it appears that it even downloads stuff into the .changelog directory but no output or anything beyond that.

taicho avatar Feb 15 '18 01:02 taicho

@jordanpapaleo I ended up switching to https://github.com/skywinder/github-changelog-generator... I really liked the style of this changelog but with the stack of issues, a PR on definite hold and 4 months since the last code change it's starting to feel like this repo/package has stagnated (at least for the time being).

taicho avatar Feb 15 '18 17:02 taicho

I was using my personal token as well with no success. I’ll check that out.

jordanpapaleo avatar Feb 16 '18 03:02 jordanpapaleo

@taicho can you provide a public repo that reproduces the issue? lerna-changelog is working fine for me and I'm curious what the issue is.

the regular workflow is:

  • commit code as pull request
  • apply labels to the pull request
  • merge the pull request
  • use lerna-changelog to generate changelog from labels pull requests

Issues are not included, only PRs.

Turbo87 avatar Jun 17 '18 00:06 Turbo87

I think the issue is with private repos.

Sent from my smallest computer

On Jun 16, 2018, at 5:03 PM, Tobias Bieniek [email protected] wrote:

@taicho can you provide a public repo that reproduces the issue? lerna-changelog is working fine for me and I'm curious what the issue is.

the regular workflow is:

commit code as pull request apply labels to the pull request merge the pull request use lerna-changelog to generate changelog from labels pull requests Issues are not included, only PRs.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

jordanpapaleo avatar Jun 17 '18 04:06 jordanpapaleo

I also cannot get any output, and the project is public

https://github.com/Scout24/as24-custom-events

so definitely something missing / broken

Update: It was a problem with the access token (required extra work authorizing it in github since it's part of my company). I only realized when testing https://github.com/github-tools/github-release-notes

So definitely the error display on rejected github API calls should be improved (it was a 403).

inakianduaga avatar Aug 27 '18 22:08 inakianduaga

So definitely the error display on rejected github API calls should be improved (it was a 403).

PRs welcome :)

Turbo87 avatar Aug 28 '18 07:08 Turbo87

Meet with the problem, but I have solved it。

There are a few points to note:

  1. After you merge the pull request that already has a label added,you should checkout master branch locally

  2. Maybe the issue request is a failure,for me ,it reported Bad credentials , so I update my GITHUB_AUTH and finally it succeeded

suanmei avatar Nov 19 '18 18:11 suanmei