diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..2faf1d9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,128 @@ +name: Bug Report +description: Report a bug with one of our game clients. +labels: ["bug"] + +body: + # Bug details + - type: markdown + attributes: + value: | + ### Thanks for taking the time to fill out this bug report! + Only actual **bug** reports are accepted here. For general support or questions, please visit our [Forum](https://forum.plutonium.pw) or [Discord](https://discord.gg/plutonium). + Please search to see if an issue already exists for the bug you encountered before reporting it. + + --- + + - type: textarea + id: summary + attributes: + label: What happened? + description: | + Please describe the issue as well as you can. + If relevant, remember to attach any crash dumps and GSC scripts. Screenshots and screen recordings can be of help too. + validations: + required: true + + - type: textarea + id: expectation + attributes: + label: Expected result + description: What did you expect would happen? + validations: + required: true + + - type: textarea + id: repro + attributes: + label: Steps to reproduce + description: How can we as simply and reliably as possible reproduce the issue? + placeholder: | + 1. + 2. + 3. + validations: + required: true + + - type: dropdown + id: game + attributes: + label: Affected game(s) + description: Which game(s) does the issue affect? + multiple: true + options: + - BO2 Multiplayer (T6MP) + - BO2 Zombies (T6ZM) + - MW3 Multiplayer (IW5MP) + - BO1 Multiplayer (T5MP) + - BO1 Zombies (T5SP) + - WaW Multiplayer (T4MP) + - WaW Co-Op/Zombies (T4SP) + validations: + required: true + + - type: dropdown + id: component + attributes: + label: Affected component(s) + description: Which component(s) does the issue affect? + multiple: true + options: + - Client (game) + - Server (dedi) + validations: + required: true + + - type: input + id: version + attributes: + label: Plutonium version + description: Which Plutonium version did the issue occur on? + placeholder: "Example: r4516" + validations: + required: true + + - type: textarea + id: logs + attributes: + label: Relevant logs + description: Please copy and paste any relevant client or server log output. + + - type: textarea + id: extra + attributes: + label: Additional information + description: Any additional information you'd like to add. + + # System information + - type: markdown + attributes: + value: | + ## System information + Please provide information about the system the bug occurs on. + + - type: input + id: system-os + attributes: + label: Operating system + description: The operating system (and preferably version) Plutonium is running on. + placeholder: "Example: Windows 11 23H2" + + # Contact details + - type: markdown + attributes: + value: | + ## Contact details + If you want, you can provide some additional contact info so we can reach you easier. + + - type: input + id: contact-plutonium + attributes: + label: Plutonium profile + description: Link to your Plutonium profile. + placeholder: https://forum.plutonium.pw/user/ + + - type: input + id: contact-discord + attributes: + label: Discord username + placeholder: wumpus \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..ce9b964 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,9 @@ +blank_issues_enabled: false +contact_links: + - name: Community Forum + url: https://forum.plutonium.pw + about: For general support or questions. Try the search feature! + + - name: Discord + url: https://discord.gg/plutonium + about: For problems with your Plutonium account, or more direct communication. diff --git a/.github/workflows/issue_opened.yml b/.github/workflows/issue_opened.yml new file mode 100644 index 0000000..f39190f --- /dev/null +++ b/.github/workflows/issue_opened.yml @@ -0,0 +1,83 @@ +name: Label issues +on: + issues: + types: [opened, reopened] + +env: + ISSUE_BODY: ${{ github.event.issue.body }} + +jobs: + label_issue: + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - uses: actions/github-script@v7 + with: + script: | + const gameRegex = /### Affected game\(s\)\s*(.*)/; + const componentRegex = /### Affected component\(s\)\s*(.*)/; + const valueRegex = /\s*[,\n]\s*/; + + const gameLabelMap = { + 'IW5': 'game: IW5', + 'T6': 'game: T6', + 'T5': 'game: T5', + 'T4': 'game: T4' + }; + const mpLabel = 'mode: MP'; + const zmLabel = 'mode: ZM'; + const clientLabel = 'component: client'; + const serverLabel = 'component: server'; + + const issueBody = process.env.ISSUE_BODY; + const labelsToAdd = new Set(); + + const gameMatches = gameRegex.exec(issueBody); + if (gameMatches && gameMatches.length > 1) { + const games = gameMatches[1].split(valueRegex); + + // add 'game: ' labels + for (const game of games) { + for (const [gameMatch, label] of Object.entries(gameLabelMap)) { + if (game.includes(gameMatch)) { + labelsToAdd.add(label); + break; + } + } + } + + // add 'mode: ' label + if (games.every(g => g.includes('MP'))) { + labelsToAdd.add(mpLabel); + } + else if (games.every(g => g.includes('ZM') || g.includes('SP'))) { + labelsToAdd.add(zmLabel); + } + } + + const componentMatches = componentRegex.exec(issueBody); + if (componentMatches && componentMatches.length > 1) { + const components = componentMatches[1].split(valueRegex); + + // add 'component: ' labels + for (const component of components) { + if (component.includes('Client')) { + labelsToAdd.add(clientLabel); + } + if (component.includes('Server')) { + labelsToAdd.add(serverLabel); + } + } + } + + if (labelsToAdd.size === 0) { + return; + } + + github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: Array.from(labelsToAdd), + }); diff --git a/README.md b/README.md new file mode 100644 index 0000000..c8f09b6 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# Plutonium Bug Tracker