@semantic-release/github
Advanced tools
Comparing version 10.1.2 to 10.1.3
@@ -142,13 +142,2 @@ 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 }) { | ||
@@ -155,0 +144,0 @@ return { |
@@ -147,29 +147,2 @@ 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) { | ||
@@ -176,0 +149,0 @@ errors.push(getError("ENOGHTOKEN", { owner, repo })); |
{ | ||
"name": "@semantic-release/github", | ||
"description": "semantic-release plugin to publish a GitHub release and comment on released Pull Requests/Issues", | ||
"version": "10.1.2", | ||
"version": "10.1.3", | ||
"type": "module", | ||
@@ -6,0 +6,0 @@ "author": "Pierre Vanduynslager (https://twitter.com/@pvdlg_)", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
76921
1327