🦋 A way to manage your versioning and changelogs with a focus on monorepos
Installations
npm install @changesets/get-github-info
Developer Guide
Typescript
Yes
Module System
CommonJS, ESM
Node Version
16.20.2
NPM Version
8.19.4
Score
85.7
Supply Chain
93.1
Quality
80.6
Maintenance
100
Vulnerability
100
License
Releases
@changesets/cli@2.27.12
Updated on Jan 24, 2025
@changesets/apply-release-plan@7.0.8
Updated on Jan 24, 2025
@changesets/get-release-plan@4.0.6
Updated on Dec 18, 2024
@changesets/cli@2.27.11
Updated on Dec 18, 2024
@changesets/config@3.0.5
Updated on Dec 18, 2024
@changesets/apply-release-plan@7.0.7
Updated on Dec 18, 2024
Contributors
Languages
TypeScript (99.85%)
JavaScript (0.15%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
changesets
Download Statistics
Total Downloads
21,428,066
Last Day
57,336
Last Week
298,763
Last Month
1,295,789
Last Year
11,777,530
GitHub Statistics
MIT License
9,434 Stars
606 Commits
597 Forks
35 Watchers
47 Branches
147 Contributors
Updated on Feb 13, 2025
Package Meta Information
Latest Version
0.6.0
Package Id
@changesets/get-github-info@0.6.0
Unpacked Size
46.97 kB
Size
9.04 kB
File Count
13
NPM Version
8.19.4
Node Version
16.20.2
Published on
Nov 28, 2023
Total Downloads
Cumulative downloads
Total Downloads
21,428,066
Last Day
3.4%
57,336
Compared to previous day
Last Week
-0.9%
298,763
Compared to previous week
Last Month
54.5%
1,295,789
Compared to previous month
Last Year
107.1%
11,777,530
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
2
@changesets/get-github-info
Get the GitHub username and PR number from a commit. Intended for use with changesets.
Getting Started
Note: This assumes you already have changesets setup.
To use @changesets/get-github-info
, you'll need to install it and you'll probably also want dotenv
to provide a GitHub personal access token via a .env
file.
1yarn add --dev @changesets/get-github-info dotenv
or
1npm install --save-dev @changesets/get-github-info dotenv
Then you can use it in your .changeset/config.js
like this.
1require("dotenv").config(); 2const { getInfo } = require("@changesets/get-github-info"); 3 4// ... 5 6const getReleaseLine = async (changeset, type) => { 7 const [firstLine, ...futureLines] = changeset.summary 8 .split("\n") 9 .map((l) => l.trimRight()); 10 // getInfo exposes the GH username and PR number if you want them directly 11 // but it also exposes a set of links for the commit, PR and GH username 12 let { user, pull, links } = await getInfo({ 13 // replace this with your own repo 14 repo: "Noviny/changesets", 15 commit: changeset.commit, 16 }); 17 let returnVal = `- ${links.commit}${ 18 links.pull === null ? "" : ` ${links.pull}` 19 }${links.user === null ? "" : ` Thanks ${links.user}!`}: ${firstLine}`; 20 if (futureLines.length > 0) { 21 returnVal += `\n${futureLines.map((l) => ` ${l}`).join("\n")}`; 22 } 23 return returnVal; 24}; 25 26// ...
You'll need to get a GitHub personal access token with read:user
and repo:status
permissions, and add it to a .env
file.
1GITHUB_TOKEN=token_here
You can now bump your packages and changelogs with changeset version
and it'll have the GitHub info. 🎉
API
1type Info = { 2 user: string | null; 3 pull: number | null; 4 links: { 5 commit: string; 6 pull: string | null; 7 user: string | null; 8 }; 9}; 10 11type Options = { 12 commit: string; 13 repo: string; 14}; 15 16export function getInfo(options: Options): Info { 17 // magic... 18}

No vulnerabilities found.
Reason
all changesets reviewed
Reason
23 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
security policy file detected
Details
- Info: security policy file detected: SECURITY.md:1
- Warn: no linked content found
- Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1
- Info: Found text in security policy: SECURITY.md:1
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/changeset-version.yml:1
- Info: topLevel 'contents' permission set to 'read': .github/workflows/ci.yml:9
- Info: no jobLevel write permissions found
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/changeset-version.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/changesets/changesets/changeset-version.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/changeset-version.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/changesets/changesets/changeset-version.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/changesets/changesets/ci.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/changesets/changesets/ci.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/changesets/changesets/ci.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/changesets/changesets/ci.yml/main?enable=pin
- Info: 0 out of 4 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 2 third-party GitHubAction dependencies pinned
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 30 are checked with a SAST tool
Reason
25 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5
- Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-w7rc-rwvf-8q5r
- Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-g6ww-v8xp-vmwg
- Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-w5p7-h5w8-2hfq
- Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-m95q-7qp3-xv42
Score
5.1
/10
Last Scanned on 2025-02-10
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to @changesets/get-github-info
@culur/changesets-github-info
Get the GitHub username and PR number from a commit. Intended for use with changesets.
@motss-changesets/get-github-info
Get the GitHub username and PR number from a commit. Intended for use with changesets.
tuanddd-get-github-info
Get the GitHub username and PR number from a commit. Intended for use with changesets.