Skip to content

Allow manual changes to persist across --override #139

Open

Description

@YellowKirby

Hello,

We've been happily using GREN on an enterprise Github instance to generate release notes based on PR data. We have a use-case where we'd like to add additional, hand-crafted release notes on top of the GREN-generated data that could be persisted even when using --override. This would be really useful in adding migration guides for major/breaking releases. We often end up regenerating the GREN release notes in order to add clarifications to PR titles.

Would it be possible to have the GREN-generated data live in a special block that GREN could replace rather than overwriting the entire body?

e.g., for the following release body:

// Hand-crafted release notes here
# Migration Guide
...

<!-- GREN-BEGIN -->
// Generated GREN data goes here
<!-- GREN-END -->

When using --override, GREN would only replace/regenerate the contents between the GREN-BEGIN and GREN-END comment blocks so that any manual additions to the release notes are not overwritten. Since these blocks are just HTML comments, they wouldn't end up visible in the overall release page.

FWIW, here's the .grenrc that we're using. Unfortunately I can't share the specific repo data because enterprise 😕

module.exports = {
	dataSource: 'prs',
	prefix: '',
	onlyMilestones: false,
	groupBy: {
		'💥 Breaking Changes 💥': ['Major (Breaking Change)'],
		'✨ Non-Breaking New Features ✨': ['Minor (New Feature)'],
		'🛠️ Bug Fixes + Misc 🛠️': ['Patch (Bug Fix)']
	},
	changelogFilename: 'CHANGELOG.md'
};

Thanks!

Activity

  1. alexcanessa commented on Mar 1, 2018

    @alexcanessa
    Member

    @YellowKirby I'm glad you're enjoying the tool!

    That is a brilliant idea!! I do agree that is something very helpful.

    Have you considered the other way around too (i.e. have a block for personal comments)?
    This would mean that gren would just not touch whatever is in the comment block.

    As this is coming from your experience, I'm just suggesting another solution to understand which one would suit your case more.

  2. YellowKirby commented on Mar 1, 2018

    @YellowKirby
    Author

    For our specific use-case, having the gren data in a comment block would probably be simpler. That way we can just start adding more notes to the top of the release without needing to remember to enclose them in a special comment, kind of like how git commit works:

    Freeform commit message here
    
    # ------------------------ >8 ------------------------
    # Do not modify or remove the line above.
    # Everything below it will be ignored.
    

    But either approach would be fine. If you think that a special comment block for personal comments would be more flexible, then that would work for us too 👍

  3. xetra11 commented on Dec 23, 2020

    @xetra11

    Love to have that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions