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

Annotate commits by path #491

Open
DanCardin opened this issue Feb 9, 2024 · 1 comment
Open

Annotate commits by path #491

DanCardin opened this issue Feb 9, 2024 · 1 comment
Assignees
Labels
feature/request New feature or request

Comments

@DanCardin
Copy link

Is your feature request related to a problem? Please describe.

We are generating a centralized changelog for different sub-projects within a monorepo. At present, we're using --include-path to generate N separate changelogs.

However, a given commit can span multiple sub-projects, and the total "changelog" produced by unioning each individual path's result can be long and contain a lot of duplication.

I can see a few different ways of enabling the above workflow to produce a result that's much more compact.

Describe the solution you'd like

  1. The ability to annotate "named paths" and have that be accessible inside the "context".

    [named-paths]
    "lib/foo" = "Foo"
    "lib/bar" = "Bar"
    "service/Baz" = "BaZ"

    producing a "named-paths": ["Foo", "Bar", "Baz"] in the context, enabling one to customize the template to render those paths alongside each commit line-item in their respective sections

  2. The ability to execute git-cliff against externally deserialized context

    git-cliff --include-path lib/foo --output foo.json
    git-cliff --include-path lib/bar --output bar.json
    # jq magic that deduplicates commits and annotates them in some way that does something like the above
    git-cliff --from-context combined-context.json
  3. The ability to --include-paths multiple times (supported already), but expose the (full set of) matched paths to the context, for similar reasons to option 1.

@DanCardin DanCardin added the feature/request New feature or request label Feb 9, 2024
Copy link

welcome bot commented Feb 9, 2024

Thanks for opening your first issue at git-cliff! Be sure to follow the issue template! ⛰️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants