fix(merge): post-merge cleanup after upstream/master backport
- restore server/src/services/github-fetch.ts (re-added by upstream; dev's
history had deleted it via 80f7d827)
- drop stale companySkillUpdateAuthSchema export from shared/index.ts
(upstream removed the validator we took with --theirs)
- regenerate pnpm-lock.yaml for the merged workspace
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1087,7 +1087,6 @@ export {
|
|||||||
companySkillAuditFindingSchema,
|
companySkillAuditFindingSchema,
|
||||||
companySkillAuditResultSchema,
|
companySkillAuditResultSchema,
|
||||||
companySkillImportSchema,
|
companySkillImportSchema,
|
||||||
companySkillUpdateAuthSchema,
|
|
||||||
companySkillProjectScanRequestSchema,
|
companySkillProjectScanRequestSchema,
|
||||||
companySkillProjectScanSkippedSchema,
|
companySkillProjectScanSkippedSchema,
|
||||||
companySkillProjectScanConflictSchema,
|
companySkillProjectScanConflictSchema,
|
||||||
|
|||||||
Generated
+2
@@ -622,6 +622,8 @@ importers:
|
|||||||
specifier: ^5.7.3
|
specifier: ^5.7.3
|
||||||
version: 5.9.3
|
version: 5.9.3
|
||||||
|
|
||||||
|
packages/skills-catalog: {}
|
||||||
|
|
||||||
server:
|
server:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@aws-sdk/client-s3':
|
'@aws-sdk/client-s3':
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
import { unprocessable } from "../errors.js";
|
||||||
|
|
||||||
|
function isGitHubDotCom(hostname: string) {
|
||||||
|
const h = hostname.toLowerCase();
|
||||||
|
return h === "github.com" || h === "www.github.com";
|
||||||
|
}
|
||||||
|
|
||||||
|
export function gitHubApiBase(hostname: string) {
|
||||||
|
return isGitHubDotCom(hostname) ? "https://api.github.com" : `https://${hostname}/api/v3`;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function resolveRawGitHubUrl(hostname: string, owner: string, repo: string, ref: string, filePath: string) {
|
||||||
|
const p = filePath.replace(/^\/+/, "");
|
||||||
|
return isGitHubDotCom(hostname)
|
||||||
|
? `https://raw.githubusercontent.com/${owner}/${repo}/${ref}/${p}`
|
||||||
|
: `https://${hostname}/raw/${owner}/${repo}/${ref}/${p}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function ghFetch(url: string, init?: RequestInit): Promise<Response> {
|
||||||
|
try {
|
||||||
|
return await fetch(url, init);
|
||||||
|
} catch {
|
||||||
|
throw unprocessable(`Could not connect to ${new URL(url).hostname} — ensure the URL points to a GitHub or GitHub Enterprise instance`);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user