From 17dcac56d3c7bc061ae74496d736339d42a2142a Mon Sep 17 00:00:00 2001 From: Jordan Kasper <30059011+jordangov@users.noreply.github.com> Date: Sun, 7 Jul 2024 14:03:58 -0400 Subject: [PATCH 1/4] Add jordangov to open-source-heroes.md --- open-source-heroes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/open-source-heroes.md b/open-source-heroes.md index 07d7287..3a799b6 100644 --- a/open-source-heroes.md +++ b/open-source-heroes.md @@ -14,3 +14,4 @@ Fork this repository, add your name to the list below (**along with the correct ## The List * @whitehouse 7e2aac5579f5e3fb61c2ba63f95cfb7a87cb3da8 +* @jordangov 6119660cad1e64ddc93cde48e2d617e3cc00071e From c7a7b200830c44d3501edd9bcdfd80c58c58c46c Mon Sep 17 00:00:00 2001 From: Jordan Kasper <30059011+jordangov@users.noreply.github.com> Date: Sun, 7 Jul 2024 14:08:30 -0400 Subject: [PATCH 2/4] debugging pipeline --- .github/workflows/hero-check.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/hero-check.yml b/.github/workflows/hero-check.yml index d48a998..e8e6a9e 100644 --- a/.github/workflows/hero-check.yml +++ b/.github/workflows/hero-check.yml @@ -28,9 +28,15 @@ jobs: - name: Check Submission id: check_sub run: >- + pwd; + ls -l; + cat source/open-source-heroes.md; + cat target/open-source-heroes.md; + + diff target/open-source-heroes.md source/open-source-heroes.md || true; SUBMISSION=`(diff target/open-source-heroes.md source/open-source-heroes.md || true) | awk '/\* @${{github.actor}}/{ print $4 }'`; CHECK=`echo -n "${{github.actor}}-${{ secrets.SALT }}" | openssl dgst -${{ secrets.ALGO }} | awk '/[a-z0-9]+/{ print $2 }'`; - echo "Confirming submission ($SUBMISSION) for ${{github.actor}} equals check ($CHECK) from SALT ($SALT) and ALGO ($ALGO)..."; + echo "Confirming submission ($SUBMISSION) for ${{github.actor}} equals check ($CHECK)..."; if [[ "$SUBMISSION" = "$CHECK" ]]; then echo "Submissions match" From 124b9fecb0d5b98825ece14cdecc7228aaeda52d Mon Sep 17 00:00:00 2001 From: Jordan Kasper <30059011+jordangov@users.noreply.github.com> Date: Sun, 7 Jul 2024 14:35:02 -0400 Subject: [PATCH 3/4] debugging source repo access (#9) --- .github/workflows/hero-check.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/hero-check.yml b/.github/workflows/hero-check.yml index 42c8b0b..c122d87 100644 --- a/.github/workflows/hero-check.yml +++ b/.github/workflows/hero-check.yml @@ -23,6 +23,8 @@ jobs: - name: Checkout Source uses: actions/checkout@v4 with: + repository: ${{ github.event.pull_request.head.repo.full_name }} + ref: ${{ github.event.pull_request.head.ref }} path: source - name: Check Submission @@ -32,6 +34,9 @@ jobs: ls -l; cat source/open-source-heroes.md; cat target/open-source-heroes.md; + + echo "repository? ${{ github.event.pull_request.head.repo.full_name }} or ${{ github.event.pull_request.base.repo.full_name }} or ${{ github.event.pull_request.repository }}"; + echo "ref? ${{ github.event.pull_request.head.ref }} or ${{ github.event.pull_request.base.ref }}"; diff target/open-source-heroes.md source/open-source-heroes.md || true; From fe7bcf4b25a8b17bbbbcd162c184ca38af2abc3e Mon Sep 17 00:00:00 2001 From: Jordan Kasper <30059011+jordangov@users.noreply.github.com> Date: Sun, 7 Jul 2024 14:43:17 -0400 Subject: [PATCH 4/4] Fix issues (#10) --- .github/workflows/hero-check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/hero-check.yml b/.github/workflows/hero-check.yml index a921a69..267775d 100644 --- a/.github/workflows/hero-check.yml +++ b/.github/workflows/hero-check.yml @@ -31,10 +31,10 @@ jobs: - name: Check Submission id: check_sub run: >- - echo "Checking diff from ${{ github.event.pull_request.head.ref }} on ${{ github.event.pull_request.head.repo.full_name }}..." + echo "Checking diff from ${{ github.event.pull_request.head.ref }} on ${{ github.event.pull_request.head.repo.full_name }}..."; SUBMISSION=`(diff target/open-source-heroes.md source/open-source-heroes.md || true) | awk '/\* @${{github.actor}}/{ print $4 }'`; CHECK=`echo -n "${{github.actor}}-${{ secrets.SALT }}" | openssl dgst -${{ secrets.ALGO }} | awk '/[a-z0-9]+/{ print $2 }'`; - echo "Confirming submission ($SUBMISSION) for ${{github.actor}} equals check ($CHECK)..."; + echo "Confirming submission ($SUBMISSION) for ${{github.actor}} equals check..."; if [[ "$SUBMISSION" = "$CHECK" ]]; then echo "Submissions match"