diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index 7711bb1..62626e9 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -6,6 +6,12 @@ body: id: tool attributes: {label: Tool} validations: {required: true} + - type: input + id: version + attributes: {label: shipstores version, placeholder: "0.2.0", description: "uvx runs the latest release unless you pinned one"} + - type: input + id: client + attributes: {label: MCP client, placeholder: Claude Code, Claude Desktop, Cursor...} - type: textarea id: details attributes: {label: What happened, description: Input you passed and the error. Redact keys and ids.} diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..0919951 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: true +contact_links: + - name: Want to contribute? Start with a good first issue + url: https://github.com/FidelisMM/shipstores/labels/good%20first%20issue + about: Small, scoped tasks that need no store credentials. + - name: Security issue + url: https://github.com/FidelisMM/shipstores/blob/main/SECURITY.md + about: Please report vulnerabilities privately, not in a public issue. diff --git a/.github/ISSUE_TEMPLATE/console-flow-broke.yml b/.github/ISSUE_TEMPLATE/console-flow-broke.yml index e2d0693..2cc121c 100644 --- a/.github/ISSUE_TEMPLATE/console-flow-broke.yml +++ b/.github/ISSUE_TEMPLATE/console-flow-broke.yml @@ -13,6 +13,12 @@ body: - type: input id: lang attributes: {label: Console language, placeholder: en-US} + - type: input + id: version + attributes: {label: shipstores version, placeholder: "0.2.0", description: "uvx runs the latest release unless you pinned one"} + - type: input + id: client + attributes: {label: MCP client, placeholder: Claude Code, Claude Desktop, Cursor...} - type: textarea id: error attributes: {label: What happened, description: Error output and what you saw in the console. Blur account names.} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b0d824..162fafc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,13 +1,30 @@ name: CI -on: [push, pull_request] +on: + push: + branches: [main] + pull_request: +permissions: + contents: read +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: check: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: astral-sh/setup-uv@v6 - - run: uv sync - - run: uv run --with ruff ruff check src tests --select E9,F - - run: uv run python -m unittest discover -s tests -v - - run: uv run python -W error -c "import glob; [compile(open(f).read(), f, 'exec') for f in glob.glob('src/shipstores/*.py')]" - - run: uv run python -c "import asyncio; from shipstores.server import mcp; print(len(asyncio.run(mcp.list_tools())), 'tools')" + - run: uv sync --locked + - name: Lint + run: uv run --with ruff ruff check src tests --select E9,F + - name: Unit tests + run: uv run python -m unittest discover -s tests -v + - name: Compile with warnings as errors + run: uv run python -W error -c "import pathlib; [compile(p.read_text(), str(p), 'exec') for p in pathlib.Path('src/shipstores').glob('*.py')]" + - name: Tool count + run: uv run python -c "import asyncio; from shipstores.server import mcp; print(len(asyncio.run(mcp.list_tools())), 'tools')" + docker: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: docker build -t shipstores . diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b37d691..5b1f35f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,14 +2,26 @@ name: Publish to PyPI on: release: types: [published] +permissions: + contents: read jobs: publish: runs-on: ubuntu-latest environment: pypi permissions: + contents: read id-token: write steps: - uses: actions/checkout@v4 - uses: astral-sh/setup-uv@v6 + - name: Tag matches pyproject version + run: | + version=$(python3 -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])") + if [ "${GITHUB_REF_NAME#v}" != "$version" ]; then + echo "::error::Tag $GITHUB_REF_NAME does not match pyproject version $version" + exit 1 + fi + - run: uv sync --locked + - run: uv run python -m unittest discover -s tests - run: uv build - run: uv publish --trusted-publishing always diff --git a/CHANGELOG.md b/CHANGELOG.md index dd75106..cd12082 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Unreleased + +- Tests for `apple_console.set_privacy`: category × purpose × protection expansion and the validation errors. Thanks @GreedyC (#14). + ## 0.2.0 - Toolsets: `SHIPSTORES_TOOLSETS` (or `[server] toolsets` in `config.toml`) exposes only the tool groups you need: `apple`, `play` and/or `eas`. Core diagnostics stay on, and the default is still all 60 tools. Thanks @berkay-byte for the first community contribution (#11). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 84152ac..8f67b32 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,10 +24,11 @@ You don't need store credentials to work on most of the code. To try tools again - Tool docstrings are what the agent reads: be precise about preconditions, side effects and the next step. - Never commit credentials, account ids, bundle ids of real apps or screenshots with personal data. - Keep console automation in its own module (`apple_console.py`, `apple_review.py`, `play_console.py`) so breakage stays contained. -- Run before opening a PR: +- Run before opening a PR (the same checks CI runs): ```bash - uv run ruff check src - uv run python -W error -c "import glob; [compile(open(f).read(), f, 'exec') for f in glob.glob('src/shipstores/*.py')]" + uv run --with ruff ruff check src tests --select E9,F + uv run python -m unittest discover -s tests -v + uv run python -W error -c "import pathlib; [compile(p.read_text(), str(p), 'exec') for p in pathlib.Path('src/shipstores').glob('*.py')]" ``` ## Reporting a broken console flow