You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
preserve-branch-name: true # omit random salt suffix from branch name (default: false)
33
34
excluded-files: # files to omit from the patch entirely
34
35
- "**/*.lock"
@@ -57,6 +58,8 @@ The `preserve-branch-name` field, when set to `true`, omits the random hex salt
57
58
58
59
The `draft` field is a **configuration policy**, not a default. Whatever value is set in the workflow frontmatter is always used — the agent cannot override it at runtime.
59
60
61
+
By default, when a workflow is triggered from an issue, the `create-pull-request` handler automatically appends `- Fixes #N` to the PR description if no closing keyword is already present. This causes GitHub to auto-close the triggering issue when the PR is merged. Set `auto-close-issue: false` to opt out of this behavior — useful for partial-work PRs, multi-PR workflows, or any case where the PR should reference but not close the issue.
62
+
60
63
PR creation may fail if "Allow GitHub Actions to create and approve pull requests" is disabled in Organization Settings. By default (`fallback-as-issue: true`), fallback creates an issue with branch link. Set `fallback-as-issue: false` to disable fallback.
61
64
62
65
When `create-pull-request` is configured, git commands (`checkout`, `branch`, `switch`, `add`, `rm`, `commit`, `merge`) are automatically enabled.
Copy file name to clipboardExpand all lines: pkg/parser/schemas/main_workflow_schema.json
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -5830,6 +5830,15 @@
5830
5830
"description": "Controls the fallback behavior when pull request creation fails. When true (default), an issue is created as a fallback with the patch content. When false, no issue is created and the workflow fails with an error. Setting to false also removes the issues:write permission requirement.",
5831
5831
"default": true
5832
5832
},
5833
+
"auto-close-issue": {
5834
+
"allOf": [
5835
+
{
5836
+
"$ref": "#/$defs/templatable_boolean"
5837
+
}
5838
+
],
5839
+
"description": "When true (default), automatically appends a closing keyword (\"Fixes #N\") to the PR description when the workflow is triggered from an issue and no closing keyword is already present. This causes GitHub to auto-close the triggering issue when the PR is merged. Set to false to prevent this behavior, e.g., for partial-work PRs or multi-PR workflows. Accepts a boolean or a GitHub Actions expression.",
5840
+
"default": true
5841
+
},
5833
5842
"github-token-for-extra-empty-commit": {
5834
5843
"type": "string",
5835
5844
"description": "Token used to push an empty commit after PR creation to trigger CI events. Works around the GITHUB_TOKEN limitation where pushes don't trigger workflow runs. Defaults to the magic secret GH_AW_CI_TRIGGER_TOKEN if set in the repository. Use a secret expression (e.g. '${{ secrets.CI_TOKEN }}') for a custom token, or 'app' for GitHub App auth."
Copy file name to clipboardExpand all lines: pkg/workflow/create_pull_request.go
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,7 @@ type CreatePullRequestsConfig struct {
31
31
BaseBranchstring`yaml:"base-branch,omitempty"`// Base branch for the pull request (defaults to github.ref_name if not specified)
32
32
Footer*string`yaml:"footer,omitempty"`// Controls whether AI-generated footer is added. When false, visible footer is omitted but XML markers are kept.
33
33
FallbackAsIssue*bool`yaml:"fallback-as-issue,omitempty"`// When true (default), creates an issue if PR creation fails. When false, no fallback occurs and issues: write permission is not requested.
34
+
AutoCloseIssue*string`yaml:"auto-close-issue,omitempty"`// Auto-add "Fixes #N" closing keyword when triggered from an issue (default: true). Set to false to prevent auto-closing the triggering issue on PR merge. Accepts a boolean or a GitHub Actions expression.
34
35
GithubTokenForExtraEmptyCommitstring`yaml:"github-token-for-extra-empty-commit,omitempty"`// Token used to push an empty commit to trigger CI events. Use a PAT or "app" for GitHub App auth.
35
36
ManifestFilesPolicy*string`yaml:"protected-files,omitempty"`// Controls protected-file protection: "blocked" (default) hard-blocks, "allowed" permits all changes, "fallback-to-issue" pushes the branch but creates a review issue.
36
37
AllowedFiles []string`yaml:"allowed-files,omitempty"`// Strict allowlist of glob patterns for files eligible for create. Checked independently of protected-files; both checks must pass.
0 commit comments