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

TOC generation with git hooks #720

Merged
merged 4 commits into from
Jan 21, 2022
Merged

Conversation

juan131
Copy link
Collaborator

@juan131 juan131 commented Jan 21, 2022

Signed-off-by: juan131 juanariza@vmware.com

Description of the change

We recently enabled branch protection rules for the "main" branch. As a result, the TOC Generator hook is failing with the error below:

    >> remote: error: GH006: Protected branch update failed for refs/heads/main.        

The current TOC Generator hook only allows to push commits when it's triggered by a "push event" (this is what happens after merging a PR), therefore is no longer valid for us. As an alternative, we can use git-hooks to update the TOC before committing changes affecting .md and .txt files.

Benefits

README.md's TOC is autogenerated.

Possible drawbacks

Users need to instal git-hooks and doctoc locally to modify the README.md.

Applicable issues

N/A

Additional information

N/A

juan131 added 2 commits January 21, 2022 11:38
Signed-off-by: juan131 <juanariza@vmware.com>
Signed-off-by: juan131 <juanariza@vmware.com>
juan131 added 2 commits January 21, 2022 11:48
Signed-off-by: juan131 <juanariza@vmware.com>
Signed-off-by: juan131 <juanariza@vmware.com>
Copy link
Collaborator

@alvneiayu alvneiayu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@juan131 juan131 merged commit 40062cf into bitnami-labs:main Jan 21, 2022
@juan131 juan131 deleted the toc-githooks branch January 21, 2022 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants