mirror of
https://github.com/keymanapp/keyman.git
synced 2026-10-06 14:07:32 +00:00
chore(common): remove --first-parent when searching for PRs
Instead of just reporting on --first-parent, now lists all merges that are in the log, which means we get some non-PR merges but that's ok. At least we get all of them. This was most visible with chained PRs which were merged bottom-up.
This commit is contained in:
parent
51c69e2894
commit
fb36fc3f69
1 changed files with 8 additions and 8 deletions
|
|
@ -120,7 +120,7 @@ const splicePullsIntoHistory = async (pulls: PRInformation[]): Promise<number> =
|
|||
if(match) {
|
||||
state = gt(match[1], version) ? "newer" : "older";
|
||||
}
|
||||
}
|
||||
}
|
||||
historyChunks[state].push(line);
|
||||
}
|
||||
|
||||
|
|
@ -149,7 +149,7 @@ const splicePullsIntoHistory = async (pulls: PRInformation[]): Promise<number> =
|
|||
const pullNumberRe = new RegExp(`#${pull.number}\\b`);
|
||||
|
||||
if(pull.title.match(/^auto/)) {
|
||||
// We always skip pull requests that are
|
||||
// We always skip pull requests that are
|
||||
// automatically generated. At time this is written,
|
||||
// that only includes incrementing version. But in
|
||||
// future there may be others.
|
||||
|
|
@ -201,10 +201,10 @@ const splicePullsIntoHistory = async (pulls: PRInformation[]): Promise<number> =
|
|||
}
|
||||
|
||||
/**
|
||||
* Adds any outstanding pull request titles to HISTORY.md for the current
|
||||
* Adds any outstanding pull request titles to HISTORY.md for the current
|
||||
* version. Retrieves pull request details from GitHub.
|
||||
* @returns number of history entries for the current version,
|
||||
* 0 if no pulls associated with the current vesrion, or
|
||||
* @returns number of history entries for the current version,
|
||||
* 0 if no pulls associated with the current vesrion, or
|
||||
* -1 on error.
|
||||
*/
|
||||
|
||||
|
|
@ -225,8 +225,8 @@ export const fixupHistory = async (
|
|||
//
|
||||
// Now, use git log to retrieve list of merge commit refs since then
|
||||
//
|
||||
|
||||
const git_result = (await spawnChild('git', ['log', '--merges', '--first-parent', '--format=%H', base, `${commit_id}..`])).trim();
|
||||
|
||||
const git_result = (await spawnChild('git', ['log', '--merges', /*'--first-parent',*/ '--format=%H', base, `${commit_id}..`])).trim();
|
||||
if(git_result.length == 0) {
|
||||
// We won't throw on this
|
||||
logWarning('No pull requests found since previous increment');
|
||||
|
|
@ -259,5 +259,5 @@ export const fixupHistory = async (
|
|||
|
||||
const changeCount = await splicePullsIntoHistory(pulls);
|
||||
|
||||
return changeCount;
|
||||
return changeCount;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue