Skip to content

Commit

Permalink
Debugging the problems with API on Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
dwhswenson committed Oct 31, 2017
1 parent 5e811dc commit 7fc2b8a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
9 changes: 5 additions & 4 deletions autorelease/github_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,15 @@ def find_relevant_pr(self):
commit = next(commits)
return int(pr_number)

def get_pr_body(self, pr_number):
def get_pr_data(self, pr_number):
pr_url = self.repo_api_url + "issues/" + str(pr_number)
pr_body = requests.get(pr_url).json()['body']
return pr_body
pr_data = requests.get(pr_url).json()
return pr_data

def generate_post_data(self, draft=False, prerelease=False):
pr_number = self.find_relevant_pr()
pr_body = self.get_pr_body(pr_number)
pr_data = self.get_pr_data(pr_number)
pr_body = pr_data['body']
release_notes = self.extract_release_notes(pr_body)
post_data = {
'tag_name': self.tag_name,
Expand Down
7 changes: 6 additions & 1 deletion autorelease/scripts/autorelease-release
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,12 @@ if __name__ == "__main__":
repo=repo,
github_user=github_user
)


# testing
expected_pr = releaser.find_relevant_pr()
print("Expected PR: " + str(expected_pr))
print("PR issue: " + str(releaser.get_pr_data(expected_pr)))
print("POST DATA:")
print(releaser.generate_post_data())
if not opts.dry:
releaser.create_release()

0 comments on commit 7fc2b8a

Please sign in to comment.