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
1c4d1605
Commit
1c4d1605
authored
Sep 04, 2015
by
David Baumgold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fetch people.yaml file from private repo
parent
59e2f479
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
scripts/release.py
+12
-3
No files found.
scripts/release.py
View file @
1c4d1605
...
...
@@ -45,7 +45,7 @@ PROJECT_ROOT = project_root()
repo
=
Repo
(
PROJECT_ROOT
)
git
=
repo
.
git
PEOPLE_YAML
=
"https://raw.githubusercontent.com/edx/repo-tools/master/people.yaml"
PEOPLE_YAML
=
"https://raw.githubusercontent.com/edx/repo-tools
-data
/master/people.yaml"
class
memoized
(
object
):
...
...
@@ -149,7 +149,10 @@ def create_github_creds():
https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization
"""
headers
=
{
"User-Agent"
:
"edx-release"
}
payload
=
{
"note"
:
"edx-release"
}
payload
=
{
"note"
:
"edx-release"
,
"scopes"
:
[
"repo"
],
}
username
=
raw_input
(
"Github username: "
)
password
=
getpass
.
getpass
(
"Github password: "
)
response
=
requests
.
post
(
...
...
@@ -300,6 +303,7 @@ class DoesNotExist(Exception):
self
.
message
=
message
self
.
commit
=
commit
self
.
branch
=
branch
Exception
.
__init__
(
self
,
message
)
def
get_merge_commit
(
commit
,
branch
=
"master"
):
...
...
@@ -371,10 +375,15 @@ def prs_by_email(start_ref, end_ref):
The dictionary is alphabetically ordered by email address
The pull request list is ordered by merge date
"""
username
,
token
=
get_github_creds
()
headers
=
{
"Authorization"
:
"token {}"
.
format
(
token
),
"User-Agent"
:
"edx-release"
,
}
# `emails` maps from other_emails to primary email, based on people.yaml.
emails
=
{}
try
:
people_resp
=
requests
.
get
(
PEOPLE_YAML
)
people_resp
=
requests
.
get
(
PEOPLE_YAML
,
headers
=
headers
)
people_resp
.
raise_for_status
()
people
=
yaml
.
safe_load
(
people_resp
.
text
)
except
requests
.
exceptions
.
RequestException
as
e
:
...
...
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