From e5310b25d4977eac7a23b4acaa4ded853b4c9360 Mon Sep 17 00:00:00 2001 From: Vitor K Date: Fri, 7 Jul 2023 17:30:15 -0300 Subject: [PATCH] ci-merge: remove use of deprecated pushedDate (#6676) --- .github/workflows/ci-merge.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-merge.js b/.github/workflows/ci-merge.js index 63483a739..39eb43d6e 100644 --- a/.github/workflows/ci-merge.js +++ b/.github/workflows/ci-merge.js @@ -11,7 +11,7 @@ async function checkBaseChanges(github, context) { repository(name:$name, owner:$owner) { ref(qualifiedName:$ref) { target { - ... on Commit { id pushedDate oid } + ... on Commit { id committedDate oid } } } } @@ -22,9 +22,9 @@ async function checkBaseChanges(github, context) { ref: 'refs/heads/master', }; const result = await github.graphql(query, variables); - const pushedAt = result.repository.ref.target.pushedDate; - console.log(`Last commit pushed at ${pushedAt}.`); - const delta = new Date() - new Date(pushedAt); + const committedAt = result.repository.ref.target.committedDate; + console.log(`Last commit committed at ${committedAt}.`); + const delta = new Date() - new Date(committedAt); if (delta <= DETECTION_TIME_FRAME) { console.info('New changes detected, triggering a new build.'); return true;