Closed JTWWilson closed 8 years ago
It could be done, perhaps with an HTML form feeding into a PHP/JavaScript back-end sending an email in our direction. Regarding GH Issues, they can only be made through GitHub as they are not a Git feature.
Just done some research and, if we want to have this, it would need self-hosting
You can use the Github API to interact with GitHub issues.
Just been doing some research and it's come to my attention that, to create an issue, you need a GitHub account. Thus, would it be better to create a "bot" account that we can use to create issues?
If you want, go for it. This is as far as I got yesterday, if it helps: https://gist.github.com/fabcooldog/e20280192f7bfe4e8ab19362df413f5c
Well so far I've had to set up a web server on my Linux box to even do anything (Also, it needs doing in PHP to use the API I believe)
Why do you need to set up a separate server? I've just used Javascript's XMLHTTPRequest
object to get
and post
data using the API.
I beg your pardon, I'm doing it with JS now, should be working soon-ish as I've pretty much a copy-and-paste job now
What are you copying and pasting? Could you make a quick Gist so I can see what you're doing?
I'm just adapting your code to use an HTML form
Mine doesn't work
It get
s data perfectly but post
isn't working. I get an error: The system cannot find the path specified.
Well I'll get the form accessing done first and then make a Gist... How do I Gist?
Big Gist
button at the top of the page (Leave it secret for now -- if you link to it here I can access it)
Ahh yes... Also, that auth code in your Gist... Am I able to use that or will it go :scream:
You can use it perfectly I think. If you're getting an error you could always try generating your own (your profile > developers)
Okay. Would it be worth, like I mentioned above, making a dedicated issues user which we could use to make the issues, rather than leaving our accounts to do it?
For now, new issues is probably best. However, in the future, using HTML, you can make a drop-down list that generates either a comment on an issue entitled typos
/page suggestion
etc. or a new issue.
It's not making an issue though
That is because of two things:
post
in your requestHTTP400
BAD REQUEST - The request could not be processed by the server due to invalid syntax.
(XHR)POST - https://api.github.com/repos/fabcooldog/resources/issues
I got this error yesterday and hadn't started looking to resolve it.
I corrected the GET to POST and, yes, I'm now getting an HTTP 400. I'm now reading the docs and says that all we should need is the issue title and body.
Do I have pull access?
To what? Also, I'm sure you need an authentication key as, without it, GitHub doesn't know who is posting the issue.
The repository
No one has pull access, I'm happy to approve any changes you make, though. Also, do remember that you can work in a branch, in which you will have full access
I've found the problem... You need pull access to create an issue using the API:
Any user with pull access to a repository can create an issue.
Whose key are you using? If it is either of ours then it is fine -- we can create issues and have pull access; the approvals system just limits pull requests, not issues.
Nevertheless, I can disable the approvals for the sake of testing this. - Done.
IT'S FREAKING WORKING!!!!!!!!!
With whose key? Try again after I reconnect the approvals.
My key
OK, try now.
Look in the issue tracker :laughing:
Fantastic, could you pop it up on that Gist you made so I can try it at Chez Me?
What's on the menu at Chez Me tonight? :laughing:
Javascript and Further Maths 🎈
So, what now?
We need to look at the implementation: instead of copying this into every page, we should put a (relative) link to the Javascripts folder in the head.
Okay. It should be pretty simple to do so. Just chuck a rel link into the head and that should be it. I'll quickly check it though
Furthermore, the input box should have a custom ID that attaches to some CSS that automatically adds the labels to the input boxes to make the site more flexible to update. Finally, we might want to look into the following:
What do you mean by the labels?
The First Name:
signs and placeholder text for the boxes.
Why would they need attaching to the boxes? Next thing I know you'll start adding crates as well
I'm not sure how you would do it. Perhaps through divs. Nevertheless, add your current version on to the footer of the main index page - great work!
Pull request #37
Is it possible to add a text input box onto the site so that anyone can catch spelling errors or even suggest enhancements?
Also, explore whether it is possible to connect this up to GitHub Issues.