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
|
- label: I have searched the existing issues
|
||||||
required: true
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
|
id: current_behavior
|
||||||
attributes:
|
attributes:
|
||||||
label: Current Behavior
|
label: Current Behavior
|
||||||
description: A concise description of what you're experiencing.
|
description: A concise description of what you're experiencing.
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
- type: textarea
|
- type: textarea
|
||||||
|
id: expected_behavior
|
||||||
attributes:
|
attributes:
|
||||||
label: Expected Behavior
|
label: Expected Behavior
|
||||||
description: A concise description of what you expected to happen.
|
description: A concise description of what you expected to happen.
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
- type: textarea
|
- type: textarea
|
||||||
|
id: repro_steps
|
||||||
attributes:
|
attributes:
|
||||||
label: Steps To Reproduce
|
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.
|
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
|
required: false
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
|
id: system_env
|
||||||
label: Environment
|
label: Environment
|
||||||
description: |
|
description: |
|
||||||
If you have used the public API, please just say "Used public API", and add your browser and its version.
|
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
|
- **OS**: Ubuntu 20.04
|
||||||
- **Browser**: Firefox 104.1
|
- **Browser**: Firefox 104.1
|
||||||
- **Android Runtime**: 7.6.3
|
- **Android Runtime**: 7.6.3
|
||||||
value: |
|
placeholder: |
|
||||||
- OS:
|
- OS:
|
||||||
- Browser:
|
- Browser:
|
||||||
|
- PHP Version on server side (if self-hosted):
|
||||||
|
- Is redis used (if self-hosted):
|
||||||
|
- Search engine used (if self-hosted):
|
||||||
render: markdown
|
render: markdown
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
|
id: extra_info
|
||||||
label: Anything else?
|
label: Anything else?
|
||||||
description: |
|
description: |
|
||||||
Other information / Contextual information. Links? References? Anything that will give us more context about the issue you are encountering!
|
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
|
public function __toString() : string
|
||||||
{
|
{
|
||||||
$title = urlencode("[{$this->instanceType}] Generated Issue: {$this->getClassName()}");
|
// 🐛 emoji v
|
||||||
$body = urlencode(
|
$title = "%F0%9F%90%9B" . urlencode(" [{$this->instanceType}] Generated Issue: {$this->getClassName()}");
|
||||||
"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"
|
|
||||||
|
$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=
|
$expectedBehavior = urlencode("The API should have returned a successful response with data.");
|
||||||
return "https://github.com/{$this->repo}/issues/new?title={$title}&body={$body}";
|
$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