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

Function parseRepoSlug

actions/setup/js/add_workflow_run_comment.cjs:108–121  ·  view source on GitHub ↗

* @param {unknown} value * @returns {RepoRef | null}

(value)

Source from the content-addressed store, hash-verified

106 * @returns {RepoRef | null}
107 */
108function parseRepoSlug(value) {
109 if (typeof value !== "string") {
110 return null;
111 }
112 const trimmed = value.trim();
113 if (!trimmed) {
114 return null;
115 }
116 const parts = trimmed.split("/");
117 if (parts.length !== 2 || !parts[0] || !parts[1]) {
118 return null;
119 }
120 return { owner: parts[0], repo: parts[1] };
121}
122
123/**
124 * Read aw_context from workflow_dispatch or repository_dispatch payloads.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected