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
* Fix missing Set of Computed field in Org Repo Role
Signed-off-by: Timo Sand <[email protected]>
* Ensure tests are configured correctly
Signed-off-by: Timo Sand <[email protected]>
* Add validation of `permissions` values
Signed-off-by: Timo Sand <[email protected]>
* Update to use new SDK methods
Signed-off-by: Timo Sand <[email protected]>
* Update DS to use new SDK methods
Signed-off-by: Timo Sand <[email protected]>
* Remove unnecessary `d.Set("role_id")`
Signed-off-by: Timo Sand <[email protected]>
---------
Signed-off-by: Timo Sand <[email protected]>
tflog.Warn(ctx, "GitHub organization repository role not found, removing from state", map[string]any{
117
+
"orgName": orgName,
118
+
"roleId": roleId,
119
+
})
120
+
d.SetId("")
121
+
returnnil
122
+
}
125
123
}
126
-
}
127
-
128
-
ifrole==nil {
129
-
log.Printf("[WARN] GitHub organization repository role (%s/%d) not found, removing from state", orgName, roleId)
130
-
d.SetId("")
131
-
returnnil
124
+
returndiag.FromErr(err)
132
125
}
133
126
134
127
iferr=d.Set("role_id", role.GetID()); err!=nil {
@@ -206,3 +199,75 @@ func resourceGithubOrganizationRepositoryRoleDelete(ctx context.Context, d *sche
206
199
207
200
returnnil
208
201
}
202
+
203
+
// Snapshot of the response to https://docs.github.com/en/enterprise-cloud@latest/rest/orgs/custom-roles?apiVersion=2022-11-28#list-repository-fine-grained-permissions-for-an-organization
0 commit comments