0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-06-05 09:26:35 +02:00
gitea/AGENTS.md
TheFox0x7 9155a81b9d
docs: mark openapi3 as autogenerated in attributes (#37963)
Change from Co-Authored by trailer to Assisted-By and explicitly forbid
LLMs from signing off on commits.

---------

Signed-off-by: bircni <bircni@icloud.com>
Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: bircni <bircni@icloud.com>
Co-authored-by: silverwind <me@silverwind.io>
2026-06-01 16:22:17 +00:00

1.6 KiB

  • Use make help to find available development targets
  • Run make fmt to format .go files, and run make lint-go to lint them
  • Run make lint-js to lint .ts files
  • Run make tidy after any go.mod changes
  • Run single go tests with go test -run '^TestName$' ./modulepath/
  • Run single js test files with pnpm exec vitest <path-filter>
  • Run single playwright e2e test files with GITEA_TEST_E2E_FLAGS='<filepath>' make test-e2e
  • Add the current year into the copyright header of new .go files
  • Ensure no trailing whitespace in edited files
  • Use Conventional Commits for commit messages and PR titles, e.g. type(scope): subject; ! before the colon if breaking. Use test type for test-only changes.
  • Never force-push, amend, or squash unless asked. Use new commits and normal push for pull request updates
  • Preserve existing code comments, do not remove or rewrite comments that are still relevant
  • Keep comments short, prefer same-line, explain why, never narrate code
  • Prefer unit tests over integration tests when logic is testable in isolation
  • Aim for sub-2s local runtime for integration and e2e tests
  • In TypeScript, use ! (non-null assertion) instead of ?./?? when a value is known to always exist
  • For CSS layout, prefer flex-* helpers over per-child tw-ml-* / tw-mr-* margins; fall back to tw-* utilities when specificity requires !important
  • Include authorship attribution in issue and pull request comments
  • Always add Assisted-By trailers to commit messages in format Assisted-by: AGENT_NAME:MODEL_VERSION
  • Never add Co-Authored-By Signed-off-by trailer to commit messages. Sign off must be done by a human.