User plugin issue labeling (#1397)
* Add automatic issue labeling * branch issue fix * try debug * maybe * fix indents * f it I use js * disable for testing * changed id * added git * Update issue template with plugin dropdown options * Only push on change * Add multiple * save keys file and additional safety * Update issue template with plugin dropdown options * delete updated_issue.yml * Add Language in front of plugin name * Update issue template with plugin dropdown options * Add Labels * debug auto labeling * new extraction method * SELECTED_PLUGINS not available * Maybe * maybe this * Now * please * Now really * maybe * debug * debug * remove linebreak * delete " * delete " differently * corrected split * fix multiline issue * maybe this way * Added Severity * Update issue template with plugin dropdown options * ignore if not plugin issue * add string infront of labels * Update issue template with plugin dropdown options * Test job skip * Test job skip 2 * Test job skip 2.1 * reactivated checks * Added [skip ci] to commit message * change label format * pr test * test change * deactivate skip * activate skip --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,110 @@
|
||||
name: Issue report
|
||||
description: Report a source issue in LNReader
|
||||
labels: [Bug]
|
||||
body:
|
||||
- type: dropdown
|
||||
id: source
|
||||
attributes:
|
||||
label: Plugin
|
||||
description: Select the plugin associated with the issue.
|
||||
multiple: true
|
||||
options:
|
||||
{#CHANGE#}
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: severity
|
||||
attributes:
|
||||
label: Severity
|
||||
description: Select the severity of the issue you want to report.
|
||||
multiple: false
|
||||
options:
|
||||
- Wrong formatting
|
||||
- Wrong content
|
||||
- Missing chapter
|
||||
- Missing images
|
||||
- Can't load novels
|
||||
- Other
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: reproduce-steps
|
||||
attributes:
|
||||
label: Steps to reproduce
|
||||
description: Provide an example of the issue.
|
||||
placeholder: |
|
||||
Example:
|
||||
1. First step
|
||||
2. Second step
|
||||
3. Issue here
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: expected-behavior
|
||||
attributes:
|
||||
label: Expected behavior
|
||||
placeholder: |
|
||||
Example:
|
||||
"This should happen..."
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: actual-behavior
|
||||
attributes:
|
||||
label: Actual behavior
|
||||
placeholder: |
|
||||
Example:
|
||||
"This happened instead..."
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: lnreader-version
|
||||
attributes:
|
||||
label: LNReader version
|
||||
description: |
|
||||
You can find your LNReader version in **More → About**.
|
||||
placeholder: |
|
||||
Example: "1.1.19"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: android-version
|
||||
attributes:
|
||||
label: Android version
|
||||
description: |
|
||||
You can find this somewhere in your Android settings.
|
||||
placeholder: |
|
||||
Example: "Android 11"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: other-details
|
||||
attributes:
|
||||
label: Other details
|
||||
placeholder: |
|
||||
Additional details and attachments.
|
||||
|
||||
- type: checkboxes
|
||||
id: acknowledgements
|
||||
attributes:
|
||||
label: Acknowledgements
|
||||
description: Your issue will be closed if you haven't done these steps.
|
||||
options:
|
||||
- label: I have searched the existing issues and this is a new ticket, **NOT** a duplicate or related to another open issue.
|
||||
required: true
|
||||
- label: I have written a short but informative title.
|
||||
required: true
|
||||
- label: I have updated the app to version **[1.1.19](https://github.com/LNReader/lnreader/releases/latest)**.
|
||||
required: true
|
||||
- label: I have updated all installed extensions.
|
||||
required: true
|
||||
- label: If this is an issue with the app itself, I should be opening an issue in the [app repository](https://github.com/LNReader/lnreader/issues/new/choose).
|
||||
required: true
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
const version = require('../../package.json').version;
|
||||
const dist = `plugins/v${version}`;
|
||||
const fs = require('fs');
|
||||
|
||||
const rawText = fs.readFileSync(
|
||||
'.github/scripts/blank_report_issue.yml',
|
||||
'utf8',
|
||||
);
|
||||
|
||||
async function main() {
|
||||
const pluginsRaw = await fetch(
|
||||
`https://raw.githubusercontent.com/LNReader/lnreader-plugins/${dist}/.dist/plugins.min.json`,
|
||||
).then(res => res.json());
|
||||
const plugins = pluginsRaw.reduce((arr, plugin) => {
|
||||
arr[plugin.lang + ': ' + plugin.name] = plugin.id;
|
||||
return arr;
|
||||
}, {});
|
||||
|
||||
let newKeys = Object.keys(plugins);
|
||||
let savedKeys = [];
|
||||
try {
|
||||
let keys = JSON.parse(fs.readFileSync('.github/scripts/keys.json', 'utf8'));
|
||||
savedKeys = Object.keys(keys);
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
if (!sameKeys(newKeys, savedKeys) && Array.isArray(newKeys)) {
|
||||
const text = newKeys.join('"\n - "');
|
||||
fs.writeFileSync(
|
||||
'.github/ISSUE_TEMPLATE/report_issue.yml',
|
||||
rawText.replace(/{#CHANGE#}/g, '- "' + text + '"'),
|
||||
);
|
||||
fs.writeFileSync('.github/scripts/keys.json', JSON.stringify(plugins));
|
||||
}
|
||||
function sameKeys(a, b) {
|
||||
return a.length === b.length && a.every(value => b.includes(value));
|
||||
}
|
||||
}
|
||||
|
||||
main();
|
||||
@@ -0,0 +1 @@
|
||||
{}
|
||||
Reference in New Issue
Block a user