![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
memfs-or-file-map-to-github-branch
Advanced tools
Readme
e.g. this:
const settings = {
owner: "danger",
repo: "danger-js",
fullBranchReference: "heads/a_new_branch",
message: "Adds some new stuff"
}
await filepathContentsMapToUpdateGitHubBranch(api, { README: "### My README" }, settings)
Full Reference:
import * as GitHub from "@octokit/rest"
interface RepoSettings {
/** The danger in danger/danger-js */
owner: string
/** The danger-js in danger/danger-js */
repo: string
/** The ref in the URL must `heads/branch`, not just `branch`. */
fullBranchReference: string
/** Message for the commit */
message: string
}
interface FileMap {
[filename: string]: string
}
/**
* Creates a bunch of blobs, wraps them in a tree, updates a reference from a memfs volume
*/
export declare const memFSToGitHubCommits: (api: GitHub, volume: MemFSVolume, settings: RepoSettings) => Promise<void>
/**
* Creates a bunch of blobs, wraps them in a tree, updates a reference from a map of files to contents
*/
export declare const filepathContentsMapToUpdateGitHubBranch: (
api: GitHub,
fileMap: FileMap,
settings: RepoSettings
) => Promise<void>
/**
* A Git tree object creates the hierarchy between files in a Git repository. To create a tree
* we need to make a list of blobs (which represent changes to the FS)
*
* https://developer.github.com/v3/git/trees/
*/
export declare const createTree: (
api: GitHub,
settings: RepoSettings
) => (fileMap: FileMap) => Promise<GitHub.CreateTreeResponse>
/**
* A Git commit is a snapshot of the hierarchy (Git tree) and the contents of the files (Git blob) in a Git repository
*
* https://developer.github.com/v3/git/commits/
*/
export declare const createACommit: (
api: GitHub,
settings: RepoSettings
) => (treeSha: string, parentSha: string) => Promise<GitHub.Response<GitHub.CreateCommitResponse>>
/**
* A Git reference (git ref) is just a file that contains a Git commit SHA-1 hash. When referring
* to a Git commit, you can use the Git reference, which is an easy-to-remember name, rather than
* the hash. The Git reference can be rewritten to point to a new commit.
*
* https://developer.github.com/v3/git/refs/#git-references
*/
export declare const updateReference: (
api: GitHub,
settings: RepoSettings
) => (newSha: string, parentSha: string) => Promise<GitHub.Response<GitHub.UpdateReferenceResponse>>
export {}
FAQs
Handles making a GitHub branch with the commits from a memfs instance or a file map
We found that memfs-or-file-map-to-github-branch demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.