mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-10 20:25:06 +01:00
ci-merge: remove use of deprecated pushedDate (#6676)
This commit is contained in:
parent
80033b84cb
commit
e5310b25d4
8
.github/workflows/ci-merge.js
vendored
8
.github/workflows/ci-merge.js
vendored
@ -11,7 +11,7 @@ async function checkBaseChanges(github, context) {
|
|||||||
repository(name:$name, owner:$owner) {
|
repository(name:$name, owner:$owner) {
|
||||||
ref(qualifiedName:$ref) {
|
ref(qualifiedName:$ref) {
|
||||||
target {
|
target {
|
||||||
... on Commit { id pushedDate oid }
|
... on Commit { id committedDate oid }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -22,9 +22,9 @@ async function checkBaseChanges(github, context) {
|
|||||||
ref: 'refs/heads/master',
|
ref: 'refs/heads/master',
|
||||||
};
|
};
|
||||||
const result = await github.graphql(query, variables);
|
const result = await github.graphql(query, variables);
|
||||||
const pushedAt = result.repository.ref.target.pushedDate;
|
const committedAt = result.repository.ref.target.committedDate;
|
||||||
console.log(`Last commit pushed at ${pushedAt}.`);
|
console.log(`Last commit committed at ${committedAt}.`);
|
||||||
const delta = new Date() - new Date(pushedAt);
|
const delta = new Date() - new Date(committedAt);
|
||||||
if (delta <= DETECTION_TIME_FRAME) {
|
if (delta <= DETECTION_TIME_FRAME) {
|
||||||
console.info('New changes detected, triggering a new build.');
|
console.info('New changes detected, triggering a new build.');
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user