MCPcopy Index your code
hub / github.com/nodejs/node / optionsToBody

Method optionsToBody

deps/npm/lib/commands/trust/gitlab.js:69–84  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

67 }
68
69 static optionsToBody (options) {
70 const { file, project, environment } = options
71 const trustConfig = {
72 type: 'gitlab',
73 claims: {
74 project_path: project,
75 // this looks off, but this is correct
76 /** The ref path to the top-level pipeline definition, for example, gitlab.example.com/my-group/my-project//.gitlab-ci.yml@refs/heads/main. Introduced in GitLab 16.2. This claim is null unless the pipeline definition is located in the same project. */
77 ci_config_ref_uri: {
78 file,
79 },
80 ...(environment) && { environment },
81 },
82 }
83 return trustConfig
84 }
85
86 // Convert API response body to options
87 static bodyToOptions (body) {

Callers 2

createConfigCommandMethod · 0.45
circleci.jsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected