Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

[$350] Investigate Github organisation invite functionality #414

Closed
jmgasper opened this issue Jul 7, 2021 · 13 comments
Closed

[$350] Investigate Github organisation invite functionality #414

jmgasper opened this issue Jul 7, 2021 · 13 comments

Comments

@jmgasper
Copy link
Collaborator

jmgasper commented Jul 7, 2021

@afrisalyp - After discussing internally with Topcoder, we would like the Git link functionality for Github to also support organisation and team functionality, if possible.

We've investigated that in the past but haven't had much luck: #111 and #294

What we would like to have happen:

If a user hits the link to join a Github team:

  1. Invite the user to the organisation (using a service account / PAT that has access to invite. We can't use the copilot token because the copilot may not be able to invite to the org)
  2. Prompt the user to login to Github and show the OAuth permissions requested
  3. User agrees to OAuth permissions
  4. Get the user's OAuth token
  5. Automatically accept the organisation invite on their behalf
  6. Add the user to the team
  7. Show the success page in the Topcoder-X UI

If a user is already in the organisation, the flow should still work and just add the user to the team.

Links

@jmgasper
Copy link
Collaborator Author

jmgasper commented Jul 7, 2021

Challenge https://www.topcoder.com/challenges/2b810859-ad92-416b-851a-ebf9af293ff6 has been created for this ticket.

This is an automated message for ghostar2020 via Topcoder X

@jmgasper
Copy link
Collaborator Author

jmgasper commented Jul 7, 2021

Challenge https://www.topcoder.com/challenges/2b810859-ad92-416b-851a-ebf9af293ff6 has been assigned to afrisalyp.

This is an automated message for ghostar2020 via Topcoder X

@afrisalyp
Copy link
Collaborator

@jmgasper

Invite the user to the organisation (using a service account / PAT that has access to invite.

We need organisation owner access to invite member to the org.
How do we get the owner PAT?

@jmgasper
Copy link
Collaborator Author

jmgasper commented Jul 7, 2021

@afrisalyp - Can we make that a configurable environment value?

@afrisalyp
Copy link
Collaborator

@jmgasper

Sure. But that will be applicable for one organisation only.

@jmgasper
Copy link
Collaborator Author

jmgasper commented Jul 7, 2021

@afrisalyp - Good point. I'll ask TC.

@afrisalyp
Copy link
Collaborator

@jmgasper

Thanks.

@jmgasper
Copy link
Collaborator Author

jmgasper commented Jul 7, 2021

@afrisalyp - We'll have to add a new DynamoDB table to map PAT with organisation. For now, we can just put something in there, for testing, but a future ticket will have to add a new page for admins to manage this mapping, thanks.

@jmgasper jmgasper changed the title [$250] Investigate Github organisation invite functionality [$350] Investigate Github organisation invite functionality Jul 7, 2021
@afrisalyp
Copy link
Collaborator

@jmgasper

Please make sure to execute npm run create-tables since we have a new table Organisation.

To add Organisation, we can use command:

npm run add-organisation {OrganisationName} {OrganisationOwner} {PersonalAccessToken}

@jmgasper
Copy link
Collaborator Author

Thanks - I'm going to deploy this and mess with it tomorrow.

@jmgasper
Copy link
Collaborator Author

@afrisalyp - Still testing this as well. Just to be clear - {OrganisationOwner} is the Github username, not the Topcoder username, correct?

@afrisalyp
Copy link
Collaborator

@jmgasper

Yes, the github username of the organisation owner (one who generates the PAT).

@jmgasper
Copy link
Collaborator Author

Payment task has been updated: https://www.topcoder.com/challenges/2b810859-ad92-416b-851a-ebf9af293ff6
Payments Complete
Winner: afrisalyp
Copilot: ghostar2020
Challenge 2b810859-ad92-416b-851a-ebf9af293ff6 has been paid and closed.

This is an automated message for ghostar2020 via Topcoder X

@jmgasper jmgasper added this to the Version 1.1 milestone Jul 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants