coopnorge / provider-github

Apache License 2.0
23 stars 11 forks source link

Not able to send GitHub usr invitation #76

Closed A660988 closed 2 weeks ago

A660988 commented 3 weeks ago

I am using upbound coopnorge/provider-github@v0.10.0 provider and fine-grined token.

created provider-config and secret. Below is my claim for user invitation: apiVersion: user.github.upbound.io/v1alpha1 kind: Membership metadata: annotations: meta.upbound.io/example-id: user/v1alpha1/membership labels: testing.upbound.io/example-name: membership_for_some_user name: membership-for-some-user spec: forProvider: role: member username: user-github-id providerConfigRef: name: default

After claiming it says external resource created. But invitation does not go to user

AtzeDeVries commented 3 weeks ago

can you post some related logs of the provider and the status field of the resource?

A660988 commented 3 weeks ago

Thanks for reply

I have fetched the object and it is giving me error

I have used fine Fine-grained access token. I check document and it says to use GitHub App user access tokens.

So I am going to try with GitHub App user access tokens.

A660988 commented 3 weeks ago

log image

AtzeDeVries commented 3 weeks ago

are you in a github organization? If so, are you sure you are pointing (in the providerconfig) to the right one? This resource only works in organizations.

Ref: https://registry.terraform.io/providers/integrations/github/latest/docs/resources/membership

A660988 commented 2 weeks ago

Thanks for your help. I was not able to invite users due to 2 things:

  1. Did not use the GitHub app user access token
  2. Did not use valid github provider config.

I modified github providerConfig and used GitHub app access token instead of PAT and it worked.