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

Add support for an initial repo with no tags, yet #43

Open
NullVoxPopuli opened this issue Dec 18, 2023 · 4 comments
Open

Add support for an initial repo with no tags, yet #43

NullVoxPopuli opened this issue Dec 18, 2023 · 4 comments

Comments

@NullVoxPopuli
Copy link
Contributor

I'm seeing in the logs:

 Error: Command failed with exit code 128: git describe --abbrev=0 --tags
fatal: No names found, cannot describe anything.

from: https://github.com/NullVoxPopuli/ember-eslint-parser/actions/runs/7255082401/job/19765027127

which does match what I see locally:

❯ git describe --abbrev=0 --tags
fatal: No names found, cannot describe anything.
@NullVoxPopuli
Copy link
Contributor Author

NullVoxPopuli commented Dec 19, 2023

oh this is actually from:

at Object.lastTag (
  /home/runner/work/ember-eslint-parser/ember-eslint-parser/node_modules/
    .pnpm/@[email protected]/node_modules/
      @ef4/lerna-changelog/lib/git.js:31:18)\n' 

@NullVoxPopuli
Copy link
Contributor Author

hmm, this is the code in ef4/lerna-changelog

  public async createMarkdown(options: Options = {}) {
    const from = options.tagFrom || (await Git.lastTag());
    const to = options.tagTo || "HEAD";

    const releases = await this.listReleases(from, to);

    return this.renderer.renderMarkdown(releases);
  }

so it seems a whole bunch of code needs to get skipped? because there are no releases

@NullVoxPopuli
Copy link
Contributor Author

Here is a step one: embroider-build/github-changelog#7

which may help with folks who haven't created a tag recently, or did so manually, and potentially incorrectly.

@mansona
Copy link
Member

mansona commented Feb 6, 2024

I responded to the PR in github-changelog, it might be a little while before we can merge that 🙃

In the mean time, what about adding a check somewhere here to see if there are any tags at all and displaying an error saying they need at least one tag (and maybe suggesting that they tag the initial commit as v0.0.0 or something)? What do you think?

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