Skip to content

Commit

Permalink
Add RawGithubReadInstance wrapper for improved UX (#3250)
Browse files Browse the repository at this point in the history
  • Loading branch information
blueridger committed Nov 2, 2021
1 parent 584d45f commit 2c91304
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/sourcecred/src/api/instance/readInstance.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ import * as Combo from "../../util/combo";

export const getNetworkReadInstance = (base: string): ReadInstance =>
new ReadInstance(new NetworkStorage(base));
export const getRawGithubReadInstance = (
organization: string,
repository: string,
branch: string
): ReadInstance =>
new ReadInstance(
new NetworkStorage(
`https://raw.githubusercontent.com/${organization}/${repository}/${branch}/`
)
);
export const getOriginReadInstance = (base: string): ReadInstance =>
new ReadInstance(new OriginStorage(base));

Expand Down

0 comments on commit 2c91304

Please sign in to comment.