-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgit-ci.py
executable file
·38 lines (28 loc) · 1 KB
/
git-ci.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from git import *
from hub import *
ENGINEER_GITHUB_USERNAMES = [
"negativetwelve",
"tristantao",
"brianliou",
]
def git_ci():
git_up()
initial_branch = current_branch()
commit_description = prompt_multiple_lines("Enter a commit description. The frist line will be the summary.")
commit_description_by_line = commit_description.split("\n")
summary = commit_description_by_line[0]
# git("checkout", "master")
# git("merge --squash", initial_branch)
git_subtree_push("scripts", "scripts")
git_subtree_push("primary", "app/assets/stylesheets/primary")
# Git up will merge in master and any subtree changes
# We then want to push your branch to origin HEAD
# Open a pull request with your summary and close any issues.
# Dump you back on master with all the updated changes.
git("push -u origin HEAD")
pull_request(commit_description)
git("checkout master")
if __name__ == '__main__':
git_ci()