Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
76d1ea0b
Commit
76d1ea0b
authored
May 02, 2014
by
David Baumgold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed unused function
parent
333ec9d3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
33 deletions
+0
-33
scripts/release.py
+0
-33
No files found.
scripts/release.py
View file @
76d1ea0b
...
@@ -73,39 +73,6 @@ def parse_ticket_references(text):
...
@@ -73,39 +73,6 @@ def parse_ticket_references(text):
return
JIRA_RE
.
findall
(
text
)
return
JIRA_RE
.
findall
(
text
)
def
get_pr_for_commit
(
commit
,
branch
=
"master"
):
"""
http://stackoverflow.com/questions/8475448/find-merge-commit-which-include-a-specific-commit
"""
remote_branch
=
git
.
describe
(
commit
,
all
=
True
,
contains
=
True
)
match
=
PR_BRANCH_RE
.
search
(
remote_branch
)
if
match
:
pr_num
=
int
(
match
.
group
(
1
))
return
pr_num
# if `git describe` didn't work, we need to use `git branch` -- it's slower
remote_branches
=
git
.
branch
(
commit
,
all
=
True
,
contains
=
True
)
.
splitlines
()
for
remote_branch
in
remote_branches
:
remote_branch
=
remote_branch
.
strip
()
match
=
PR_BRANCH_RE
.
search
(
remote_branch
)
if
match
:
pr_num
=
int
(
match
.
group
(
1
))
# we have a pull request -- but is it the right one?
ref
=
SymbolicReference
(
repo
,
"refs/{}"
.
format
(
remote_branch
))
merge_base
=
git
.
merge_base
(
ref
,
branch
)
rev
=
"{base}^..{branch}"
.
format
(
base
=
merge_base
,
branch
=
remote_branch
)
pr_commits
=
list
(
Commit
.
iter_items
(
repo
,
rev
))
if
commit
in
pr_commits
:
# found it!
return
pr_num
err
=
NotFoundError
(
"Can't find pull request for commit {commit} against branch {branch}"
.
format
(
commit
=
commit
,
branch
=
branch
,
)
)
err
.
commit
=
commit
raise
err
def
get_merge_commit
(
commit
,
branch
=
"master"
):
def
get_merge_commit
(
commit
,
branch
=
"master"
):
"""
"""
Given a commit that was merged into the given branch, return the merge commit
Given a commit that was merged into the given branch, return the merge commit
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment