mirror of
https://github.com/changesets/action
synced 2026-10-26 16:39:56 +08:00
Match commit message to PR title (#13)
This commit is contained in:
committed by
Mitchell Hamilton
parent
1f00d9074c
commit
e9239e0d25
@@ -224,8 +224,9 @@ ${
|
||||
.join("\n ")
|
||||
);
|
||||
})();
|
||||
const title = `Version Packages${isInPreMode ? ` (${preState.tag})` : ""}`
|
||||
await exec("git", ["add", "."]);
|
||||
await exec("git", ["commit", "-m", "Version Packages"]);
|
||||
await exec("git", ["commit", "-m", title]);
|
||||
await exec("git", ["push", "origin", versionBranch, "--force"]);
|
||||
let searchResult = await searchResultPromise;
|
||||
console.log(JSON.stringify(searchResult.data, null, 2));
|
||||
@@ -234,14 +235,14 @@ ${
|
||||
await octokit.pulls.create({
|
||||
base: branch,
|
||||
head: versionBranch,
|
||||
title: `Version Packages${isInPreMode ? ` (${preState.tag})` : ""}`,
|
||||
title,
|
||||
body: await prBodyPromise,
|
||||
...github.context.repo
|
||||
});
|
||||
} else {
|
||||
octokit.pulls.update({
|
||||
pull_number: searchResult.data.items[0].number,
|
||||
title: `Version Packages${isInPreMode ? ` (${preState.tag})` : ""}`,
|
||||
title,
|
||||
body: await prBodyPromise,
|
||||
...github.context.repo
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user