Skip to content

Commit 0fb2e1d

Browse files
Jacob Sifuenteskfcampbell
andauthored
fix: github_repository_collaborators - mark invitation_ids as changed when new user invited (#1825)
* fix: mark invitation_ids as changed if new user is invited * fix: documentation --------- Co-authored-by: Keegan Campbell <[email protected]>
1 parent 43c2887 commit 0fb2e1d

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

github/resource_github_repository_collaborators.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"strconv"
99

1010
"github.com/google/go-github/v53/github"
11+
"github.com/hashicorp/terraform-plugin-sdk/helper/customdiff"
1112
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
1213
)
1314

@@ -75,6 +76,14 @@ func resourceGithubRepositoryCollaborators() *schema.Resource {
7576
Computed: true,
7677
},
7778
},
79+
80+
CustomizeDiff: customdiff.Sequence(
81+
// If there was a new user added to the list of collaborators,
82+
// it's possible a new invitation id will be created in GitHub.
83+
customdiff.ComputedIf("invitation_ids", func(d *schema.ResourceDiff, meta interface{}) bool {
84+
return d.HasChange("user")
85+
}),
86+
),
7887
}
7988
}
8089

website/docs/d/organization_external_identities.markdown

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ If a user is managed by SAML, the `saml_identity` object will contain:
4343

4444
If a user is managed by SCIM, the `scim_identity` object will contain:
4545

46-
- `scim_username` - The member's SCIM Username. (will be empty string if user is
47-
not managed by SCIM)
48-
- `scim_groups` - The member's SCIM Groups
49-
- `scim_family_name` - The member's SCIM Family Name
50-
- `scim_given_name` - The member's SCIM Given Name
46+
- `username` - The member's SCIM Username. (will be empty string if user is not
47+
managed by SCIM)
48+
- `groups` - The member's SCIM Groups
49+
- `family_name` - The member's SCIM Family Name
50+
- `given_name` - The member's SCIM Given Name

0 commit comments

Comments
 (0)