v0.2.31 SIGSEGV when hosting Steam multiplayer lobby on Linux, isolated to SetLobbyMemberData #7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Issue auto label | |
| on: | |
| issues: | |
| types: [opened, edited] | |
| permissions: | |
| issues: write | |
| jobs: | |
| label: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Parse issue form fields and label | |
| uses: actions/github-script@v9 | |
| with: | |
| script: | | |
| const issue = context.payload.issue; | |
| if (!issue) return; | |
| const body = issue.body ?? ""; | |
| function pickValue(...heads) { | |
| for (const head of heads) { | |
| const re = new RegExp(`^###\\s+${head}\\s*\\n([^\\n]+)`, "mi"); | |
| const m = body.match(re); | |
| if (m && m[1]) return m[1].trim(); | |
| } | |
| return null; | |
| } | |
| const areaRaw = pickValue("Area", "模块范围", "范围"); | |
| const severityRaw = pickValue("Severity", "严重程度"); | |
| const labels = new Set(["status/needs-triage"]); | |
| function addArea(v) { | |
| if (!v) return; | |
| const x = v.toLowerCase(); | |
| if (x.includes("api") || x.includes("usage") || x.includes("公开")) return labels.add("area/api"); | |
| if (x.includes("settings") || x.includes("设置")) return labels.add("area/settings"); | |
| if (x.includes("assets") || x.includes("资源")) return labels.add("area/assets"); | |
| if (x.includes("audio") || x.includes("音频")) return labels.add("area/audio"); | |
| if (x.includes("localization") || x.includes("本地化")) return labels.add("area/localization"); | |
| if (x.includes("mod loading") || x.includes("模组加载")) return labels.add("area/mod-loading"); | |
| if (x.includes("compatibility") || x.includes("兼容")) return labels.add("area/compatibility"); | |
| if (x.includes("build") || x.includes("构建")) return labels.add("area/build"); | |
| if (x.includes("docs") || x.includes("文档")) return labels.add("area/docs"); | |
| if (x.includes("tests") || x.includes("samples") || x.includes("测试") || x.includes("示例")) return labels.add("area/tests"); | |
| if (x.includes("ui")) return labels.add("area/ui"); | |
| return labels.add("area/other"); | |
| } | |
| function addSeverity(v) { | |
| if (!v) return; | |
| const x = v.toLowerCase(); | |
| if (x.includes("critical") || x.includes("crash") || x.includes("严重") || x.includes("崩溃")) { | |
| labels.add("severity/critical"); | |
| labels.add("priority/p0"); | |
| return; | |
| } | |
| if (x.includes("broken") || x.includes("不可用")) { | |
| labels.add("severity/broken"); | |
| labels.add("priority/p1"); | |
| return; | |
| } | |
| if (x.includes("major") || x.includes("regression") || x.includes("主要") || x.includes("回归")) { | |
| labels.add("severity/major"); | |
| labels.add("priority/p1"); | |
| return; | |
| } | |
| if (x.includes("minor") || x.includes("轻微")) { | |
| labels.add("severity/minor"); | |
| labels.add("priority/p3"); | |
| return; | |
| } | |
| } | |
| addArea(areaRaw); | |
| addSeverity(severityRaw); | |
| const owner = context.repo.owner; | |
| const repo = context.repo.repo; | |
| const issue_number = issue.number; | |
| await github.rest.issues.addLabels({ | |
| owner, | |
| repo, | |
| issue_number, | |
| labels: [...labels], | |
| }); |