Skip to content

Commit 881c228

Browse files
authored
Merge pull request #28 from photon-hq/feat/eng-441-github-templates-and-workflows
feat ✨: add GitHub issue templates and security workflows
2 parents f0b99c4 + 91e9b09 commit 881c228

File tree

6 files changed

+246
-0
lines changed

6 files changed

+246
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
name: Bug Report
3+
description: Report a bug encountered while using imessage-kit SDK
4+
labels:
5+
- bug
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thanks for taking the time to report a bug! Please fill out the form below to help us understand and fix the issue.
11+
12+
- type: checkboxes
13+
id: confirmations
14+
attributes:
15+
label: Pre-submission checklist
16+
options:
17+
- label: I have searched existing issues and this is not a duplicate
18+
required: true
19+
- label: I have read the [README](https://github.com/photon-hq/imessage-kit#readme)
20+
required: true
21+
22+
- type: textarea
23+
id: problem
24+
attributes:
25+
label: What happened?
26+
description: A clear and concise description of what the bug is.
27+
placeholder: Describe the bug...
28+
validations:
29+
required: true
30+
31+
- type: textarea
32+
id: expected
33+
attributes:
34+
label: What did you expect to happen?
35+
placeholder: Describe what you expected...
36+
validations:
37+
required: true
38+
39+
- type: textarea
40+
id: repro
41+
attributes:
42+
label: Steps to reproduce
43+
description: Minimal code or steps to reproduce the issue.
44+
placeholder: |
45+
1. Initialize SDK with...
46+
2. Call method...
47+
3. See error...
48+
render: typescript
49+
validations:
50+
required: true
51+
52+
- type: textarea
53+
id: additional
54+
attributes:
55+
label: Additional context
56+
description: Any other context, screenshots, or information that might help.
57+

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
blank_issues_enabled: false
3+
contact_links:
4+
- name: 💬 Questions & Discussions
5+
url: https://github.com/photon-hq/imessage-kit/discussions
6+
about: Ask questions, share ideas, or discuss usage with the community
7+
- name: 📖 Documentation
8+
url: https://github.com/photon-hq/imessage-kit#readme
9+
about: Check the README and examples before opening an issue
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
name: Feature Request
3+
description: Suggest a new feature or enhancement
4+
labels:
5+
- enhancement
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thanks for suggesting a feature! Please provide as much detail as possible to help us understand your idea.
11+
12+
- type: textarea
13+
id: feature
14+
attributes:
15+
label: What would you like to be added?
16+
description: A clear and concise description of the feature.
17+
placeholder: I would like the SDK to support...
18+
validations:
19+
required: true
20+
21+
- type: textarea
22+
id: rationale
23+
attributes:
24+
label: Why is this needed?
25+
description: Explain the problem this feature would solve.
26+
placeholder: Currently, I cannot do X because...
27+
validations:
28+
required: true
29+
30+
- type: textarea
31+
id: use-case
32+
attributes:
33+
label: Example usage
34+
description: Show how you would use this feature in code.
35+
placeholder: |
36+
const sdk = new IMessageSDK({ ... })
37+
38+
// Example of how the new feature would work
39+
await sdk.newFeature()
40+
render: typescript
41+
42+
- type: dropdown
43+
id: impact
44+
attributes:
45+
label: How many users would benefit?
46+
options:
47+
- Few (niche use case)
48+
- Some (common scenario)
49+
- Many (most users would benefit)
50+
validations:
51+
required: true
52+
53+
- type: dropdown
54+
id: willing-to-contribute
55+
attributes:
56+
label: Would you be willing to contribute this feature?
57+
options:
58+
- "Yes, I can submit a PR"
59+
- "Yes, with guidance"
60+
- "No, but I can help test"
61+
- "No"
62+
63+
- type: textarea
64+
id: additional
65+
attributes:
66+
label: Additional context
67+
description: Any other context, mockups, or references.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
name: "CodeQL"
3+
4+
on:
5+
push:
6+
branches: [main]
7+
pull_request:
8+
branches: [main]
9+
schedule:
10+
- cron: '20 14 * * 5'
11+
12+
permissions: read-all
13+
14+
jobs:
15+
analyze:
16+
name: Analyze
17+
runs-on: ubuntu-latest
18+
permissions:
19+
actions: read
20+
contents: read
21+
security-events: write
22+
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
language: ['javascript-typescript']
27+
28+
steps:
29+
- name: Checkout repository
30+
uses: actions/checkout@v4
31+
32+
- name: Initialize CodeQL
33+
uses: github/codeql-action/init@v3
34+
with:
35+
languages: ${{ matrix.language }}
36+
37+
- name: Autobuild
38+
uses: github/codeql-action/autobuild@v3
39+
40+
- name: Perform CodeQL Analysis
41+
uses: github/codeql-action/analyze@v3

.github/workflows/scorecards.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
name: Scorecards supply-chain security
3+
4+
on:
5+
branch_protection_rule:
6+
schedule:
7+
- cron: '45 1 * * 0'
8+
push:
9+
branches: ["main"]
10+
11+
permissions: read-all
12+
13+
jobs:
14+
analysis:
15+
name: Scorecards analysis
16+
runs-on: ubuntu-latest
17+
permissions:
18+
security-events: write
19+
id-token: write
20+
21+
steps:
22+
- name: "Checkout code"
23+
uses: actions/checkout@v4
24+
with:
25+
persist-credentials: false
26+
27+
- name: "Run analysis"
28+
uses: ossf/scorecard-action@v2.4.0
29+
with:
30+
results_file: results.sarif
31+
results_format: sarif
32+
publish_results: true
33+
34+
- name: "Upload artifact"
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: SARIF file
38+
path: results.sarif
39+
retention-days: 5
40+
41+
- name: "Upload to code-scanning"
42+
uses: github/codeql-action/upload-sarif@v3
43+
with:
44+
sarif_file: results.sarif

.github/workflows/stale.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Mark and close stale issues and PRs
3+
4+
on:
5+
schedule:
6+
- cron: '0 0 * * *'
7+
8+
permissions:
9+
issues: write
10+
pull-requests: write
11+
12+
jobs:
13+
stale:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/stale@v9
17+
with:
18+
days-before-stale: 90
19+
days-before-close: 21
20+
stale-issue-label: 'stale'
21+
stale-pr-label: 'stale'
22+
exempt-issue-labels: 'pinned,help wanted,good first issue'
23+
exempt-pr-labels: 'pinned,help wanted'
24+
stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions.'
25+
stale-pr-message: 'This pull request has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions.'
26+
close-issue-message: 'This issue has been automatically closed because it has been stale for 21 days with no additional activity. If you believe this was closed in error or still requires attention, please feel free to reopen or create a new issue with updated details.'
27+
close-pr-message: 'This pull request has been automatically closed because it has been stale for 21 days with no additional activity. If you believe this was closed in error or would like to continue the work, please reopen the pull request or open a new one with updated changes.'
28+
operations-per-run: 30

0 commit comments

Comments
 (0)