MCPcopy Create free account
hub / github.com/github/gh-aw / ShouldGeneratePRCheckoutStep

Function ShouldGeneratePRCheckoutStep

pkg/workflow/pr.go:14–20  ·  view source on GitHub ↗

ShouldGeneratePRCheckoutStep returns true if the checkout-pr step should be generated based on the workflow permissions. The step requires contents read access.

(data *WorkflowData)

Source from the content-addressed store, hash-verified

12// ShouldGeneratePRCheckoutStep returns true if the checkout-pr step should be generated
13// based on the workflow permissions. The step requires contents read access.
14func ShouldGeneratePRCheckoutStep(data *WorkflowData) bool {
15 if data.CachedPermissions != nil {
16 return data.CachedPermissions.HasContentsReadAccess()
17 }
18 permParser := NewPermissionsParser(data.Permissions)
19 return permParser.HasContentsReadAccess()
20}
21
22// generateSaveBaseGitHubFoldersStep generates step strings (for the activation job) that
23// snapshot agent config folders and root instruction files from the workspace into

Calls 3

HasContentsReadAccessMethod · 0.95
NewPermissionsParserFunction · 0.85
HasContentsReadAccessMethod · 0.45

Tested by 1