From 9b3a8e6bcf78328ce4c4cd137a99a527bc66bec1 Mon Sep 17 00:00:00 2001 From: Grayson Hay <94549+graysonarts@users.noreply.github.com> Date: Tue, 12 Oct 2021 09:26:04 -0700 Subject: [PATCH] =?UTF-8?q?fix(tools):=20=F0=9F=91=B7=20update=20CodeSee?= =?UTF-8?q?=20workflow=20to=20now=20work=20with=20PRs=20from=20forks=20(#4?= =?UTF-8?q?3816)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 👷 CodeSee now works with PRs in forks This change updates the CodeSee Architecture Diagram workflow to enable PR diagrams from forks. * Adds back in the run condition Missed this bit when I was copying over the updated template, adding it back in. * Ran prettier on the workflow file --- .github/workflows/codesee-arch-diagram.yml | 31 +++++++++++++++++----- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/.github/workflows/codesee-arch-diagram.yml b/.github/workflows/codesee-arch-diagram.yml index 9473558c14..383168a90f 100644 --- a/.github/workflows/codesee-arch-diagram.yml +++ b/.github/workflows/codesee-arch-diagram.yml @@ -2,21 +2,24 @@ on: push: branches: - main - pull_request: + pull_request_target: types: [opened, synchronize, reopened] name: CodeSee Map jobs: test_map_action: - if: ${{ github.actor != 'renovate[bot]' && github.actor != 'camperbot' }} runs-on: ubuntu-latest - name: Run map action on action code + if: ${{ github.actor != 'renovate[bot]' && github.actor != 'camperbot' }} + continue-on-error: true + name: Run CodeSee Map Analysis steps: - name: checkout id: checkout uses: actions/checkout@v2 with: + repository: ${{ github.event.pull_request.head.repo.full_name }} + ref: ${{ github.event.pull_request.head.ref }} fetch-depth: 0 # codesee-detect-languages has an output with id languages. @@ -54,10 +57,26 @@ jobs: # CodeSee Maps Rust support uses a static binary so there's no setup step required. - - name: run - id: run + - name: Generate Map + id: generate-map uses: Codesee-io/codesee-map-action@latest with: + step: map + github_ref: ${{ github.ref }} + languages: ${{ steps.detect-languages.outputs.languages }} + + - name: Upload Map + id: upload-map + uses: Codesee-io/codesee-map-action@latest + with: + step: mapUpload + api_token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }} + github_ref: ${{ github.ref }} + + - name: Insights + id: insights + uses: Codesee-io/codesee-map-action@latest + with: + step: insights api_token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }} github_ref: ${{ github.ref }} - support_typescript: true