docs(workflow): say repo.commit never runs the checkout's git hooks
Refs #1792
This commit is contained in:
2 files changed
+10
-1
No files matched your search
@@ -156,6 +156,15 @@ _needs a repository._
|
||||
| `push` | bool | Push the branch after committing. |
|
||||
| `reference` | `Fixes` \| `Implements` \| `Refs` | How the commit links to the task issue. |
|
||||
|
||||
Hooks never run. The commit is created by go-git, which ignores `.git/hooks`
|
||||
and `core.hooksPath`, and the agent never runs git, so `pre-commit`,
|
||||
`commit-msg` and `prepare-commit-msg` in the checkout are inert files. A
|
||||
repository whose rules live only in a hook — a formatter, a secret scanner,
|
||||
commitlint, a DCO trailer — gets a commit that does not satisfy them: the run
|
||||
reports success and the pull request fails the check afterwards. Put the same
|
||||
commands in `command.run` or the repository gate, which both run in the task
|
||||
container before this step.
|
||||
|
||||
### `repo.open-pr`
|
||||
|
||||
_needs a repository._
|
||||
|
||||
@@ -113,7 +113,7 @@ func runRepoTooling(ctx context.Context, tc *TaskContext) error {
|
||||
}
|
||||
|
||||
type repoCommitSettings struct {
|
||||
Message string `yaml:"message" doc:"The commit message."`
|
||||
Message string `yaml:"message" doc:"The commit message. Hooks in the checkout never run, so commit-message policy (commitlint, DCO) is not applied."`
|
||||
// Reference is the verb that links the commit to the task's issue
|
||||
// ("Fixes", "Implements", "Refs"); empty links nothing.
|
||||
Reference string `yaml:"reference" enum:"Fixes,Implements,Refs" doc:"How the commit links to the task issue."`
|
||||
|
||||
Reference in new issue
Block a user