MCPcopy Create free account
hub / github.com/remix-run/react-router / releaseExists

Function releaseExists

scripts/utils/github.ts:32–45  ·  view source on GitHub ↗
(tag: string)

Source from the content-addressed store, hash-verified

30 * Check if a GitHub release exists for a tag.
31 */
32export async function releaseExists(tag: string): Promise<boolean> {
33 try {
34 await request("GET /repos/{owner}/{repo}/releases/tags/{tag}", {
35 ...requestOptions(),
36 tag,
37 });
38 return true;
39 } catch (error) {
40 if (error instanceof Error && "status" in error && error.status === 404) {
41 return false;
42 }
43 throw error;
44 }
45}
46
47/**
48 * Creates a GitHub release for a package version.

Callers 1

createReleaseFunction · 0.85

Calls 2

requestOptionsFunction · 0.85
requestFunction · 0.50

Tested by

no test coverage detected