Includes an auto_branch_prefix property#2
Open
jessie-freenow wants to merge 3 commits intofreenowtech:mainfrom
Open
Includes an auto_branch_prefix property#2jessie-freenow wants to merge 3 commits intofreenowtech:mainfrom
jessie-freenow wants to merge 3 commits intofreenowtech:mainfrom
Conversation
Identifies the ticket type to create branches with prefixes like: feature, bugfix, or refactor
neugartf
reviewed
Feb 5, 2024
| stdout=subprocess.PIPE) | ||
| process.communicate() | ||
| else: | ||
| print("No menu entry selected. Exiting.") |
neugartf
reviewed
Feb 5, 2024
| MAX_RESULT = 5 | ||
|
|
||
| # Mapping of ticket types to branch prefixes | ||
| TICKET_TYPE_TO_PREFIX = { |
Collaborator
There was a problem hiding this comment.
I'd honestly move this to an environment variable, so everyone can define the mapping themselves (more extendable).
JIRA_TYPE_MAPPING="Story=feature,Task=feature"
https://github.com/sloria/environs can read these maps.
neugartf
reviewed
Feb 5, 2024
| def main(prefix: Annotated[str, typer.Option(help="Prefix that is being used for the new branch.")] = "feature", | ||
| no_prefix: Annotated[bool, typer.Option("--no-prefix", help="Will not use a prefix")] = False): | ||
| no_prefix: Annotated[bool, typer.Option("--no-prefix", help="Will not use a prefix")] = False, | ||
| auto_branch_prefix: Annotated[bool, typer.Option("--auto-branch-prefix", help="Automatically determine branch prefix based on ticket type")] = False): |
Collaborator
There was a problem hiding this comment.
If you do https://github.com/freenowtech/git-jira/pull/2/files#r1477907772, I think you can drop this (=> only map if the variable is defined).
Collaborator
|
Oh, also |
Collaborator
|
Push |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Identifies the ticket type to create branches with prefixes like
feature,bugfix, orrefactorFixes #1