MCPcopy Index your code
hub / github.com/github/docs / setCategories

Method setCategories

src/rest/scripts/utils/operation.js:56–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

54 }
55
56 setCategories() {
57 const operationId = this.#operation.operationId
58 const xGithub = this.#operation['x-github']
59 // Set category
60 // A temporary override file allows us to override the category defined in
61 // the openapi schema. Without it, we'd have to update several
62 // @documentation_urls in the api code every time we move
63 // an endpoint to a new page.
64 this.category = operationUrls[operationId]
65 ? operationUrls[operationId].category
66 : xGithub.category
67
68 // Set subcategory
69 // A temporary override file allows us to override the subcategory
70 // defined in the openapi schema. Without it, we'd have to update several
71 // @documentation_urls in the api code every time we move
72 // an endpoint to a new page.
73 if (operationUrls[operationId]) {
74 if (operationUrls[operationId].subcategory) {
75 this.subcategory = operationUrls[operationId].subcategory
76 }
77 } else if (xGithub.subcategory) {
78 this.subcategory = xGithub.subcategory
79 }
80 }
81
82 async process() {
83 await Promise.all([

Callers 1

constructorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected