diff --git a/providers/github/resources/github_repo.go b/providers/github/resources/github_repo.go index 53da3d16eb..a57f30774a 100644 --- a/providers/github/resources/github_repo.go +++ b/providers/github/resources/github_repo.go @@ -471,22 +471,7 @@ func (g *mqlGithubBranch) protectionRules() (*mqlGithubBranchprotection, error) if err != nil { // NOTE it is possible that the branch does not have any protection rules, therefore we don't return an error if strings.Contains(err.Error(), "Not Found") { - res, err := CreateResource(g.MqlRuntime, "github.branchprotection", map[string]*llx.RawData{ - "id": llx.StringData(repoName + "/" + branchName), - "requiredStatusChecks": llx.MapData(map[string]interface{}{}, types.Any), - "requiredPullRequestReviews": llx.MapData(map[string]interface{}{}, types.Any), - "enforceAdmins": llx.MapData(map[string]interface{}{}, types.Any), - "restrictions": llx.MapData(map[string]interface{}{}, types.Any), - "requireLinearHistory": llx.MapData(map[string]interface{}{}, types.Any), - "allowForcePushes": llx.MapData(map[string]interface{}{}, types.Any), - "allowDeletions": llx.MapData(map[string]interface{}{}, types.Any), - "requiredConversationResolution": llx.MapData(map[string]interface{}{}, types.Any), - "requiredSignatures": llx.BoolData(false), - }) - if err != nil { - return nil, err - } - return res.(*mqlGithubBranchprotection), nil + return nil, nil } // TODO: figure out if the client has the permission to fetch the protection rules return nil, err