Skip to content

chore: turn flashduty-sdk into a polished open-source project#14

Merged
ysyneu merged 1 commit into
mainfrom
chore/oss-community-files
May 28, 2026
Merged

chore: turn flashduty-sdk into a polished open-source project#14
ysyneu merged 1 commit into
mainfrom
chore/oss-community-files

Conversation

@ysyneu
Copy link
Copy Markdown
Contributor

@ysyneu ysyneu commented May 28, 2026

Summary

Brings flashduty-sdk up to the same open-source standard as flashduty-mcp-server, so it can stand on its own as a public Go library.

  • LICENSE (MIT) — the README already linked LICENSE but the file was missing; this fixes the dead link.
  • Community-health docsCONTRIBUTING.md, CODE_OF_CONDUCT.md (Contributor Covenant 2.1, adopted by reference), SECURITY.md, SUPPORT.md.
  • .github metadataCODEOWNERS, dependabot.yml (gomod + github-actions, weekly), PR template, bug/feature issue templates.
  • CI workflowsgo.yml (go test -race + build across Linux/Windows/macOS), lint.yml (golangci-lint v2.11), code-scanning.yml (CodeQL).
  • .golangci.yml — matches the sibling repo's lint standard (with a test-file exclusion for the expected gosec false positives).
  • README — added badges and Contributing/Development/License sections, plus a Chinese README_zh.md.

To keep lint CI green, six existing findings are fixed (all behavior-preserving):

  • monitors.go — dropped a dead nil-guard and blanked an unused parameter.
  • helpers.go — removed the unused parseCommaSeparatedInts helper (and its now-unused strconv import).
  • templates.go — converted an if/else if channel check into a tagged switch.
  • logger_test.go, templates_test.go — ignore writer return values in test HTTP stubs.

Test plan

  • go build ./...
  • go vet ./...
  • go test -race ./...
  • golangci-lint run ./... — 0 issues
  • CI green on PR (go.yml / lint.yml / CodeQL)
  • Create the @flashcatcloud/flashduty-sdk team so CODEOWNERS resolves

Add the standard open-source kit modeled on flashduty-mcp-server:

- LICENSE (MIT) — fixes the previously dead README link
- Community-health docs: CONTRIBUTING, CODE_OF_CONDUCT (Contributor
  Covenant by-reference), SECURITY, SUPPORT
- .github metadata: CODEOWNERS, dependabot (gomod + actions), PR
  template, bug/feature issue templates
- CI workflows: go.yml (test -race + build, 3 OSes), lint.yml
  (golangci-lint v2.11), code-scanning.yml (CodeQL)
- .golangci.yml matching the sibling repo's lint standard
- README badges + Contributing/Development/License sections, plus a
  Chinese README_zh.md

Also fix the six lint findings so CI ships green: drop a dead nil-guard
and unused param in monitors.go, remove the unused parseCommaSeparatedInts
helper, convert an if/else-if channel check to a tagged switch, and
ignore writer return values in test HTTP stubs.
@github-advanced-security
Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@ysyneu ysyneu merged commit 238a2ed into main May 28, 2026
12 checks passed
@ysyneu ysyneu deleted the chore/oss-community-files branch May 28, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants