Skip to content

Commit

Permalink
feat: better workflow permissions actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-timothy-albert committed Mar 14, 2024
1 parent 12a7ea0 commit 6f2f38a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,11 @@ You have exceeded the limit of one free generated SDK. Please reach out to the S
MaintainerCanModify: github.Bool(true),
})
if err != nil {
return fmt.Errorf("failed to create PR: %w", err)
messageSuffix := ""
if strings.Contains(err.Error(), "GitHub Actions is not permitted to create or approve pull requests") {
messageSuffix += "\nNavigate to Settings > Actions > Workflow permissions and ensure that allow GitHub Actions to create and approve pull requests is checked. For more information see https://www.speakeasyapi.dev/docs/advanced-setup/github-setup."
}
return fmt.Errorf("failed to create PR: %w%s", err, messageSuffix)
}
}

Expand Down

0 comments on commit 6f2f38a

Please sign in to comment.