Skip to main content
Home
Works with
This package works with Cloudflare Workers, DenoIt is unknown whether this package works with Node.js, Bun, Browsers
This package works with Cloudflare Workers
It is unknown whether this package works with Node.js
This package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
JSR Score100%
Downloads144/wk
Published2 years ago (0.0.3)

Load fresh content directly from GitHub

function findBranchInRefs
findBranchInRefs(
refsIterable: Iterable<RefItem>,
branch: string,
): null | Readonly<{ sha: string; }>

Looks up a branch from an iterable of refs. This lets you retrieve the branch’s most up-to-date SHA.

Parameters

refsIterable: Iterable<RefItem>

Usually from calling the result of fetchGitHubRepoRefs()

branch: string

The name of the branch to look up.

Return Type

null | Readonly<{ sha: string; }>

The SHA of the branch, or null if not found.

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@collected/github-fetch

Import symbol

import { findBranchInRefs } from "@collected/github-fetch";
or

Import directly with a jsr specifier

import { findBranchInRefs } from "jsr:@collected/github-fetch";

Add Package

pnpm i jsr:@collected/github-fetch
or (using pnpm 10.8 or older)
pnpm dlx jsr add @collected/github-fetch

Import symbol

import { findBranchInRefs } from "@collected/github-fetch";

Add Package

yarn add jsr:@collected/github-fetch
or (using Yarn 4.8 or older)
yarn dlx jsr add @collected/github-fetch

Import symbol

import { findBranchInRefs } from "@collected/github-fetch";

Add Package

vlt install jsr:@collected/github-fetch

Import symbol

import { findBranchInRefs } from "@collected/github-fetch";

Add Package

npx jsr add @collected/github-fetch

Import symbol

import { findBranchInRefs } from "@collected/github-fetch";

Add Package

bunx jsr add @collected/github-fetch

Import symbol

import { findBranchInRefs } from "@collected/github-fetch";