Skip to content
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

Merged
merged 17 commits into from
Aug 8, 2018
Merged

GitHub issue creation #38

merged 17 commits into from
Aug 8, 2018

Conversation

gaalocastillo
Copy link
Collaborator

@gaalocastillo gaalocastillo commented Jul 25, 2018

Any suggestion please let me know @goneall @rtgdk

Copy link
Member

@goneall goneall left a 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

Copy link
Member

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"

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now a warning message is displayed when the issue cannot be created. However, even when an issue could not be created, it could be stored on the submitted requests database. What do we do with requests whose issue cannot be created? Do we still save them or not? @goneall @rtgdk

Copy link
Member

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 = ''
Copy link
Member

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.

Copy link
Collaborator Author

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.

src/app/views.py Outdated
<<<<<<< HEAD
return r.status_code
=======
>>>>>>> c40bd705c4a9cf86510cf680da0912e9ec650223
Copy link
Member

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

@gaalocastillo
Copy link
Collaborator Author

Is there any other change left to be done on this branch? @goneall @rtgdk

@goneall
Copy link
Member

goneall commented Aug 8, 2018

I'll go ahead and merge into the the license-submittal branch

@goneall goneall merged commit 1225d77 into license-submittal Aug 8, 2018
@goneall goneall deleted the github-issue branch February 17, 2023 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants