From c4c0de07b084e5f7489adfa456ca26880ad3aae1 Mon Sep 17 00:00:00 2001 From: waynebruce0x Date: Tue, 15 Mar 2022 13:39:18 +0000 Subject: [PATCH] with waynes env --- .github/workflows/commentResult.js | 6 +----- .github/workflows/test.yml | 5 ++--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/commentResult.js b/.github/workflows/commentResult.js index d3c3338af..0e36a98b1 100644 --- a/.github/workflows/commentResult.js +++ b/.github/workflows/commentResult.js @@ -5,15 +5,12 @@ async function main() { const [, , log, author, repo, pr, path, token] = process.argv; const file = readFileSync(log, 'utf-8'); - // only show the summary TVL cos the comments could end up long const summaryIndex = file.indexOf('------ TVL ------'); if (summaryIndex == -1) { return; }; - console.log('JUNK:') - console.log(token) - const response = await axios.post( + await axios.post( `https://api.github.com/repos/${author}/${repo}/issues/${pr}/comments`, { body: `The adapter at ${path} exports TVL: @@ -24,6 +21,5 @@ async function main() { Accept: 'application/vnd.github.v3+json' } }); - console.log(response) }; main(); \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6016fb873..0af934c56 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,13 +14,12 @@ jobs: uses: actions/checkout@v2 - name: Run changes files through test script run: | - echo ${{ secrets.JUNK_SECRET }} npm install for i in $(echo ${{ steps.file_changes.outputs.files_modified}} | tr -d '[]' | tr "," "\n") do { node ${{ github.workspace }}/test.js ${{ github.workspace }}/${i} > output.txt - node ${{ github.workspace }}/.github/workflows/commentResult.js /home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/output.txt "${{ github.repository_owner }}" "${{ github.event.repository.name }}" "${{ github.event.number }}" ${i} ${{ secrets.JUNK_SECRET }} + node ${{ github.workspace }}/.github/workflows/commentResult.js /home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/output.txt "${{ github.repository_owner }}" "${{ github.event.repository.name }}" "${{ github.event.number }}" ${i} ${{ secrets.TESTER_KEY }} } || { echo -n $i echo ' doesnt run' @@ -30,7 +29,7 @@ jobs: do { node ${{ github.workspace }}/test.js ${{ github.workspace }}/${i} > output.txt - node ${{ github.workspace }}/.github/workflows/commentResult.js /home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/output.txt "${{ github.repository_owner }}" "${{ github.event.repository.name }}" "${{ github.event.number }}" ${i} ${{ secrets.JUNK_SECRET }} + node ${{ github.workspace }}/.github/workflows/commentResult.js /home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/output.txt "${{ github.repository_owner }}" "${{ github.event.repository.name }}" "${{ github.event.number }}" ${i} ${{ secrets.TESTER_KEY }} } || { echo -n $i echo ' doesnt run'