mirror of
https://github.com/changesets/action
synced 2026-10-26 16:39:56 +08:00
Bring back former PR title (#20)
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -224,9 +224,12 @@ ${
|
|||||||
.join("\n ")
|
.join("\n ")
|
||||||
);
|
);
|
||||||
})();
|
})();
|
||||||
const title = `ci(changeset): generate PR with changelog &${isInPreMode ? ` (${preState.tag})` : ""} version updates`
|
|
||||||
|
const prTitle = `Version Packages${isInPreMode ? ` (${preState.tag})` : ""}`
|
||||||
|
const commitMsg = `ci(changeset): generate PR with changelog &${isInPreMode ? ` (${preState.tag})` : ""} version updates`
|
||||||
|
|
||||||
await exec("git", ["add", "."]);
|
await exec("git", ["add", "."]);
|
||||||
await exec("git", ["commit", "-m", title]);
|
await exec("git", ["commit", "-m", commitMsg]);
|
||||||
await exec("git", ["push", "origin", versionBranch, "--force"]);
|
await exec("git", ["push", "origin", versionBranch, "--force"]);
|
||||||
let searchResult = await searchResultPromise;
|
let searchResult = await searchResultPromise;
|
||||||
console.log(JSON.stringify(searchResult.data, null, 2));
|
console.log(JSON.stringify(searchResult.data, null, 2));
|
||||||
@@ -235,14 +238,14 @@ ${
|
|||||||
await octokit.pulls.create({
|
await octokit.pulls.create({
|
||||||
base: branch,
|
base: branch,
|
||||||
head: versionBranch,
|
head: versionBranch,
|
||||||
title,
|
title: prTitle,
|
||||||
body: await prBodyPromise,
|
body: await prBodyPromise,
|
||||||
...github.context.repo
|
...github.context.repo
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
octokit.pulls.update({
|
octokit.pulls.update({
|
||||||
pull_number: searchResult.data.items[0].number,
|
pull_number: searchResult.data.items[0].number,
|
||||||
title,
|
title: prTitle,
|
||||||
body: await prBodyPromise,
|
body: await prBodyPromise,
|
||||||
...github.context.repo
|
...github.context.repo
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user