Skip to content

Commit a1f94b5

Browse files
peaceiriscodex
andcommitted
docs: add repository guidelines
Document repository structure, development commands, testing expectations, and release-only handling for generated lib/index.js. Co-Authored-By: Codex <codex@openai.com>
1 parent 4b09552 commit a1f94b5

1 file changed

Lines changed: 59 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Repository Guidelines
2+
3+
## Agent-Specific Instructions
4+
5+
Use English for repository-facing content, including documentation, code comments, commit messages, and pull request title/body/comments, unless the task explicitly requires another language.
6+
7+
## Project Structure & Module Organization
8+
9+
This is a TypeScript GitHub Action for publishing GitHub Pages. Source files live
10+
in `src/`; `src/index.ts` is the entry point and delegates to modules such as
11+
`get-inputs.ts`, `git-utils.ts`, and `set-tokens.ts`. Tests live in `__tests__/`,
12+
with static fixtures under `__tests__/fixtures/`. Documentation is in `README.md`
13+
and `CHANGELOG.md`; screenshots and docs assets are in `images/`. `action.yml`
14+
defines action inputs and points to generated `lib/index.js`.
15+
16+
## Build, Test, and Development Commands
17+
18+
Use Node `>=20.11.0` and npm `>=10.2.4`.
19+
20+
- `npm ci`: install dependencies from `package-lock.json`.
21+
- `npm run all`: run format, lint, and Jest tests.
22+
- `npm run build`: bundle `src/index.ts` into `lib/` with `ncc`.
23+
- `npm run tsc`: run the TypeScript compiler checks.
24+
- `npm test`: run Jest with coverage and verbose output.
25+
- `npm run lint` / `npm run lint:fix`: check or fix ESLint issues.
26+
- `npm run format:check` / `npm run format`: check or apply Prettier formatting.
27+
28+
When changing `src/`, build locally if needed for verification, but do not commit
29+
`lib/index.js` in normal changes. Generated `lib/index.js` is placed on `main`
30+
only during releases.
31+
32+
## Coding Style & Naming Conventions
33+
34+
Write strict TypeScript and keep module boundaries small. Use 2-space
35+
indentation, semicolons, single quotes, no trailing commas, and a 100-character
36+
print width, matching `.prettierrc.json`. Test files use `*.test.ts`. Prefer
37+
names that match action inputs where relevant, for example `publish_branch`.
38+
39+
## Testing Guidelines
40+
41+
Jest with `ts-jest` is the test framework. Add focused tests in `__tests__/` near
42+
related behavior, and place reusable filesystem samples in `__tests__/fixtures/`.
43+
Run `npm test` for coverage, and use `npm run all` before opening a pull request
44+
that touches TypeScript source or tests.
45+
46+
## Commit & Pull Request Guidelines
47+
48+
Recent history follows conventional commit prefixes such as `fix(deps):`,
49+
`chore(deps):`, `docs:`, and `ci:`. Use a concise imperative subject and include
50+
the scope when it clarifies the affected area. Pull requests should describe the
51+
change, link related issues, list verification commands, and include screenshots
52+
only for documentation image changes. Mention any action input or behavior change
53+
explicitly so reviewers can assess compatibility.
54+
55+
## Security & Configuration Tips
56+
57+
Do not commit tokens, private keys, or generated secrets. Treat inputs such as
58+
`deploy_key`, `github_token`, and `personal_token` as sensitive, and keep examples
59+
limited to placeholder values.

0 commit comments

Comments
 (0)