Skip to content

Instantly share code, notes, and snippets.

View MichaelDimitras's full-sized avatar

Michael Dimitras MichaelDimitras

  • San Francisco Bay Area
View GitHub Profile
@MichaelDimitras
MichaelDimitras / create-branch-from-ticket.py
Created February 26, 2021 20:43 — forked from thakichowdhury/create-branch-from-ticket.py
A script to help create git branches from ticket information in the format `issue_type/issue_key/issue-title-formatted-with-dashes`
#!/usr/bin/env python3
import re
import subprocess
from typing import List
## ------------ FUNCTIONS ------------ ##
def create_branch_from_ticket(issue_type: str, issue_key: str, issue_title: str) -> str:
# format issue_title to replace spaces with - and remove any non-alphanumeric chars