postmanlabs / postman-app-support

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
https://www.postman.com
5.84k stars 839 forks source link

Postman GitHub Integration does not show any repository branches for Postman version v10.18.11 #12397

Closed Purvi-30 closed 11 months ago

Purvi-30 commented 1 year ago

Is there an existing issue for this?

Describe the Issue

It is similar to #8284 however issue is not resolved there. If there is any resolution, can it be share din Postman learning docs?

Steps to reproduce - Postman version V10.18.11

There are 2 ways to reproduce this A) 1. Click on Import

  1. Select GitHub option
  2. Authorize it
  3. Select Organization in the Import from GitHub pop-up (It by default shows your user ID as organization)
  4. Repository - Error No repositories found under selected organization.

B) 1. Click on Home

  1. Select Integrations
  2. Browse all Integrations
  3. Click Backup a Collection option Add Integration button
  4. Enter PAT
  5. Authenticate PAT
  6. Enter Nickname
  7. Choose Workspace
  8. Choose Collection
  9. Choose Repository is disabled as no repositories are being shown to select.

Steps To Reproduce

Steps to reproduce - Postman version V10.18.11

There are 2 ways to reproduce this A) 1. Click on Import

  1. Select GitHub option
  2. Authorize it
  3. Select Organization in the Import from GitHub pop-up (It by default shows your user ID as organization)
  4. Repository - Error No repositories found under selected organization.

B) 1. Click on Home

  1. Select Integrations
  2. Browse all Integrations
  3. Click Backup a Collection option Add Integration button
  4. Enter PAT
  5. Authenticate PAT
  6. Enter Nickname
  7. Choose Workspace
  8. Choose Collection
  9. Choose Repository is disabled as no repositories are being shown to select.

Screenshots or Videos

No response

Operating System

Windows

Postman Version

10.18.11

Postman Platform

Postman App

User Account Type

Signed In User

Additional Context?

No response

piyush-daga commented 1 year ago

While authorizing OAuth or selecting PAT, Github shows which organizations you have access to and it shows the authorize button near organizations that haven't been authorized yet.

Screenshot 2023-10-12 at 3 55 00 PM

Do authorize if you are planning to select the repos from those organizations that are not authorized yet. As only the repos of authorized organisations can be listed.

If above steps doesn't work for you, please attach the screenshots where you are seeing the issue and do share the logs for us to debug further.

Thank you!

Purvi-30 commented 1 year ago

After following steps mentioned in Steps !), I am seeing this option instead of SSO . so it doesn't have an authorize button but a request button. Are both same? image

piyush-daga commented 1 year ago

If the repositories (to be accessed) are in one of the organizations mentioned above, Requesting Access and completing the workflow should solve the listing issue.

piyush-daga commented 1 year ago

Hi @Purvi-30 is this issue resolved for you as well? If yes, I'll go ahead and close this issue.

Purvi-30 commented 1 year ago

If the repositories (to be accessed) are in one of the organizations mentioned above, Requesting Access and completing the workflow should solve the listing issue.

What do you mean by Requesting Access here? As I am clicking Request button, it says access request pending as it will go for approval. So should I click authorize postman labs now and proceed or otherwise also how will I be notified that this access is given to postman? Should I expect an email? AND what do you mean by the workflow here? The process of approval and further authorizing or something else?

piyush-daga commented 1 year ago

Closing this issue, as after requesting access to the required organizations the reporter was able to list the repositories and complete the workflow.

piyush-daga commented 1 year ago

Hi @Purvi-30 detailing the complete workflow where we have to request access from an organization. I have created 2 organizations:

When I start the OAuth workflow from postman. This is the screen I land on:

Screenshot 2023-10-25 at 11 49 24 AM

Since these are not the organizations I want to authenticate against, I'll click on Continue. After that I am presented with this screen:

Screenshot 2023-10-25 at 11 24 16 AM

Notice that for the the-25-th-of-october organization I do not have access, nor can I grant the access myself. So, I click on Request access

Screenshot 2023-10-25 at 11 24 28 AM

After clicking on Request approval from owners

Screenshot 2023-10-25 at 11 24 41 AM

At this point, we can close this screen, as we need to wait for the administrator/owner to provide us relevant access.

After requesting access the administrator/owner of the organization gets an email and can approve postmanlabs access to the organization and its repositories.

Email: Screenshot 2023-10-25 at 11 25 44 AM

Before access is granted:

Screenshot 2023-10-25 at 11 26 16 AM

After access is granted:

Screenshot 2023-10-25 at 11 26 32 AM

Once the access is granted we can start the flow again from postman (re-authenticating with Github). Now when we approach the Authorize Postman screen, this is what it looks like:

Screenshot 2023-10-25 at 11 26 57 AM

As we can see, we now have access to the organization and can Authorize postmanlabs. After authorizaton, we can can close the window and now we can, see the organization listed:

Screenshot 2023-10-25 at 11 28 03 AM

Can list the repositories inside the organization: Screenshot 2023-10-25 at 11 28 49 AM

Let me know if this helps, if there are still some doubts, we can always get on a call to address them.

Thank You.

piyush-daga commented 11 months ago

Closing this issue as reporter has not replied back for 2+ weeks. Feel free to re-open this or file another issue as required.