Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@changesets/get-github-info

Package Overview
Dependencies
Maintainers
3
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@changesets/get-github-info

Get the GitHub username and PR number from a commit. Intended for use with changesets.

  • 0.4.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
291K
decreased by-8.34%
Maintainers
3
Weekly downloads
 
Created

What is @changesets/get-github-info?

@changesets/get-github-info is an npm package that provides utilities for fetching information from GitHub, such as commit details, pull request information, and user data. It is particularly useful for projects that need to integrate GitHub data into their workflows, such as generating changelogs or automating release notes.

What are @changesets/get-github-info's main functionalities?

Get Commit Info

This feature allows you to fetch detailed information about a specific commit in a GitHub repository. The `getInfo` function takes an object with the repository name and commit SHA, and returns information such as the commit message, author, and associated pull requests.

const { getInfo } = require('@changesets/get-github-info');

async function getCommitInfo(commitSha) {
  const info = await getInfo({ repo: 'owner/repo', commit: commitSha });
  console.log(info);
}

getCommitInfo('commitSha');

Get Pull Request Info

This feature allows you to fetch detailed information about a specific pull request in a GitHub repository. The `getInfo` function takes an object with the repository name and pull request number, and returns information such as the title, author, and associated commits.

const { getInfo } = require('@changesets/get-github-info');

async function getPullRequestInfo(prNumber) {
  const info = await getInfo({ repo: 'owner/repo', pull: prNumber });
  console.log(info);
}

getPullRequestInfo(123);

Get User Info

This feature allows you to fetch detailed information about a specific GitHub user. The `getUserInfo` function takes a username and returns information such as the user's name, bio, and public repositories.

const { getUserInfo } = require('@changesets/get-github-info');

async function getUserInfo(username) {
  const info = await getUserInfo(username);
  console.log(info);
}

getUserInfo('username');

Other packages similar to @changesets/get-github-info

FAQs

Package last updated on 24 Jan 2020

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc