Azure / Azure/static-web-apps

Search OrgRepositories with filter in API

Open
#1,098 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
346
Forks
67
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Customer using Azure Portal to create a Static Web App , when trying to select a repository from organization, the backend keep calling GitHub API to fetch the repositories and reached the limits from GitHub

Steps to repro (if applicable)
Only reproduceable from customer side.
But we coulf follow below steps to monitor how the API's work on backgraound.
Steps:
1. Navigate to Azure Portal
2. Create a Static Web App
3. Select a Organization
4. It should automatically load Repository
5. Use Chrome Developer Tools and check Network tab, you should see the APIs
![image](https://user-images.githubusercontent.com/2646632/223965644-1a2bcfa8-14dc-489b-944c-32ab1d2446e0.png)

6. For Customer, the calling api is getOrgRepositories, we could see, if so many records, the API will use page parameter to keep call backend
For customer ExxonMobil we can see the page is called from 1 to 301 , and many requests hit the limits from GitHub

![image](https://user-images.githubusercontent.com/2646632/223966065-6b2f89f3-210e-400f-b194-33d4405dabd5.png)

The detailed error is following

![image](https://user-images.githubusercontent.com/2646632/223965775-2d7edb0e-42c6-4bac-95f6-17a0cf272b16.png)

{

"documentation_url":"https://docs.github.com/en/free-pro-team@latest/rest/overview/resources-in-the-rest-api#secondary-rate-limits",

"message":"You have exceeded a secondary rate limit. Please wait a few minutes before you try again."

}

**Describe the solution you'd like**
A clear and concise description of what you want to happen.
Cx mentioned, the Static Web App calling GitHub API should able to receive the repository,
If the Github API is designed that way, it should be some product enhancement on Static Web App side to change the way they call the APIs
If the search repository with filter and do not return all the reposiroty firstly should able to mitigate the issue.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
N/A

**Additional context**
Add any other context or screenshots about the feature request here.
N/A

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.