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

Support extensions of the commit template language #3117

Merged
merged 3 commits into from
Mar 1, 2024

Conversation

torquestomp
Copy link
Contributor

@torquestomp torquestomp commented Feb 21, 2024

If this pattern looks good, I'll look into providing hooks for the OperationTemplateLanguage as well as the Revset language in a similar fashion; this PR is something of a dry-run. I added some examples to show how this would look in a custom binary.

This doesn't support custom types (yet), I'm not sure if that's something we really care to support or if there's a good way to do it. Open to suggestions

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added tests to cover my changes

cli/src/commit_templater.rs Outdated Show resolved Hide resolved
@torquestomp
Copy link
Contributor Author

I have retooled this to adapt to yuja's recent templater changes; PTAL

cli/src/template_builder.rs Outdated Show resolved Hide resolved
cli/src/template_builder.rs Outdated Show resolved Hide resolved
cli/src/commit_templater.rs Outdated Show resolved Hide resolved
cli/src/cli_util.rs Outdated Show resolved Hide resolved
@torquestomp torquestomp force-pushed the dploch/cmt-tmpl-ext branch 2 times, most recently from 7f22b7e to 5d7c1b8 Compare March 1, 2024 04:28
@torquestomp torquestomp enabled auto-merge (rebase) March 1, 2024 04:32
Copy link
Contributor

@yuja yuja left a comment

Choose a reason for hiding this comment

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

Thanks!

cli/examples/custom-commit-templater/main.rs Outdated Show resolved Hide resolved
cli/examples/custom-commit-templater/main.rs Outdated Show resolved Hide resolved
cli/src/template_builder.rs Outdated Show resolved Hide resolved
auto-merge was automatically disabled March 1, 2024 14:59

Head branch was modified

@torquestomp torquestomp enabled auto-merge (rebase) March 1, 2024 15:12
@torquestomp torquestomp force-pushed the dploch/cmt-tmpl-ext branch 2 times, most recently from badce8e to baced8b Compare March 1, 2024 15:33
@torquestomp torquestomp merged commit 570fd29 into main Mar 1, 2024
16 checks passed
@torquestomp torquestomp deleted the dploch/cmt-tmpl-ext branch March 1, 2024 15:42
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

Successfully merging this pull request may close these issues.

2 participants