diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..f03978c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,22 @@ +--- +name: Bug report +about: Something is broken +labels: bug +--- + +**Command** (redact your token): + +```sh +afcli ... +``` + +**Expected behavior** + +**Actual behavior / error output** + +``` +``` + +**Environment** +- afcli version (`afcli --version`): +- OS: diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..68c1b02 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,11 @@ +--- +name: Feature request +about: Suggest a new command, flag, or API to support +labels: enhancement +--- + +**What would you like afcli to do?** + +**Which AppsFlyer API does this relate to?** (link to the docs page if possible) + +**How would you use it?** (example command line) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..c951e9e --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,11 @@ +## What does this PR do? + +## Related issue + + + +## Checklist + +- [ ] `go test ./...` passes +- [ ] `gofmt` / `go vet` are clean +- [ ] Docs (README / --help text) updated if behavior changed diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2c36de..169eb01 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - uses: actions/setup-go@v5 with: go-version-file: go.mod diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b0ec03a..1648be3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ jobs: goreleaser: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: fetch-depth: 0 - uses: actions/setup-go@v5 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..5d3826d --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,32 @@ +# Contributing + +Thanks for your interest in improving afcli! + +## Development setup + +Go 1.26 or later is required. + +```sh +git clone https://github.com/rie03p/appsflyer-cli.git +cd appsflyer-cli +go build -o afcli ./cmd/afcli +go test ./... +``` + +## Project layout + +- `cmd/afcli` — entry point. +- `internal/appsflyer` — API client, one file per API family (raw data, aggregate, master, ...). No CLI dependencies. +- `internal/cli` — the cobra command tree, one file per command. + +To add support for a new AppsFlyer API, add a client file in `internal/appsflyer` with a params struct and a `Client` method, then a matching command file in `internal/cli`. Both layers are tested against `httptest` servers — see the existing `_test.go` files for the pattern. + +## Pull requests + +- Keep each PR focused on one change. +- Run `gofmt`, `go vet ./...`, and `go test ./...` before pushing (CI enforces all three). +- Use [Conventional Commits](https://www.conventionalcommits.org/) for commit messages (`feat:`, `fix:`, `docs:`, ...) — release notes are generated from them. + +## Reporting issues + +Bug reports and feature requests are welcome via [GitHub issues](https://github.com/rie03p/appsflyer-cli/issues). For bugs, include the command you ran (with the token redacted) and the error output.