Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add Git Branch Pattern property #6129

Conversation

Zelnes
Copy link

@Zelnes Zelnes commented Jan 29, 2025

Prerequisites

  • I have read and understood the contributing guide.
  • The commit message follows the conventional commits guidelines.
  • Tests for the changes have been added (for bug fixes / features).
  • Docs have been added/updated (for bug fixes / features).

Description

This proposal aims to give control over the branch name that is extracted, with regular expressions.

I am not familiar with Go, but tried my best.

In my workflow, I usually have long branch name (such as feature/PROJECT-12345-scope-of-ticket), and while interacting in the terminal, I don't really care about the scope. This feature allows me to extract only the issue part, and can still be combined with the mapping_branches.

Can't wait to have feedback, and hopefully see something like this in the project, which is great btw, good job !

Also, I have to say that the setup was pretty easy, thanks to the devcontainer. 👍

Question

Is the documentation/schema aimed to be edited by hand ? Or is there anything I missed to handle this automatically ?
I felt it hard to write this part, mainly due to alignment.

Property that allows to extract some part, based on a regex, from the branch name.
@Zelnes Zelnes force-pushed the feature/add-git-property-to-extract-from-regex branch from 61419e7 to 34b0cdc Compare January 29, 2025 14:05
@JanDeDobbeleer
Copy link
Owner

@Zelnes your PR made me think about what we do with branches and I just made something more interesting there to allow leveraging templates with branch name formatting. So to enable this, all we need to do is expose the regex function in the template and done.

@Zelnes
Copy link
Author

Zelnes commented Feb 10, 2025

Thanks for the reply, and glad to hear that something similar can show up.
What should we do here ? Close the PR ?

@JanDeDobbeleer
Copy link
Owner

@Zelnes I would close it, but I'll still attribute you in the change I'm making. Would also be cool if you could validate that.

@Zelnes
Copy link
Author

Zelnes commented Feb 12, 2025

I'm okay with this proposition 😄

@Zelnes Zelnes closed this Feb 12, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants