Git policies
Choose what happens to a verified change — nothing, a commit, a pushed branch or a pull request — per organization, project or task.
git.policy | After verification passes |
|---|---|
NONE | Nothing: changes stay in the working copy |
COMMIT (default) | Commit on the task branch |
COMMIT_AND_PUSH | Commit and push the task branch |
PULL_REQUEST | Commit, push, and open a pull or merge request into the branch the task started from |
Related settings:
| Key | Default | Effect |
|---|---|---|
git.workOnBranch | true | Work on a task branch instead of the current branch |
git.branchPrefix | ao/ | Prefix of task branches |
git.allowForcePush | false | Never enabled implicitly; only an explicit task or project layer may set it |
requireApprovalFor.push | false | Wait for approval before pushing |
Set the project's policy on the project page (Git policy), or in JSON:
Project policy
{ "git": { "policy": "PULL_REQUEST", "branchPrefix": "agent/" }, "requireApprovalFor": { "push": true } }For projects with several repositories, the policy is applied in each repository the task changed; the Git result lists them all.