Skip to content

Commit 53dea43

Browse files
committed
add issue template
1 parent 3d382ac commit 53dea43

4 files changed

Lines changed: 133 additions & 7 deletions

File tree

.github/ISSUE_TEMPLATE/keyring.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: 🔑 Submit Developer Public Key
2+
description: Submit your public key to join the KernelSU Developer Keyring
3+
title: "[keyring] "
4+
labels: ["keyring"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
## Submit Developer Public Key
10+
11+
Thank you for joining the KernelSU Developer Keyring! Please fill in the information below.
12+
13+
**Important:**
14+
- ⚠️ Never share your private key (`.key.pem` file)
15+
- ✅ Only submit the public key (`.pub.pem` file)
16+
- 📝 Generate your key pair at [Developer Portal](https://developers.kernelsu.org)
17+
18+
- type: input
19+
id: username
20+
attributes:
21+
label: GitHub Username
22+
description: Your GitHub username (without @)
23+
placeholder: username
24+
validations:
25+
required: true
26+
27+
- type: textarea
28+
id: public_key
29+
attributes:
30+
label: Public Key
31+
description: Paste your public key here (P-256 or P-384 ECC key)
32+
placeholder: |
33+
-----BEGIN PUBLIC KEY-----
34+
...
35+
-----END PUBLIC KEY-----
36+
render: text
37+
validations:
38+
required: true
39+
40+
- type: checkboxes
41+
id: acknowledgments
42+
attributes:
43+
label: Acknowledgments
44+
description: Please confirm that you understand the following
45+
options:
46+
- label: I have generated this key pair using the [Developer Portal](https://developers.kernelsu.org)
47+
required: true
48+
- label: I understand that I must keep my private key secure and never share it
49+
required: true
50+
- label: I am submitting only the public key (not the private key)
51+
required: true

.github/ISSUE_TEMPLATE/revoke.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: 🚫 Revoke Developer Certificate
2+
description: Request to revoke a developer certificate
3+
title: "[revoke] "
4+
labels: ["revoke"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
## Revoke Developer Certificate
10+
11+
Use this form to request revocation of a developer certificate.
12+
13+
**Common reasons for revocation:**
14+
- 🔓 Private key has been compromised
15+
- 🔑 Private key has been lost
16+
- 🔄 Certificate is being replaced (superseded)
17+
18+
- type: input
19+
id: username
20+
attributes:
21+
label: GitHub Username
22+
description: Your GitHub username (without @)
23+
placeholder: username
24+
validations:
25+
required: true
26+
27+
- type: input
28+
id: fingerprint
29+
attributes:
30+
label: Certificate Fingerprint
31+
description: The SHA-256 fingerprint of the certificate to revoke
32+
placeholder: "AA:BB:CC:DD:EE:FF:..."
33+
validations:
34+
required: true
35+
36+
- type: dropdown
37+
id: reason
38+
attributes:
39+
label: Revocation Reason
40+
description: Why are you requesting this revocation?
41+
options:
42+
- Compromised (private key exposed)
43+
- Lost (private key lost/inaccessible)
44+
- Superseded (replacing with new certificate)
45+
- Other
46+
validations:
47+
required: true
48+
49+
- type: textarea
50+
id: details
51+
attributes:
52+
label: Additional Details
53+
description: Please provide any additional context or information
54+
placeholder: Optional details about the revocation request...
55+
validations:
56+
required: false
57+
58+
- type: checkboxes
59+
id: acknowledgments
60+
attributes:
61+
label: Acknowledgments
62+
description: Please confirm
63+
options:
64+
- label: I confirm that I am the owner of this certificate or have authorization to request its revocation
65+
required: true

keyring.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ async function handleKeyringIssue () {
339339
'-----END PUBLIC KEY-----\n' +
340340
'```\n\n' +
341341
'**How to generate a key pair:**\n' +
342-
'1. Visit our [Developer Portal](https://kernelsu-modules-repo.github.io/developers/)\n' +
342+
'1. Visit our [Developer Portal](https://developers.kernelsu.org)\n' +
343343
'2. Use the "Generate Key" tab to create your private key and public key\n' +
344344
'3. Submit the public key (NOT the private key) in this issue'
345345
)

website/src/components/keyring-app.tsx

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -351,9 +351,13 @@ function SubmitForm({ t, initialPublicKey }: { t: typeof locales.en; initialPubl
351351
};
352352

353353
const onSubmit = (data: z.infer<typeof submitSchema>) => {
354-
const title = `[keyring] ${data.username}`;
355-
const body = `## Submit Developer Public Key\n\n**Public Key**:\n\n\`\`\`\n${data.csr}\n\`\`\`\n\n---\nPlease review and add \`approved\` label to issue certificate.`;
356-
window.open(`https://github.com/KernelSU-Modules-Repo/developers/issues/new?title=${encodeURIComponent(title)}&body=${encodeURIComponent(body)}`, "_blank");
354+
// Use GitHub Issue Template with auto-filled data
355+
const params = new URLSearchParams({
356+
template: 'keyring.yml',
357+
username: data.username,
358+
public_key: data.csr
359+
});
360+
window.open(`https://github.com/KernelSU-Modules-Repo/developers/issues/new?${params.toString()}`, "_blank");
357361
};
358362

359363
return (
@@ -561,9 +565,15 @@ function RevokeForm({ t }: { t: typeof locales.en }) {
561565
};
562566

563567
const onSubmit = (data: z.infer<typeof revokeSchema>) => {
564-
const title = `[revoke] ${data.fingerprint.substring(0, 20)}...`;
565-
const body = `## Revoke Developer Certificate\n\n**Requested by**: @${data.username}\n**Certificate Fingerprint**: \`${data.fingerprint}\`\n**Reason**: ${data.reason}\n\n**Details**:\n${data.details || "N/A"}`;
566-
window.open(`https://github.com/KernelSU-Modules-Repo/developers/issues/new?title=${encodeURIComponent(title)}&body=${encodeURIComponent(body)}`, "_blank");
568+
// Use GitHub Issue Template with auto-filled data
569+
const params = new URLSearchParams({
570+
template: 'revoke.yml',
571+
username: data.username,
572+
fingerprint: data.fingerprint,
573+
reason: data.reason,
574+
details: data.details || ''
575+
});
576+
window.open(`https://github.com/KernelSU-Modules-Repo/developers/issues/new?${params.toString()}`, "_blank");
567577
};
568578

569579
return (

0 commit comments

Comments
 (0)