Skip to content

Commit 0ee1cf7

Browse files
chore(repo): add community health files and CI hardening (#193)
Adds OSS community files (LICENSE, CODE_OF_CONDUCT, SECURITY, CONTRIBUTING, issue/PR templates), pins Node via .nvmrc/.node-version, and hardens CI with a generated-code drift check and >=98% type coverage. Build outputs now include linked sourcemaps and npm publish uses provenance attestation. Refreshes CLAUDE.md to match the current Node >=24.15.0 engines field. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 945f784 commit 0ee1cf7

15 files changed

Lines changed: 436 additions & 24 deletions
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Bug report
2+
description: Report a reproducible bug in Tsarr
3+
labels: [bug]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for taking the time to file a bug report. Please fill in as much
9+
detail as you can — reproduction steps are the most useful.
10+
- type: textarea
11+
id: summary
12+
attributes:
13+
label: Summary
14+
description: A clear, concise description of what the bug is.
15+
validations:
16+
required: true
17+
- type: textarea
18+
id: repro
19+
attributes:
20+
label: Reproduction steps
21+
description: Minimal steps to reproduce. Include code snippets or CLI invocations.
22+
placeholder: |
23+
1. Run `tsarr ...`
24+
2. Observe ...
25+
validations:
26+
required: true
27+
- type: textarea
28+
id: expected
29+
attributes:
30+
label: Expected behavior
31+
validations:
32+
required: true
33+
- type: textarea
34+
id: actual
35+
attributes:
36+
label: Actual behavior
37+
description: What actually happened. Include error messages and stack traces if any.
38+
validations:
39+
required: true
40+
- type: input
41+
id: tsarr-version
42+
attributes:
43+
label: Tsarr version
44+
placeholder: e.g. 2.10.0
45+
validations:
46+
required: true
47+
- type: dropdown
48+
id: surface
49+
attributes:
50+
label: Surface
51+
options:
52+
- CLI
53+
- SDK
54+
- Both
55+
validations:
56+
required: true
57+
- type: input
58+
id: runtime
59+
attributes:
60+
label: Runtime
61+
description: Node/Bun version and OS.
62+
placeholder: e.g. Node 24.15.0 on macOS 15.1
63+
validations:
64+
required: true
65+
- type: input
66+
id: servarr
67+
attributes:
68+
label: Servarr product + version
69+
description: Which Servarr app and version is being targeted, if relevant.
70+
placeholder: e.g. Radarr 5.14.0
71+
- type: textarea
72+
id: additional
73+
attributes:
74+
label: Additional context
75+
description: Logs, screenshots, config (redact secrets), anything else.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Security vulnerability
4+
url: https://github.com/robbeverhelst/tsarr/security/advisories/new
5+
about: Please report security issues privately — do not open a public issue.
6+
- name: Question or discussion
7+
url: https://github.com/robbeverhelst/tsarr/discussions
8+
about: Ask questions or start a discussion here.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Feature request
2+
description: Suggest a new feature or improvement
3+
labels: [enhancement]
4+
body:
5+
- type: textarea
6+
id: problem
7+
attributes:
8+
label: Problem
9+
description: What problem are you trying to solve? What's the use case?
10+
validations:
11+
required: true
12+
- type: textarea
13+
id: proposal
14+
attributes:
15+
label: Proposed solution
16+
description: How would you like it to work? API shape, CLI flags, etc.
17+
validations:
18+
required: true
19+
- type: textarea
20+
id: alternatives
21+
attributes:
22+
label: Alternatives considered
23+
description: Other approaches you considered and why they fall short.
24+
- type: dropdown
25+
id: surface
26+
attributes:
27+
label: Surface
28+
options:
29+
- CLI
30+
- SDK
31+
- Both
32+
validations:
33+
required: true
34+
- type: textarea
35+
id: additional
36+
attributes:
37+
label: Additional context

.github/pull_request_template.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<!--
2+
Thanks for the PR! A few notes:
3+
- Keep the title in Conventional Commit form: `type(scope): description`
4+
- Make sure CI is green before requesting review
5+
- Follow CONTRIBUTING.md for setup and commit conventions
6+
-->
7+
8+
## Summary
9+
10+
<!-- What does this PR do, and why? -->
11+
12+
## Changes
13+
14+
<!-- Bullet list of notable changes -->
15+
16+
-
17+
-
18+
19+
## Testing
20+
21+
<!-- How did you verify this works? -->
22+
23+
- [ ] `bun test` passes
24+
- [ ] `bun run typecheck` passes
25+
- [ ] `bun run lint` passes
26+
- [ ] Manually tested the affected CLI command / SDK path
27+
28+
## Related issues
29+
30+
<!-- Closes #123, Refs #456 -->

.github/workflows/ci.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,21 @@ jobs:
2727

2828
- name: Generate API clients and types
2929
run: bun run generate && bun run generate:types
30-
30+
31+
- name: Check for generator drift
32+
run: |
33+
if ! git diff --exit-code --quiet -- src/generated; then
34+
echo "::error::Generated files are out of date. Run 'bun run generate && bun run generate:types' locally and commit the result."
35+
git --no-pager diff --stat -- src/generated
36+
exit 1
37+
fi
38+
3139
- name: Run TypeScript check
3240
run: bun run typecheck
33-
41+
42+
- name: Check type coverage
43+
run: bun run typecheck:coverage
44+
3445
- name: Run linter
3546
run: bun run lint
3647

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ lerna-debug.log*
1313
# Caches
1414

1515
.cache
16+
.type-coverage
1617

1718
# Diagnostic reports (https://nodejs.org/api/report.html)
1819

.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
24.15.0

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
24.15.0

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## What This Repo Is
44
- Tsarr is a TypeScript SDK and CLI for the Servarr ecosystem: Radarr, Sonarr, Lidarr, Readarr, Prowlarr, and Bazarr.
5-
- The published package targets Node.js (`>=18.20.8`), while Bun is used for local development, build, generation, and tests.
5+
- The published package targets Node.js (`>=24.15.0`), while Bun is used for local development, build, generation, and tests.
66
- This repo already ships generated clients, handwritten wrappers, a CLI, packaging assets, and user-facing docs. Do not treat core features as "future work".
77

88
## Read First

CODE_OF_CONDUCT.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic
9+
status, nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment:
18+
19+
- Demonstrating empathy and kindness toward other people
20+
- Being respectful of differing opinions, viewpoints, and experiences
21+
- Giving and gracefully accepting constructive feedback
22+
- Accepting responsibility and apologizing to those affected by our mistakes
23+
- Focusing on what is best for the overall community
24+
25+
Examples of unacceptable behavior:
26+
27+
- The use of sexualized language or imagery, and sexual attention or advances
28+
- Trolling, insulting or derogatory comments, and personal or political attacks
29+
- Public or private harassment
30+
- Publishing others' private information without explicit permission
31+
- Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Enforcement Responsibilities
35+
36+
Community leaders are responsible for clarifying and enforcing our standards
37+
and will take appropriate and fair corrective action in response to any
38+
behavior that they deem inappropriate, threatening, offensive, or harmful.
39+
40+
## Scope
41+
42+
This Code of Conduct applies within all community spaces, and also applies
43+
when an individual is officially representing the community in public spaces.
44+
45+
## Enforcement
46+
47+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
48+
reported to the community leaders responsible for enforcement at
49+
**robbe@settlemint.com**. All complaints will be reviewed and investigated
50+
promptly and fairly.
51+
52+
## Attribution
53+
54+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
55+
version 2.1, available at
56+
<https://www.contributor-covenant.org/version/2/1/code_of_conduct.html>.
57+
58+
[homepage]: https://www.contributor-covenant.org

0 commit comments

Comments
 (0)