MCPcopy Create free account
hub / github.com/Schroedinger-Hat/tanglecat / getRequiredFieldsForType

Function getRequiredFieldsForType

app/src/types/github.ts:188–210  ·  view source on GitHub ↗
(type: GitHubVerificationType)

Source from the content-addressed store, hash-verified

186
187// Helper function to get required fields for a verification type
188export function getRequiredFieldsForType(type: GitHubVerificationType): string[] {
189 const baseFields = ["type", "github_username"]
190
191 switch (type) {
192 case "org_follow":
193 return [...baseFields, "organization"]
194
195 case "user_follow":
196 return [...baseFields, "user_to_follow"]
197
198 case "repo_star":
199 return [...baseFields, "organization", "repository"]
200
201 case "repo_watch":
202 return [...baseFields, "repository"]
203
204 case "repo_contribution":
205 return [...baseFields, "repository", "contribution_type"]
206
207 default:
208 return baseFields
209 }
210}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected