Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Update/UpdateVersion.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,18 @@ function extractReleaseNotes(body) {
return match ? match[1].trim() : "";
}
var CurrentNotes = extractReleaseNotes(String(process.argv[5] || ""));
// Editing a PR (including AI reviewers adding summaries on the author's behalf) must never bump the version;
// it may only refresh this PR's own entry. Versions are bumped on opened/synchronize runs.
if (eventAction === "edited") {
if (LastPR != CurrentPR) {
console.log("PR edited, but the latest version entry is not this PR's. Not bumping the version.");
process.exit(0);
}
if (NpmVersion != LastJSVersion) {
console.warn("PR edited and owns the latest entry, but package.json and XMOJ.user.js are out of sync; skipping the metadata refresh.");
process.exit(0);
}
}
if (LastJSVersion != NpmVersion) {
console.warn("Assuming you manually ran npm version.");
} else if (!(LastPR == CurrentPR && NpmVersion == LastJSVersion)) {
Expand Down
Loading