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
Copy file name to clipboardExpand all lines: docs/resources/repository_collaborators.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,9 +25,7 @@ Teams will be added to the repository on apply, and removed if removed from the
25
25
26
26
## Personal Repositories
27
27
28
-
For personal repositories, collaborators can only be granted [write](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/repository-access-and-collaboration/permission-levels-for-a-personal-account-repository#collaborator-access-for-a-repository-owned-by-a-personal-account) permission.
29
-
30
-
!> If the repository owner is not added as a collaborator with admin access, the provider will churn this resource on every plan/apply. To prevent this, ensure that the repository owner is included in the set of user collaborators.
28
+
For personal repositories, non-owner collaborators can only be granted [write](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/repository-access-and-collaboration/permission-levels-for-a-personal-account-repository#collaborator-access-for-a-repository-owned-by-a-personal-account) permission. Owners will be ignored unless they are explicitly added, in which case they must be granted `admin` permission.
-`team_id` (String) ID or slug of the team to ignore.
98
97
99
-
100
98
<aid="nestedblock--team"></a>
99
+
101
100
### Nested Schema for `team`
102
101
103
102
Required:
@@ -108,8 +107,8 @@ Optional:
108
107
109
108
-`permission` (String) Permission to grant to the team. Must be one of `pull`, `triage`, `push`, `maintain`, `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organization. Defaults to `push`.
Description: "Users to grant access to the repository.",
131
+
Elem: &schema.Resource{
132
+
Schema: map[string]*schema.Schema{
133
+
"username": {
134
+
Type: schema.TypeString,
135
+
Description: "Login for the user to add to the repository as a collaborator.",
136
+
Required: true,
137
+
DiffSuppressFunc: caseInsensitive(),
138
+
},
139
+
"permission": {
140
+
Type: schema.TypeString,
141
+
Description: "Permission to grant to the user. Must be one of `pull`, `triage`, `push`, `maintain`, `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organization. Must be `push` for personal repositories. Defaults to `push`.",
142
+
Optional: true,
143
+
Default: "push",
144
+
},
145
+
},
146
+
},
147
+
},
148
+
"team": {
149
+
Type: schema.TypeSet,
150
+
Optional: true,
151
+
Description: "Teams to grant access to the repository.",
152
+
Elem: &schema.Resource{
153
+
Schema: map[string]*schema.Schema{
154
+
"team_id": {
155
+
Type: schema.TypeString,
156
+
Description: "ID or slug of the team to add to the repository as a collaborator.",
157
+
Required: true,
158
+
},
159
+
"permission": {
160
+
Type: schema.TypeString,
161
+
Description: "Permission to grant to the team. Must be one of `pull`, `triage`, `push`, `maintain`, `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organization. Defaults to `push`.",
162
+
Optional: true,
163
+
Default: "push",
164
+
},
165
+
},
166
+
},
167
+
},
168
+
"invitation_ids": {
169
+
Type: schema.TypeMap,
170
+
Description: "Map of usernames to invitation ID for users that haven't yet accepted their invitation to become a collaborator. This is only set on read, and is used internally to track pending invitations for users that aren't yet collaborators.",
171
+
Elem: &schema.Schema{
172
+
Type: schema.TypeString,
173
+
},
174
+
Computed: true,
175
+
},
176
+
"ignore_team": {
177
+
Type: schema.TypeSet,
178
+
Optional: true,
179
+
Description: "Teams to ignore when managing repository collaborators.",
0 commit comments