docs: update CLAUDE.md, README, and .env.template for write test requirements

Document RUN_WRITE_TESTS and TEST_PR_ID env vars across all three files.
Fix .env.template to keep write-test vars commented out. Reference .env.template
as the starting point for local development setup.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-20 23:35:05 +02:00
parent 5d911d91a7
commit 8a410c7fd7
3 changed files with 17 additions and 10 deletions

View File

@@ -225,13 +225,17 @@ Response:
### Running Locally
For development, you can use a `.env` file instead of configuring credentials in the MCP client:
For development, you can use a `.env` file instead of configuring credentials in the MCP client. Copy `.env.template` to `.env` and fill in your values:
```env
BITBUCKET_MCP_EMAIL=your_email@example.com
BITBUCKET_MCP_TOKEN=your_api_token
DEFAULT_WORKSPACE=my-workspace
DEFAULT_REPO=my-repo
# Only needed when running write integration tests (see Testing below)
# RUN_WRITE_TESTS=true
# TEST_PR_ID=123
```
```bash
@@ -261,14 +265,14 @@ npx tsc --noEmit
npm run test:coverage
```
**Write operation tests** (approve/unapprove, comments, tasks) are disabled by default. To enable them, set two variables in your `.env`:
**Write operation tests** (approve/unapprove, comments, tasks) are disabled by default and require two additional variables in your `.env`:
```env
RUN_WRITE_TESTS=true
TEST_PR_ID=123 # ID of a PR you own and can safely modify
```
| Variable | Description |
|----------|-------------|
| `RUN_WRITE_TESTS=true` | Opt in to running write tests |
| `TEST_PR_ID=<id>` | ID of a PR you own and can safely modify |
`TEST_PR_ID` is required — write tests will not fall back to a random PR. If it is not set, each write test is skipped with a warning. This prevents accidental modifications to production PRs.
`TEST_PR_ID` is mandatory — write tests will never fall back to a random PR from the repository. If it is not set, each write test is skipped with a warning. This prevents accidental modifications to PRs you don't intend to touch.
### Project Structure