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
7de3b409
Commit
7de3b409
authored
May 06, 2014
by
David Baumgold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Nicer error messaging
parent
96122fc9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
scripts/release.py
+13
-12
No files found.
scripts/release.py
View file @
7de3b409
...
@@ -14,6 +14,10 @@ import re
...
@@ -14,6 +14,10 @@ import re
from
collections
import
OrderedDict
,
defaultdict
from
collections
import
OrderedDict
,
defaultdict
import
textwrap
import
textwrap
import
requests
import
requests
try
:
from
pygments.console
import
colorize
except
ImportError
:
colorize
=
lambda
color
,
text
:
text
JIRA_RE
=
re
.
compile
(
r"\b[A-Z]{2,}-\d+\b"
)
JIRA_RE
=
re
.
compile
(
r"\b[A-Z]{2,}-\d+\b"
)
PR_BRANCH_RE
=
re
.
compile
(
r"remotes/edx/pr/(\d+)"
)
PR_BRANCH_RE
=
re
.
compile
(
r"remotes/edx/pr/(\d+)"
)
...
@@ -152,14 +156,12 @@ def prs_by_email(start_ref, end_ref):
...
@@ -152,14 +156,12 @@ def prs_by_email(start_ref, end_ref):
try
:
try
:
merge
=
get_merge_commit
(
branch
.
commit
,
end_ref
)
merge
=
get_merge_commit
(
branch
.
commit
,
end_ref
)
except
DoesNotExist
as
err
:
except
DoesNotExist
as
err
:
print
(
message
=
(
"Warning: could not find merge commit for {commit}. The pull "
"Warning: could not find merge commit for {commit}. "
"request containing this commit will not be included in the "
"The pull request containing this commit will not be included "
"table."
.
format
(
"in the table."
.
format
(
commit
=
err
.
commit
)
commit
=
err
.
commit
),
file
=
sys
.
stderr
,
)
)
print
(
colorize
(
"red"
,
message
),
file
=
sys
.
stderr
)
else
:
else
:
unordered_data
[
merge
.
author
.
email
]
.
add
((
pr_num
,
merge
))
unordered_data
[
merge
.
author
.
email
]
.
add
((
pr_num
,
merge
))
...
@@ -187,12 +189,11 @@ def generate_table(start_ref, end_ref):
...
@@ -187,12 +189,11 @@ def generate_table(start_ref, end_ref):
body
=
pr_info
[
"body"
]
or
""
body
=
pr_info
[
"body"
]
or
""
author
=
pr_info
[
"user"
][
"login"
]
author
=
pr_info
[
"user"
][
"login"
]
except
requests
.
exceptions
.
RequestException
as
e
:
except
requests
.
exceptions
.
RequestException
as
e
:
print
(
message
=
(
"Warning: could not fetch data for #{num}: {message}"
.
format
(
"Warning: could not fetch data for #{num}: "
num
=
pull_request
,
message
=
e
.
message
"{message}"
.
format
(
num
=
pull_request
,
message
=
e
.
message
)
),
file
=
sys
.
stderr
,
)
)
print
(
colorize
(
"red"
,
message
),
file
=
sys
.
stderr
)
title
=
"?"
title
=
"?"
body
=
"?"
body
=
"?"
author
=
""
author
=
""
...
...
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