refactor: Update Build Scripts And Workflows (#1848)
* refactor: Update Build Scripts And Workflows * chore: Update Prettier Workflow * chore: Update Publish Plugins Workflow * chore: Update Prettier Workflow * chore: Update Workflows * chore: Update Workflows * chore: Update Prettier Workflow * chore: Update Prettier Workflow
This commit is contained in:
committed by
GitHub
parent
8108df39a1
commit
851330a52e
@@ -1,15 +1,16 @@
|
||||
# DO NOT EDIT
|
||||
# THIS FILE IS AUTO GENERATED FROM blank_report_issue.yml in the .github/scripts folder.
|
||||
# DO NOT EDIT THIS FILE DIRECTLY
|
||||
# This file is auto-generated from blank_report_issue.yml in .github/scripts/
|
||||
# Any changes made here will be overwritten when plugins are published.
|
||||
|
||||
name: Issue report
|
||||
description: Report a source issue in LNReader
|
||||
name: Report Issue
|
||||
description: Report a plugin issue in LNReader
|
||||
labels: [Bug]
|
||||
body:
|
||||
- type: dropdown
|
||||
id: source
|
||||
attributes:
|
||||
label: Plugin
|
||||
description: Select the plugin associated with the issue.
|
||||
description: Select the affected plugin(s).
|
||||
multiple: true
|
||||
options:
|
||||
{#CHANGE#}
|
||||
@@ -20,14 +21,15 @@ body:
|
||||
id: severity
|
||||
attributes:
|
||||
label: Severity
|
||||
description: Select the severity of the issue you want to report.
|
||||
description: Select the issue severity level.
|
||||
multiple: false
|
||||
options:
|
||||
- Wrong formatting
|
||||
- Wrong content
|
||||
- Missing chapter
|
||||
- Missing images
|
||||
- Can't load novels
|
||||
- Wrong Formatting
|
||||
- Wrong Content
|
||||
- Missing Chapter
|
||||
- Missing Images
|
||||
- Can't Load Novels
|
||||
- Domain Changed
|
||||
- Other
|
||||
validations:
|
||||
required: true
|
||||
@@ -35,42 +37,43 @@ body:
|
||||
- type: textarea
|
||||
id: reproduce-steps
|
||||
attributes:
|
||||
label: Steps to reproduce
|
||||
description: Provide an example of the issue.
|
||||
label: Steps To Reproduce
|
||||
description: Describe the steps to reproduce the issue.
|
||||
placeholder: |
|
||||
Example:
|
||||
1. First step
|
||||
2. Second step
|
||||
3. Issue here
|
||||
1. Open the plugin
|
||||
2. Search for a novel
|
||||
3. Error appears
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: expected-behavior
|
||||
attributes:
|
||||
label: Expected behavior
|
||||
label: Expected Behavior
|
||||
description: What should happen?
|
||||
placeholder: |
|
||||
Example:
|
||||
"This should happen..."
|
||||
"The search results should display correctly..."
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: actual-behavior
|
||||
attributes:
|
||||
label: Actual behavior
|
||||
label: Actual Behavior
|
||||
description: What actually happened?
|
||||
placeholder: |
|
||||
Example:
|
||||
"This happened instead..."
|
||||
"An error message appeared instead..."
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: lnreader-version
|
||||
attributes:
|
||||
label: LNReader version
|
||||
description: |
|
||||
You can find your LNReader version in **More → About**.
|
||||
label: LNReader Version
|
||||
description: Find this in **More → About**.
|
||||
placeholder: |
|
||||
Example: "2.0.0"
|
||||
validations:
|
||||
@@ -79,9 +82,8 @@ body:
|
||||
- type: input
|
||||
id: plugin-version
|
||||
attributes:
|
||||
label: Plugin version
|
||||
description: |
|
||||
You can find your Plugin version in **Browse → Installed** and scrolling to the desired source.
|
||||
label: Plugin Version
|
||||
description: Find this in **Browse → Installed** next to the plugin name.
|
||||
placeholder: |
|
||||
Example: "1.0.1"
|
||||
validations:
|
||||
@@ -90,9 +92,8 @@ body:
|
||||
- type: input
|
||||
id: android-version
|
||||
attributes:
|
||||
label: Android version
|
||||
description: |
|
||||
You can find this somewhere in your Android settings.
|
||||
label: Android Version
|
||||
description: Find this in your device settings.
|
||||
placeholder: |
|
||||
Example: "Android 15"
|
||||
validations:
|
||||
@@ -101,24 +102,24 @@ body:
|
||||
- type: textarea
|
||||
id: other-details
|
||||
attributes:
|
||||
label: Other details
|
||||
label: Other Details
|
||||
description: Any additional information or screenshots.
|
||||
placeholder: |
|
||||
Additional details and attachments.
|
||||
Additional context, screenshots, or relevant information.
|
||||
|
||||
- type: checkboxes
|
||||
id: acknowledgements
|
||||
attributes:
|
||||
label: Acknowledgements
|
||||
description: Your issue will be closed if you haven't done these steps.
|
||||
description: Your issue will be closed if these requirements are not met.
|
||||
options:
|
||||
- label: I have searched the existing issues and this is a new ticket, **NOT** a duplicate or related to another open issue.
|
||||
- label: I have searched existing issues and confirmed this is not a duplicate.
|
||||
required: true
|
||||
- label: I have written a short but informative title.
|
||||
- label: I have written a clear and descriptive title.
|
||||
required: true
|
||||
- label: I have updated the app to version **[2.0.0](https://github.com/LNReader/lnreader/releases/tag/v2.0.0-beta.3).**
|
||||
- label: I have updated the app to the latest version **[2.0.0](https://github.com/LNReader/lnreader/releases/tag/v2.0.0-beta.3)**.
|
||||
required: true
|
||||
- label: I have updated all installed extensions.
|
||||
- label: I have updated all installed plugins to the latest version.
|
||||
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).
|
||||
- label: I understand that app-specific issues should be reported in the [app repository](https://github.com/LNReader/lnreader/issues/new/choose).
|
||||
required: true
|
||||
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
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,69 @@
|
||||
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() {
|
||||
console.log(`Fetching plugins from: ${dist}`);
|
||||
|
||||
try {
|
||||
const response = await fetch(
|
||||
`https://raw.githubusercontent.com/LNReader/lnreader-plugins/${dist}/.dist/plugins.min.json`,
|
||||
);
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(
|
||||
`Failed to fetch plugins: ${response.status} ${response.statusText}`,
|
||||
);
|
||||
}
|
||||
|
||||
const pluginsRaw = await response.json();
|
||||
console.log(`Found ${pluginsRaw.length} plugins`);
|
||||
|
||||
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);
|
||||
console.log(`Loaded ${savedKeys.length} existing plugin keys`);
|
||||
} catch (err) {
|
||||
console.log('No existing keys file found, creating new one');
|
||||
}
|
||||
|
||||
if (!sameKeys(newKeys, savedKeys) && Array.isArray(newKeys)) {
|
||||
console.log('Plugin list has changed, updating issue template...');
|
||||
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));
|
||||
console.log('Issue template updated successfully');
|
||||
} else {
|
||||
console.log('No changes detected in plugin list');
|
||||
}
|
||||
|
||||
function sameKeys(a, b) {
|
||||
return a.length === b.length && a.every(value => b.includes(value));
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error generating issue template options:', error.message);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
main().catch(err => {
|
||||
console.error('Fatal error:', err);
|
||||
process.exit(1);
|
||||
});
|
||||
Reference in New Issue
Block a user