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

[feature] git extension - add branch name validation #50241

Closed
raix opened this issue May 21, 2018 · 6 comments · Fixed by #50712
Closed

[feature] git extension - add branch name validation #50241

raix opened this issue May 21, 2018 · 6 comments · Fixed by #50712
Assignees
Labels
feature-request Request for new features or functionality git GIT issues help wanted Issues identified as good community contribution opportunities verification-needed Verification of issue is requested verified Verification succeeded

Comments

@raix
Copy link
Contributor

raix commented May 21, 2018

Description:

  • Add validation to the git create branch, ensuring that project branch conventions are kept.
  • Make the whitespace char - configurable (we default space etc. to underscore - meaning we cannot just past in issue title and be done)

Example implementation:
vscode-create_branch_validation

I can create an initial pr. with the implementation for further discussion, if this is something the vscode team would consider.

eg. if the change should enable extensions to lint/validate the branch name or be a configuration etc.

Kind regards Morten

@vscodebot
Copy link

vscodebot bot commented May 21, 2018

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@vscodebot vscodebot bot added the git GIT issues label May 21, 2018
@joaomoreno joaomoreno added the feature-request Request for new features or functionality label May 29, 2018
@joaomoreno joaomoreno added this to the Backlog milestone May 29, 2018
@joaomoreno joaomoreno added the help wanted Issues identified as good community contribution opportunities label May 29, 2018
@joaomoreno
Copy link
Member

Sure, submit ahead.

@TomasHubelbauer
Copy link
Contributor

Is this really something that should be in VS Code? And not say a Git server hook?

@raix
Copy link
Contributor Author

raix commented May 29, 2018

@joaomoreno I've added the pr.

@TomasHubelbauer ihmo being able to configure the character used for replacing whitespaces etc. in the branch name cannot be fixed in a hook.
The validation of the branch name it self is a better user experience than a git hook

Question is if this is the solution
or
if making an api available for extensions is a better solution eg. it could interact with github/vsts/jira to match ticket number and copy the title etc. in for you.

@TomasHubelbauer
Copy link
Contributor

Hmm having an API for this would be actually quite interesting, because it would enable your scenario so that VS Code could work the best for you but also allow teams to publish extensions of their own which would check the branch name policies or perhaps even do clever things like suggest prepending current ticket code to the branch name automatically if forgotten etc.

@raix
Copy link
Contributor Author

raix commented Jun 12, 2018

@TomasHubelbauer yes would be interesting - I'm currently digging into the vs code source. For now I've attached a gif on the pull request for both solutions.

@joaomoreno joaomoreno modified the milestones: Backlog, September 2018 Sep 13, 2018
@joaomoreno joaomoreno added the verification-needed Verification of issue is requested label Sep 24, 2018
@alexr00 alexr00 self-assigned this Sep 25, 2018
@alexr00 alexr00 added verified Verification succeeded and removed verification-needed Verification of issue is requested labels Sep 25, 2018
@alexr00 alexr00 removed their assignment Sep 25, 2018
@alexr00 alexr00 added the verification-needed Verification of issue is requested label Sep 27, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality git GIT issues help wanted Issues identified as good community contribution opportunities verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants