Protected GitHub Branches causes resource deployment failure with a unexpected InternalServerError
- Dominant language
- No language data
- Stars
- 346
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
If you have a GitHub repo with branch protection on `main` to prevent merges without a PR when you create a new static web app in the azure portal and point it at the main branch you get this error:
```
{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"InternalServerError","message":"There was an unexpected InternalServerError. Please try again later. x-ms-correlation-request-id: xxxxxxxxxxxxxx"}]}
```
The reason this happens makes sense but the error is not helpful and took a while to work out why.
I would expect a clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to GitHub, Settings > Branches > Branch protection rules
2. Add a new rule to prevent commits without a PR
3. Go to Azure Portal Create new Static web app selecting to use the GitHub Repo and the main branch
4. See deployment error
**Expected behavior**
A warning to explain you can not select this branch or an after the fact error
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.