-
-
Notifications
You must be signed in to change notification settings - Fork 427
Обновляем работу PR и Issue на Github #14468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
695ab4d
4abdacb
7bfc1ea
8b778d0
e597c36
39ad4b8
8349b41
9e5a5f1
18821be
415a7ba
2741cf5
0dc4049
8ab1b42
0d9d80c
bdc692a
7abe26e
12682c3
cca2374
3f6aeef
5114ed2
86ed19f
46cdb29
36883a8
a0761d6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,22 @@ | ||
| name: "Сообщить о проблеме" | ||
| description: "Если что-то работает не так, как ожидалось." | ||
| labels: ["Bug"] | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Я вот хзхз. Из минусов, надо в голове помнить, что старые баги были под ЛЕЙБЛОМ "баг", а под ТИПОМ "баг" новые. Мне просто чет кажется, лучше баг-лейбл оставить на месте
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ответил в Дискорде |
||
| type: Bug | ||
| body: | ||
| - type: markdown | ||
| attributes: | ||
| value: "## Пожалуйста, не стирайте строчки, которые были автоматически созданы." | ||
| value: "## В игре есть кнопка «Bug Report» в правом верхнем углу игры, при её нажатии часть информации ниже заполнится автоматически." | ||
|
|
||
| - type: checkboxes | ||
| id: feature_scope | ||
| attributes: | ||
| label: "Категория бага" | ||
| description: "К какому типу контента относится проблема?" | ||
| options: | ||
| - label: "Код 👨💻" | ||
| - label: "Спрайты 🎨" | ||
| - label: "Карты 🗺️" | ||
| - label: "Перевод/Описание 🧠" | ||
|
|
||
|
|
||
| - type: textarea | ||
| id: description | ||
|
|
@@ -13,10 +25,20 @@ body: | |
| attributes: | ||
| label: "Описание" | ||
| description: "Опишите одну проблему как можно подробнее" | ||
| value: | | ||
| #### Что должно было произойти | ||
|
|
||
| #### Что произошло на самом деле | ||
| - type: textarea | ||
| id: whatmusthappen | ||
| validations: | ||
| required: true | ||
| attributes: | ||
| label: "Что должно было произойти" | ||
|
|
||
| - type: textarea | ||
| id: whathappenow | ||
| validations: | ||
| required: true | ||
| attributes: | ||
| label: "Что произошло на самом деле" | ||
|
|
||
| - type: textarea | ||
| id: reproduction | ||
|
|
||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| # Changes to a .dmm or anything in the _map subfolder | ||
| 'Map Edit': | ||
| - changed-files: | ||
| - any-glob-to-any-file: | ||
| - '**/*.dmm' | ||
|
|
||
| # Any .dmi changes | ||
| 'Sprites': | ||
| - changed-files: | ||
| - any-glob-to-any-file: | ||
| - '**/*.dmi' | ||
|
|
||
| # Any sounds changes | ||
| 'Sound': | ||
| - changed-files: | ||
| - any-glob-to-any-file: | ||
| - '**/*.aif' | ||
| - '**/*.aiff' | ||
| - '**/*.it' | ||
| - '**/*.mid' | ||
| - '**/*.midi' | ||
| - '**/*.mod' | ||
| - '**/*.mp3' | ||
| - '**/*.ogg' | ||
| - '**/*.oxm' | ||
| - '**/*.raw' | ||
| - '**/*.s3m' | ||
| - '**/*.wma' | ||
| - '**/*.wav' | ||
| - '**/*.xm' | ||
|
|
||
| # Changes to the SQL subfolder | ||
| 'Database': | ||
| - changed-files: | ||
| - any-glob-to-any-file: | ||
| - 'SQL/**' | ||
|
|
||
| # Changes to the tgui subfolder | ||
| 'UI': | ||
| - changed-files: | ||
| - any-glob-to-any-file: | ||
| - 'tgui/**' | ||
AzzyDreemurr13 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - 'html/**' | ||
| - 'nano/**' | ||
|
|
||
| # Changes to the config subfolder | ||
| 'Config Update': | ||
| - changed-files: | ||
| - any-glob-to-any-file: | ||
| - 'config/**/*' | ||
| - 'config/example/**/*' | ||
|
|
||
| # Changes to a .dm or anything in the code subfolder | ||
| 'Code': | ||
| - changed-files: | ||
| - any-glob-to-any-file: | ||
| - '**/*.dm' | ||
|
|
||
| # Any .json changes | ||
| 'javascript': | ||
| - changed-files: | ||
| - any-glob-to-any-file: | ||
| - '**/*.json' | ||
|
|
||
| # Changes to the .Github subfolder | ||
| 'Maintainability Improvements': | ||
KIBORG04 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - changed-files: | ||
| - any-glob-to-any-file: | ||
| - '.github/**' | ||
| - '.github/**/*' | ||
| - '.vscode/**/*' | ||
| - 'docs/**/*' | ||
| - 'scripts/**/*' | ||
| - 'test/**/*' | ||
| - '.codebeatignore' | ||
| - '.codebeatsettings' | ||
| - '.editorconfig' | ||
| - '.git*' | ||
| - 'biome.json' | ||
| - 'libmysql.dll' | ||
| - 'LICENSE' | ||
| - 'README.md' | ||
| - 'SpacemanDMM.toml' | ||
|
|
||
| # Changes to the Tools folder | ||
| 'Tools': | ||
| - changed-files: | ||
| - any-glob-to-any-file: | ||
| - 'tools/**/*' | ||
|
|
||
| #Translation tools | ||
| 'Translation/Localization': | ||
| - changed-files: | ||
| - any-glob-to-any-file: | ||
| - 'code/__DEFINES/_translation.dm' | ||
| - '.github/wiki/TRANSLATION.md' | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,127 @@ | ||
| name: Auto Label Issues | ||
|
|
||
| on: | ||
| issues: | ||
| types: [opened] | ||
|
|
||
| permissions: | ||
| issues: write | ||
|
|
||
| jobs: | ||
| process-labels: | ||
| runs-on: ubuntu-latest | ||
| if: github.event.issue.state == 'open' | ||
|
|
||
| steps: | ||
| - name: Parse and add labels based on checkboxes | ||
| id: process_issue | ||
| uses: actions/github-script@v7 | ||
| with: | ||
| script: | | ||
| const body = context.payload.issue.body; | ||
| console.log('Issue body:', body); | ||
|
|
||
| const labelsToAdd = []; | ||
| let foundCheckboxesSection = false; | ||
| let sectionToRemove = ''; | ||
|
|
||
| const scopeMap = { | ||
| 'Код 👨💻': 'Code', | ||
| 'Спрайты 🎨': 'Sprites', | ||
| 'Карты 🗺️': 'Map Issue', | ||
| 'Перевод/Описание 🧠': 'Translation/Localization' | ||
| }; | ||
|
|
||
| if (body) { | ||
| if (body.includes('Что потребует изменений?')) { | ||
| foundCheckboxesSection = true; | ||
| sectionToRemove = 'Что потребует изменений?'; | ||
| console.log('Found "Что потребует изменений?" section'); | ||
| } else if (body.includes('Категория бага')) { | ||
| foundCheckboxesSection = true; | ||
| sectionToRemove = 'Категория бага'; | ||
| console.log('Found "Категория бага" section'); | ||
| } | ||
|
|
||
| if (body.includes('[x]')) { | ||
| console.log('Found checked checkboxes in body'); | ||
| for (const [checkboxLabel, labelName] of Object.entries(scopeMap)) { | ||
| const checkboxRegex = new RegExp('\\[x\\]\\s*' + checkboxLabel.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')); | ||
| if (checkboxRegex.test(body)) { | ||
| labelsToAdd.push(labelName); | ||
| console.log('Found selected:', checkboxLabel, '->', labelName); | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| const uniqueLabels = [...new Set(labelsToAdd)]; | ||
| console.log('Labels to add:', uniqueLabels); | ||
|
|
||
| if (uniqueLabels.length > 0) { | ||
| try { | ||
| await github.rest.issues.addLabels({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| issue_number: context.issue.number, | ||
| labels: uniqueLabels | ||
| }); | ||
| console.log('Labels added successfully'); | ||
| } catch (error) { | ||
| console.log('Error adding labels:', error); | ||
| } | ||
| } | ||
|
|
||
| core.setOutput('foundCheckboxesSection', foundCheckboxesSection); | ||
| core.setOutput('sectionToRemove', sectionToRemove); | ||
|
|
||
| return { | ||
| foundCheckboxesSection: foundCheckboxesSection, | ||
| sectionToRemove: sectionToRemove | ||
| }; | ||
|
|
||
| - name: Clean up issue body | ||
| if: steps.process_issue.outputs.foundCheckboxesSection == 'true' | ||
| uses: actions/github-script@v7 | ||
| env: | ||
| SECTION_TO_REMOVE: ${{ steps.process_issue.outputs.sectionToRemove }} | ||
| with: | ||
| script: | | ||
| const body = context.payload.issue.body; | ||
| const sectionToRemove = process.env.SECTION_TO_REMOVE; | ||
|
|
||
| console.log('Section to remove:', sectionToRemove); | ||
| console.log('Original body:', body); | ||
|
|
||
| if (!body || !sectionToRemove) { | ||
| console.log('No body or section to clean'); | ||
| return; | ||
| } | ||
|
|
||
| let cleanedBody = body; | ||
|
|
||
| const regex = new RegExp('###?\\s*' + sectionToRemove + '[\\s\\S]*?((?=###)|$)', 'i'); | ||
| cleanedBody = cleanedBody.replace(regex, ''); | ||
| cleanedBody = cleanedBody.replace(/-\s*\[[x\s]\]\s*.*\n/g, ''); | ||
| cleanedBody = cleanedBody.replace(/_No response_/g, '_Отсутствует_'); | ||
| cleanedBody = cleanedBody.replace(/\n{3,}/g, '\n\n'); | ||
| cleanedBody = cleanedBody.replace(/^###\s*$/gm, ''); | ||
| cleanedBody = cleanedBody.trim(); | ||
|
|
||
| console.log('Cleaned body:', cleanedBody); | ||
|
|
||
| if (body !== cleanedBody && cleanedBody.length > 0) { | ||
| try { | ||
| await github.rest.issues.update({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| issue_number: context.issue.number, | ||
| body: cleanedBody | ||
| }); | ||
| console.log('Issue body cleaned successfully'); | ||
| } catch (error) { | ||
| console.log('Error cleaning issue body:', error); | ||
| } | ||
| } else { | ||
| console.log('No changes to body needed'); | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.