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
*`repository` - (Required) The repository to create the file in.
66
+
-`repository` - (Required) The repository to create the file in.
66
67
67
-
*`file` - (Required) The path of the file to manage.
68
+
-`file` - (Required) The path of the file to manage.
68
69
69
-
*`content` - (Required) The file content.
70
+
-`content` - (Required) The file content.
70
71
71
-
*`branch` - (Optional) Git branch (defaults to the repository's default branch).
72
+
-`branch` - (Optional) Git branch (defaults to the repository's default branch).
72
73
The branch must already exist, it will only be created automatically if 'autocreate_branch' is set true.
73
74
74
-
*`commit_author` - (Optional) Committer author name to use. **NOTE:** GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This maybe useful when a branch protection rule requires signed commits.
75
+
-`commit_author` - (Optional) Committer author name to use. **NOTE:** GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This maybe useful when a branch protection rule requires signed commits.
75
76
76
-
*`commit_email` - (Optional) Committer email address to use. **NOTE:** GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This may be useful when a branch protection rule requires signed commits.
77
+
-`commit_email` - (Optional) Committer email address to use. **NOTE:** GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This may be useful when a branch protection rule requires signed commits.
77
78
78
-
*`commit_message` - (Optional) The commit message when creating, updating or deleting the managed file.
79
+
-`commit_message` - (Optional) The commit message when creating, updating or deleting the managed file.
79
80
80
-
*`overwrite_on_create` - (Optional) Enable overwriting existing files. If set to `true` it will overwrite an existing file with the same name. If set to `false` it will fail if there is an existing file with the same name.
81
+
-`overwrite_on_create` - (Optional) Enable overwriting existing files. If set to `true` it will overwrite an existing file with the same name. If set to `false` it will fail if there is an existing file with the same name.
81
82
82
-
*`autocreate_branch` - (Optional) Automatically create the branch if it could not be found. Defaults to false. Subsequent reads if the branch is deleted will occur from 'autocreate_branch_source_branch'.
83
+
-`autocreate_branch` - (Optional) Automatically create the branch if it could not be found. Defaults to false. Subsequent reads if the branch is deleted will occur from 'autocreate_branch_source_branch'.
83
84
84
-
*`autocreate_branch_source_branch` - (Optional) The branch name to start from, if 'autocreate_branch' is set. Defaults to 'main'.
85
+
-`autocreate_branch_source_branch` - (Optional) The branch name to start from, if 'autocreate_branch' is set. Defaults to 'main'.
85
86
86
-
*`autocreate_branch_source_sha` - (Optional) The commit hash to start from, if 'autocreate_branch' is set. Defaults to the tip of 'autocreate_branch_source_branch'. If provided, 'autocreate_branch_source_branch' is ignored.
87
+
-`autocreate_branch_source_sha` - (Optional) The commit hash to start from, if 'autocreate_branch' is set. Defaults to the tip of 'autocreate_branch_source_branch'. If provided, 'autocreate_branch_source_branch' is ignored.
87
88
88
89
## Attributes Reference
89
90
90
91
The following additional attributes are exported:
91
92
92
-
*`commit_sha` - The SHA of the commit that modified the file.
93
+
-`commit_sha` - The SHA of the commit that modified the file.
93
94
94
-
*`sha` - The SHA blob of the file.
95
-
96
-
*`ref` - The name of the commit/branch/tag.
95
+
-`sha` - The SHA blob of the file.
97
96
97
+
-`ref` - The name of the commit/branch/tag.
98
98
99
99
## Import
100
100
101
-
Repository files can be imported using a combination of the `repo`and `file`, e.g.
101
+
Repository files can be imported using a combination of the `repo`, `file`and `branch`, e.g.
0 commit comments