Socket
Socket
Sign inDemoInstall

@semantic-release/github

Package Overview
Dependencies
Maintainers
4
Versions
168
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@semantic-release/github - npm Package Compare versions

Comparing version 10.1.1 to 10.1.2

11

lib/definitions/errors.js

@@ -142,2 +142,13 @@ import { inspect } from "node:util";

export function EMISMATCHGITHUBURL() {
return {
message: "The git repository URL mismatches the GitHub URL.",
details: `The **semantic-release** \`repositoryUrl\` option must match your GitHub URL with the format \`<GitHub_or_GHE_URL>/<owner>/<repo>.git\`.
By default the \`repositoryUrl\` option is retrieved from the \`repository\` property of your \`package.json\` or the [git origin url](https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes) of the repository cloned by your CI environment.
Note: If you have recently changed your GitHub repository name or owner, update the value in **semantic-release** \`repositoryUrl\` option and the \`repository\` property of your \`package.json\` respectively to match the new GitHub URL.`,
};
}
export function EINVALIDPROXY({ proxy }) {

@@ -144,0 +155,0 @@ return {

@@ -147,2 +147,29 @@ import {

// Verify if Repository Name wasn't changed
if (
owner &&
repo &&
githubToken &&
!errors.find(({ code }) => code === "EINVALIDPROXY") &&
!errors.find(({ code }) => code === "EMISSINGREPO")
) {
const octokit = new Octokit(
toOctokitOptions({
githubToken,
githubUrl,
githubApiPathPrefix,
githubApiUrl,
proxy,
}),
);
const {
status,
data: { clone_url },
} = await octokit.request("GET /repos/{owner}/{repo}", { owner, repo });
if (status !== 200 || repositoryUrl !== clone_url) {
errors.push(getError("EMISMATCHGITHUBURL"));
}
}
if (!githubToken) {

@@ -149,0 +176,0 @@ errors.push(getError("ENOGHTOKEN", { owner, repo }));

2

package.json
{
"name": "@semantic-release/github",
"description": "semantic-release plugin to publish a GitHub release and comment on released Pull Requests/Issues",
"version": "10.1.1",
"version": "10.1.2",
"type": "module",

@@ -6,0 +6,0 @@ "author": "Pierre Vanduynslager (https://twitter.com/@pvdlg_)",

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