From c7cbf7f09cde3171899480646653321f56bc3975 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 6 Feb 2025 08:54:59 -0800 Subject: [PATCH 1/3] Add some debug logs when looking for hashes to CP --- .../getPullRequestDetails/getPullRequestDetails.ts | 1 + .github/workflows/cherryPick.yml | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/actions/javascript/getPullRequestDetails/getPullRequestDetails.ts b/.github/actions/javascript/getPullRequestDetails/getPullRequestDetails.ts index 3ff0de1b3bb2..8e285389e3f7 100644 --- a/.github/actions/javascript/getPullRequestDetails/getPullRequestDetails.ts +++ b/.github/actions/javascript/getPullRequestDetails/getPullRequestDetails.ts @@ -54,6 +54,7 @@ GithubUtils.octokit.pulls .then(({data: PR}) => { if (!isEmptyObject(PR)) { console.log(`Found matching pull request: ${PR.html_url}`); + console.log(`Pull request details: ${JSON.stringify(PR)}}`); core.setOutput('MERGE_COMMIT_SHA', PR.merge_commit_sha); core.setOutput('HEAD_COMMIT_SHA', PR.head?.sha); core.setOutput('IS_MERGED', PR.merged); diff --git a/.github/workflows/cherryPick.yml b/.github/workflows/cherryPick.yml index 425baa37eb15..b7dcf95294be 100644 --- a/.github/workflows/cherryPick.yml +++ b/.github/workflows/cherryPick.yml @@ -56,14 +56,19 @@ jobs: SEMVER_LEVEL: "PATCH" - name: Fetch history of relevant refs - run: | - git fetch origin main staging --no-tags --shallow-exclude ${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }} + run: git fetch origin main staging --no-tags --shallow-exclude ${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }} - name: Get version bump commit id: getVersionBumpCommit run: | git switch main VERSION_BUMP_COMMIT="$(git log --format='%H' --author='OSBotify' --grep 'Update version to ${{ needs.createNewVersion.outputs.NEW_VERSION }}')" + if [ -z "$VERSION_BUMP_COMMIT" ]; then + echo "::error::❌ Could not find version bump commit for ${{ needs.createNewVersion.outputs.NEW_VERSION }}" + git log --oneline + else + echo "::notice::👀 Found version bump commit $VERSION_BUMP_COMMIT" + fi echo "VERSION_BUMP_SHA=$VERSION_BUMP_COMMIT" >> "$GITHUB_OUTPUT" - name: Get merge commit for pull request to CP From 28a654f3d0e86ed9d0d49063260cf0aa4c939793 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 6 Feb 2025 09:05:48 -0800 Subject: [PATCH 2/3] Remove unnecessary sparse checkout from setupGitForOSBotifyApp --- .../composite/setupGitForOSBotifyApp/action.yml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/.github/actions/composite/setupGitForOSBotifyApp/action.yml b/.github/actions/composite/setupGitForOSBotifyApp/action.yml index 45d85663bfa6..128dcf48e934 100644 --- a/.github/actions/composite/setupGitForOSBotifyApp/action.yml +++ b/.github/actions/composite/setupGitForOSBotifyApp/action.yml @@ -24,21 +24,6 @@ outputs: runs: using: composite steps: - - name: Check if gpg encrypted private key is present - id: key_check - shell: bash - run: | - if [[ -f .github/workflows/OSBotify-private-key.asc.gpg ]]; then - echo "key_exists=true" >> "$GITHUB_OUTPUT" - fi - - - name: Checkout - uses: actions/checkout@v4 - if: steps.key_check.outputs.key_exists != 'true' - with: - sparse-checkout: | - .github - - name: Install 1Password CLI uses: 1password/install-cli-action@v1 From e395e89d730d6d46ee5eb77cf1f75330021791ef Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 6 Feb 2025 09:10:19 -0800 Subject: [PATCH 3/3] Rebuild gh actions --- .github/actions/javascript/getPullRequestDetails/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/javascript/getPullRequestDetails/index.js b/.github/actions/javascript/getPullRequestDetails/index.js index fa7e7e00e137..07baf462086c 100644 --- a/.github/actions/javascript/getPullRequestDetails/index.js +++ b/.github/actions/javascript/getPullRequestDetails/index.js @@ -11502,6 +11502,7 @@ GithubUtils_1.default.octokit.pulls .then(({ data: PR }) => { if (!(0, EmptyObject_1.isEmptyObject)(PR)) { console.log(`Found matching pull request: ${PR.html_url}`); + console.log(`Pull request details: ${JSON.stringify(PR)}}`); core.setOutput('MERGE_COMMIT_SHA', PR.merge_commit_sha); core.setOutput('HEAD_COMMIT_SHA', PR.head?.sha); core.setOutput('IS_MERGED', PR.merged);