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
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -224,8 +224,9 @@ ${
|
|||||||
.join("\n ")
|
.join("\n ")
|
||||||
);
|
);
|
||||||
})();
|
})();
|
||||||
|
const title = `Version Packages${isInPreMode ? ` (${preState.tag})` : ""}`
|
||||||
await exec("git", ["add", "."]);
|
await exec("git", ["add", "."]);
|
||||||
await exec("git", ["commit", "-m", "Version Packages"]);
|
await exec("git", ["commit", "-m", title]);
|
||||||
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));
|
||||||
@@ -234,14 +235,14 @@ ${
|
|||||||
await octokit.pulls.create({
|
await octokit.pulls.create({
|
||||||
base: branch,
|
base: branch,
|
||||||
head: versionBranch,
|
head: versionBranch,
|
||||||
title: `Version Packages${isInPreMode ? ` (${preState.tag})` : ""}`,
|
title,
|
||||||
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: `Version Packages${isInPreMode ? ` (${preState.tag})` : ""}`,
|
title,
|
||||||
body: await prBodyPromise,
|
body: await prBodyPromise,
|
||||||
...github.context.repo
|
...github.context.repo
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user