-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GitHub issue creation #38
Conversation
…se request have been submitted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few requested changes, otherwise looks like a good start.
src/app/views.py
Outdated
url = 'https://api.github.com/repos/spdx/license-list-XML/issues' | ||
r = post(url, data=dumps(payload), headers=headers) | ||
print r.status_code | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add some error handling here - if the status is not a success, open a dialog "Please note that there was a problem opening the issue for the SPDX legal team. Please email spdx-legal@lists.spdx.org with SPDX ID for the license you are submitting"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok sure, I am going to be working on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would still save the info in the DB - the legal team could follow-up and create an issue manually using the information from the DB. We could enhance this in the future to email the legal team that an error occurred, but I think the warning message is fine for now.
src/app/views.py
Outdated
""" View for creating an GitbHub issue | ||
when submitting a new license request | ||
""" | ||
myToken = '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should move the token to an external file which is not under source control for security. There are a few methods we can use to do this. My preference would be to create a separate Python file with myToken defined. We would import from this file here. Then we would add the file to the .gitignore so that the tokens do not get accidentally committed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That solution sounds good. I will work on it.
…ccess message when on submission success.
…se request have been submitted.
src/app/views.py
Outdated
<<<<<<< HEAD | ||
return r.status_code | ||
======= | ||
>>>>>>> c40bd705c4a9cf86510cf680da0912e9ec650223 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you committed some merge conflict text
I'll go ahead and merge into the the license-submittal branch |
Any suggestion please let me know @goneall @rtgdk