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

Open Github issue with contents of web form #18

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gisete
Copy link

@gisete gisete commented Oct 1, 2017

I'd like tho say this was a good beginner friendly issue to contribute to. Thanks!
Below are some details about my code, , let me know if there is anything I'm missing.

  • Added a new form that connects to the Github API on submit and
    creates a Github issue with the contents of the form. Must add a
    personal token (line 295) to make it work. Github recommends you create an environment variable instead of showing your token in the code, https://goo.gl/89aM3u .

  • Form checks for required fields and validates URL which should be an
    absolute URL according to these constraint: https://goo.gl/8JTigJ (AKA
    it must contain the protocol or it will fail)
    Fixes Open Github issue with contents of web form #13

HasGisete added 2 commits September 30, 2017 22:09
- Added a new form that connects to the Github API on submit and
creates a Github issue with the contents of the form. Must add a
personal token (line 295) to make it work.

- Form checks for required fields and validates URL which should be an
absolute URL according to these constraint: https://goo.gl/8JTigJ (AKA
it must contain the protocol or it will fail)
@gisete gisete closed this Oct 1, 2017
@gkiar
Copy link
Member

gkiar commented Oct 1, 2017

This looks great, @gisete! We can reopen, as it is now the 1st :). Do you have a demo of this working on your work for me to try, or should I test it on my personal fork?

@gkiar gkiar reopened this Oct 1, 2017
@gisete
Copy link
Author

gisete commented Oct 1, 2017

Thanks @gkiar ! Yes, I created a pen on codepen for it: https://codepen.io/gk/pen/KXmJyz
You should see issues being created here: https://github.com/gisete/js-projects/issues
There is also some Ive already created and closed while testing. We just need to figure out how to hide the API key, not something I've done before for a github site but I can do some research.

@gkiar
Copy link
Member

gkiar commented Oct 2, 2017

@gisete this is awesome, thanks!

Let's solve setting environment variables so that we don't have the API key exposed in the javascript, and then we can merge this :)

@gisete
Copy link
Author

gisete commented Oct 3, 2017

Great! I'll do some research and let you know what I come up with.

@gkiar
Copy link
Member

gkiar commented Oct 12, 2017

Hey @gisete pinging back to see how this is going? Very excited about this :) Thanks!!

@gisete
Copy link
Author

gisete commented Oct 13, 2017

Hi @gkiar , I did some research and asked about it to colleagues at work but couldnt find any solution for it. The only idea I've had so far is that I might have to make a different API call. Unfortunately I haven't had time to dig deeper but I'll be available to help again starting mid next week.

@gisete
Copy link
Author

gisete commented Oct 23, 2017

Hi @gkiar, I've done some more research and here are the options I've discovered so far:
1 - create an environment variable on the server but I don't think it's possible in this case since it's a github page and you don't have direct access to the server.
2 - Have people authenticate with their github account when submitting a new issue.
3 - Continue using your personal API token but limiting it to just be able to create issues and nothing else.

@gkiar
Copy link
Member

gkiar commented Oct 25, 2017

Hi @gisete - thanks for the response, and sorry for the delay in getting back to you.
I think option 2 is perfect! Want to pursue that? Also, could you link to the "guide" or resources you found which you use as a reference when implementing it? Thanks so much, I really appreciate your contributions!

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