Skip to content

Commit b6220fe

Browse files
authored
Merge pull request #24 from ziyak97:fix/zj/use-merged_at-in-getMergedPullRequests
fix: 🐛 use merged_at instead of updated_at in getMergedPullRequests
2 parents 1be15ba + 329ed6e commit b6220fe

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎scripts/startRelease.js‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ async function getLastestRelease(owner, repo) {
7373
* @returns {Promise<Array<PullRequest>>} An array of merged pull requests for the repository
7474
*/
7575
async function getMergedPullRequests(owner, repo, published_at) {
76-
const query = `repo:${owner}/${repo} is:pr is:merged updated:>${published_at}`;
76+
const query = `repo:${owner}/${repo} is:pr is:merged merged:>${published_at}`;
7777
const response = await octokit.search.issuesAndPullRequests({ q: query });
7878
const mergedPullRequests = response.data.items;
7979
return mergedPullRequests;
@@ -205,7 +205,9 @@ async function createCanaryRelease() {
205205
const minor = parseInt(match[2]);
206206
const patch = parseInt(match[3]);
207207
const isCanary = latestRelease.prerelease;
208-
const canaryVersion = isCanary ? parseInt(latestRelease.tag_name.split("canary.")[1]) : null;
208+
const canaryVersion = isCanary
209+
? parseInt(latestRelease.tag_name.split("canary.")[1])
210+
: null;
209211

210212
if (isCanary) {
211213
tag_name = `v${major}.${minor}.${patch}-canary.${canaryVersion + 1}`;

0 commit comments

Comments
 (0)