Jump to content




How to post issues to GitHub? [Lua]


13 replies to this topic

#1 houseofkraft

  • Members
  • 170 posts
  • LocationUSA

Posted 12 October 2016 - 02:26 PM

Hi Guys!

I want to make it so when my OS crashes it will automatically report the error and version to GitHub.

Thanks!

- House

#2 1lann

  • Members
  • 516 posts
  • LocationSeattle

Posted 12 October 2016 - 02:56 PM

You'll need your own (real) server, and write software for the server to do this. Note that anyone can post an issue and abuse through the user you'll set up to post issues on the operating system's user's behalf. Here's a brief outline on what you need to do.

First, you need to authenticate the server. You can do this:
- via OAuth: https://developer.github.com/v3/oauth/
- or with a user token: https://github.com/settings/tokens/new
- or with a password: https://developer.gi...-authentication

Then you simply call the create issue endpoint:
https://developer.gi...create-an-issue

#3 Sewbacca

  • Members
  • 450 posts
  • LocationStar Wars

Posted 12 October 2016 - 03:11 PM

I dunno if it would be a great idea, because if a users system crashes often (maybe if it often reboots), then you get hundred of issues.
Also, the user should know that it will be reported.

#4 hbomb79

  • Members
  • 352 posts
  • LocationOrewa, New Zealand

Posted 12 October 2016 - 07:44 PM

 Sewbacca, on 12 October 2016 - 03:11 PM, said:

I dunno if it would be a great idea, because if a users system crashes often (maybe if it often reboots), then you get hundred of issues.
Also, the user should know that it will be reported.

Well, you would simply not post the issue if an open issue exists with the same name/error. It is difficult, but effective against repeat automatic bug reports.

#5 Sewbacca

  • Members
  • 450 posts
  • LocationStar Wars

Posted 12 October 2016 - 09:23 PM

 Hbomb_79, on 12 October 2016 - 07:44 PM, said:

 Sewbacca, on 12 October 2016 - 03:11 PM, said:

I dunno if it would be a great idea, because if a users system crashes often (maybe if it often reboots), then you get hundred of issues.
Also, the user should know that it will be reported.

Well, you would simply not post the issue if an open issue exists with the same name/error. It is difficult, but effective against repeat automatic bug reports.

Okay, but what is, if someone edits the code and occur variable errors like error(tostring({}))?

#6 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 12 October 2016 - 10:09 PM

 Sewbacca, on 12 October 2016 - 09:23 PM, said:

Okay, but what is, if someone edits the code and occur variable errors like error(tostring({}))?

That's simple. If the MD5 of the file doesn't match, don't post the issue because the user has modified it or are using an older version.

#7 Sewbacca

  • Members
  • 450 posts
  • LocationStar Wars

Posted 13 October 2016 - 11:53 AM

 KingofGamesYami, on 12 October 2016 - 10:09 PM, said:

 Sewbacca, on 12 October 2016 - 09:23 PM, said:

Okay, but what is, if someone edits the code and occur variable errors like error(tostring({}))?

That's simple. If the MD5 of the file doesn't match, don't post the issue because the user has modified it or are using an older version.
but then you've to create MD5 hashes form all OS files, and comparing to all versions, existing (He wanted to get all errors from all versions). Reporting the error would take much time.

#8 Admicos

  • Members
  • 207 posts
  • LocationTurkey

Posted 13 October 2016 - 11:55 AM

 Sewbacca, on 13 October 2016 - 11:53 AM, said:

but then you've to create MD5 hashes form all OS files, and comparing to all versions, existing (He wanted to get all errors from all versions). Reporting the error would take much time.

It would be a single command (under Linux) to md5 all files in a directory, let me check my zsh history for the command.

EDIT: The command is: find . -type f -exec md5sum {} \; > dir.md5

Edited by Admicos, 13 October 2016 - 11:56 AM.


#9 Sewbacca

  • Members
  • 450 posts
  • LocationStar Wars

Posted 13 October 2016 - 11:56 AM

 Admicos, on 13 October 2016 - 11:55 AM, said:

 Sewbacca, on 13 October 2016 - 11:53 AM, said:

but then you've to create MD5 hashes form all OS files, and comparing to all versions, existing (He wanted to get all errors from all versions). Reporting the error would take much time.

It would be a single command (under Linux) to md5 all files in a directory, let me check my zsh history for the command.
A single command which takes some minutes.

#10 Admicos

  • Members
  • 207 posts
  • LocationTurkey

Posted 13 October 2016 - 12:02 PM

 Sewbacca, on 13 October 2016 - 11:56 AM, said:

A single command which takes some minutes.

It will take minutes if you have gigantic files, but then a CC os probably doesn't have any files that is that large.

Edited by Admicos, 13 October 2016 - 12:02 PM.


#11 Sewbacca

  • Members
  • 450 posts
  • LocationStar Wars

Posted 16 October 2016 - 03:55 PM

 Admicos, on 13 October 2016 - 12:02 PM, said:

 Sewbacca, on 13 October 2016 - 11:56 AM, said:

A single command which takes some minutes.

It will take minutes if you have gigantic files, but then a CC os probably doesn't have any files that is that large.
Also you can hash the native files, delete them (except the md5 hash) and post many bugs.

#12 H4X0RZ

  • Members
  • 1,315 posts
  • LocationGermany

Posted 16 October 2016 - 07:19 PM

You don't have to hash anything at all. If someone really wants to mess this up they can claim to have the correct file by submitting the correct md5. They just have to bypass your Lua code and call the API on their own.

Edited by H4X0RZ, 16 October 2016 - 07:20 PM.


#13 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 16 October 2016 - 08:18 PM

 H4X0RZ, on 16 October 2016 - 07:19 PM, said:

You don't have to hash anything at all. If someone really wants to mess this up they can claim to have the correct file by submitting the correct md5. They just have to bypass your Lua code and call the API on their own.

The idea here is to prevent someone's stupidity from auto-reporting errors they created, not to prevent against malicious intent. We've already established that the github account will be fully accessible by anyone who looks at the code.

#14 H4X0RZ

  • Members
  • 1,315 posts
  • LocationGermany

Posted 16 October 2016 - 09:52 PM

 KingofGamesYami, on 16 October 2016 - 08:18 PM, said:

 H4X0RZ, on 16 October 2016 - 07:19 PM, said:

You don't have to hash anything at all. If someone really wants to mess this up they can claim to have the correct file by submitting the correct md5. They just have to bypass your Lua code and call the API on their own.

The idea here is to prevent someone's stupidity from auto-reporting errors they created, not to prevent against malicious intent. We've already established that the github account will be fully accessible by anyone who looks at the code.

Oh, okay. I should read the whole post next time. Sorry :/





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users