From edd33d872b8f9b78254f38a8554bcdc415dcebf5 Mon Sep 17 00:00:00 2001 From: Alex Guretzki Date: Mon, 16 Dec 2024 16:13:53 +0100 Subject: [PATCH 1/5] logging some info --- .github/workflows/detect_api_changes.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/detect_api_changes.yml b/.github/workflows/detect_api_changes.yml index add0c46daa..9b0fbb9660 100644 --- a/.github/workflows/detect_api_changes.yml +++ b/.github/workflows/detect_api_changes.yml @@ -35,6 +35,10 @@ jobs: - name: 👾 Define Diff Versions run: | + echo "Repository: ${{ github.repository }}" + echo "Server URL: ${{ github.server_url }}" + echo "Github: ${{ github }}" + NEW="${{ env.source }}~${{ env.githubRepo }}" if [[ '${{ github.head_ref || env.noTargetBranch }}' == release/* ]] then From 5d07369868fb90c66995ac90fde178310fd85dc6 Mon Sep 17 00:00:00 2001 From: Alex Guretzki Date: Mon, 16 Dec 2024 16:18:47 +0100 Subject: [PATCH 2/5] logging pullrequest head name --- .github/workflows/detect_api_changes.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/detect_api_changes.yml b/.github/workflows/detect_api_changes.yml index 9b0fbb9660..d8919f137d 100644 --- a/.github/workflows/detect_api_changes.yml +++ b/.github/workflows/detect_api_changes.yml @@ -37,6 +37,7 @@ jobs: run: | echo "Repository: ${{ github.repository }}" echo "Server URL: ${{ github.server_url }}" + echo "Full Name: ${{ github.event.pull_request.head.repo.full_name }}" echo "Github: ${{ github }}" NEW="${{ env.source }}~${{ env.githubRepo }}" From ba28a0da19d6ba9d8b22b10f01b3d520a6d79098 Mon Sep 17 00:00:00 2001 From: Alex Guretzki Date: Mon, 16 Dec 2024 16:24:13 +0100 Subject: [PATCH 3/5] Using github.event.pull_request.head.repo.full_name --- .github/workflows/detect_api_changes.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/detect_api_changes.yml b/.github/workflows/detect_api_changes.yml index d8919f137d..cf863558b1 100644 --- a/.github/workflows/detect_api_changes.yml +++ b/.github/workflows/detect_api_changes.yml @@ -35,18 +35,13 @@ jobs: - name: 👾 Define Diff Versions run: | - echo "Repository: ${{ github.repository }}" - echo "Server URL: ${{ github.server_url }}" - echo "Full Name: ${{ github.event.pull_request.head.repo.full_name }}" - echo "Github: ${{ github }}" - - NEW="${{ env.source }}~${{ env.githubRepo }}" + NEW="${{ env.source }}~${{ env.headGithubRepo }}" if [[ '${{ github.head_ref || env.noTargetBranch }}' == release/* ]] then LATEST_TAG=$(git describe --tags --abbrev=0) - OLD="$LATEST_TAG~${{ env.githubRepo }}" + OLD="$LATEST_TAG~${{ env.baseGithubRepo }}" else - OLD="${{ env.target }}~${{ env.githubRepo }}" + OLD="${{ env.target }}~${{ env.baseGithubRepo }}" fi # Providing the output to the environment @@ -55,7 +50,8 @@ jobs: env: source: '${{ github.event.inputs.new || github.head_ref }}' target: '${{ github.event.inputs.old || github.event.pull_request.base.ref }}' - githubRepo: '${{github.server_url}}/${{github.repository}}.git' + headGithubRepo: '${{github.server_url}}/${{ github.event.pull_request.head.repo.full_name || github.repository}}.git' + baseGithubRepo: '${{github.server_url}}/${{github.repository}}.git' noTargetBranch: 'no target branch' - name: 🔍 Detect Changes From 41f8ab23abd763754598ffa285c8ffb765f34c16 Mon Sep 17 00:00:00 2001 From: Alex Guretzki Date: Mon, 23 Dec 2024 16:00:31 +0100 Subject: [PATCH 4/5] using specific commit --- .github/workflows/detect_api_changes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/detect_api_changes.yml b/.github/workflows/detect_api_changes.yml index cf863558b1..7770070122 100644 --- a/.github/workflows/detect_api_changes.yml +++ b/.github/workflows/detect_api_changes.yml @@ -55,7 +55,7 @@ jobs: noTargetBranch: 'no target branch' - name: 🔍 Detect Changes - uses: Adyen/adyen-swift-public-api-diff@0.5.0 + uses: Adyen/adyen-swift-public-api-diff@85da6fad103de1b3c21ed59af0f1be9998f944c7 id: public_api_diff with: platform: "iOS" From d306c6783bb9aabbb46d932503c396b2d0739fd0 Mon Sep 17 00:00:00 2001 From: Alex Guretzki Date: Mon, 23 Dec 2024 16:04:28 +0100 Subject: [PATCH 5/5] test output --- .github/workflows/detect_api_changes.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/detect_api_changes.yml b/.github/workflows/detect_api_changes.yml index 7770070122..bcebe9bd97 100644 --- a/.github/workflows/detect_api_changes.yml +++ b/.github/workflows/detect_api_changes.yml @@ -61,3 +61,8 @@ jobs: platform: "iOS" new: ${{ env.NEW_VERSION }} old: ${{ env.OLD_VERSION }} + + - name: Output Github Step Summary + run: | + echo "Step summary incomming:" + cat $GITHUB_STEP_SUMMARY