mirror of
https://github.com/jikan-me/jikan-rest.git
synced 2025-02-20 11:23:35 +08:00
updated github error reporting with the new issue form
This commit is contained in:
parent
ff5068bf27
commit
c054c20fe7
10
.github/ISSUE_TEMPLATE/bug.yml
vendored
10
.github/ISSUE_TEMPLATE/bug.yml
vendored
@ -15,18 +15,21 @@ body:
|
||||
- label: I have searched the existing issues
|
||||
required: true
|
||||
- type: textarea
|
||||
id: current_behavior
|
||||
attributes:
|
||||
label: Current Behavior
|
||||
description: A concise description of what you're experiencing.
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: expected_behavior
|
||||
attributes:
|
||||
label: Expected Behavior
|
||||
description: A concise description of what you expected to happen.
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: repro_steps
|
||||
attributes:
|
||||
label: Steps To Reproduce
|
||||
description: Steps to reproduce the behaviour. If the error came in a response from the REST API, please specify the url here.
|
||||
@ -39,6 +42,7 @@ body:
|
||||
required: false
|
||||
- type: textarea
|
||||
attributes:
|
||||
id: system_env
|
||||
label: Environment
|
||||
description: |
|
||||
If you have used the public API, please just say "Used public API", and add your browser and its version.
|
||||
@ -47,14 +51,18 @@ body:
|
||||
- **OS**: Ubuntu 20.04
|
||||
- **Browser**: Firefox 104.1
|
||||
- **Android Runtime**: 7.6.3
|
||||
value: |
|
||||
placeholder: |
|
||||
- OS:
|
||||
- Browser:
|
||||
- PHP Version on server side (if self-hosted):
|
||||
- Is redis used (if self-hosted):
|
||||
- Search engine used (if self-hosted):
|
||||
render: markdown
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
attributes:
|
||||
id: extra_info
|
||||
label: Anything else?
|
||||
description: |
|
||||
Other information / Contextual information. Links? References? Anything that will give us more context about the issue you are encountering!
|
||||
|
@ -110,13 +110,22 @@ class GithubReport
|
||||
*/
|
||||
public function __toString() : string
|
||||
{
|
||||
$title = urlencode("[{$this->instanceType}] Generated Issue: {$this->getClassName()}");
|
||||
$body = urlencode(
|
||||
"Please fill out the details below.\n\n**Summary:**\n\n**Steps to reproduce:**\n\n\n\n ### Additional Details \n **Jikan Parser Version**: ```{$this->jikanVersion}```\n**PHP:** ```{$this->phpVersion}```\n**Redis**: ```{$this->redisRunning}```\n**Exception:** ```{$this->name}```\n**Code:** ```{$this->code}```\n**Message:** ```{$this->error}```\n**Trace:** ```{$this->trace}```\n**Request:** `{$this->requestMethod} {$this->requestUri}`\n"
|
||||
// 🐛 emoji v
|
||||
$title = "%F0%9F%90%9B" . urlencode(" [{$this->instanceType}] Generated Issue: {$this->getClassName()}");
|
||||
|
||||
$currentBehavior = urlencode(
|
||||
"The API has returned an error: \n```{$this->name}```\nStatus code: ```{$this->code}```\nMessage: ```{$this->error}```\nTrace: ```{$this->trace}```"
|
||||
);
|
||||
|
||||
// https://github.com/jikan-me/jikan-rest/issues/new?assignees=&labels=i%3A+bug%2C+i%3A+needs+triage&template=bug.md&title=
|
||||
return "https://github.com/{$this->repo}/issues/new?title={$title}&body={$body}";
|
||||
$expectedBehavior = urlencode("The API should have returned a successful response with data.");
|
||||
$env = urlencode(
|
||||
"Jikan Parser Version**: ```{$this->jikanVersion}```\nPHP: ```{$this->phpVersion}```\nIs redis used: ```{$this->redisRunning}```"
|
||||
);
|
||||
$reproSteps = urlencode(
|
||||
"Http Request: `{$this->requestMethod} {$this->requestUri}"
|
||||
);
|
||||
|
||||
return "https://github.com/{$this->repo}/issues/new?template=bug.yml&title={$title}&system_env={$env}&repro_steps={$reproSteps}&expected_behavior={$expectedBehavior}¤t_behavior={$currentBehavior}";
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user