From 5d7ac709214a8403d4c94e6a4aeecce30606c074 Mon Sep 17 00:00:00 2001 From: FL33TW00D Date: Mon, 22 Jan 2024 22:59:27 +0000 Subject: [PATCH 1/7] test From 095d18b30c6afdcbb83ba35a83b3559ecba99c53 Mon Sep 17 00:00:00 2001 From: FL33TW00D Date: Mon, 22 Jan 2024 23:00:53 +0000 Subject: [PATCH 2/7] chore: try bot --- .github/workflows/ratbot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ratbot.yml b/.github/workflows/ratbot.yml index d42f311e..ba8ff724 100644 --- a/.github/workflows/ratbot.yml +++ b/.github/workflows/ratbot.yml @@ -23,7 +23,7 @@ jobs: uses: actions/github-script@v6 with: script: | - const linesOfCode = ${{ steps.loc.outputs.lines }}; + const linesOfCode = '${{ steps.loc.outputs.lines }}'; github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, From f733abaacccaf71bd8b1abd879df91503b66c8a7 Mon Sep 17 00:00:00 2001 From: FL33TW00D Date: Mon, 22 Jan 2024 23:06:26 +0000 Subject: [PATCH 3/7] chore: try bot --- .github/workflows/ratbot.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ratbot.yml b/.github/workflows/ratbot.yml index ba8ff724..176f6500 100644 --- a/.github/workflows/ratbot.yml +++ b/.github/workflows/ratbot.yml @@ -15,7 +15,7 @@ jobs: id: loc run: | cd ./crates/ratchet-core - LINES=$(scc -irs --exclude-file kernels | tail -1 | awk '{print $2}') + LINES=$(scc -irs --exclude-file kernel) echo "::set-output name=lines::$LINES" # Step to comment on the PR @@ -23,11 +23,11 @@ jobs: uses: actions/github-script@v6 with: script: | - const linesOfCode = '${{ steps.loc.outputs.lines }}'; + const codeReport = '${{ steps.loc.outputs.lines }}'; github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: `Your PR has ${linesOfCode} lines of code.` + body: `${codeReport` }) From 17df76ce333773602d5cc10bb6c727cff9859179 Mon Sep 17 00:00:00 2001 From: FL33TW00D Date: Mon, 22 Jan 2024 23:09:38 +0000 Subject: [PATCH 4/7] chore: try bot --- .github/workflows/ratbot.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ratbot.yml b/.github/workflows/ratbot.yml index 176f6500..0a8af966 100644 --- a/.github/workflows/ratbot.yml +++ b/.github/workflows/ratbot.yml @@ -10,7 +10,10 @@ jobs: - name: Checkout code uses: actions/checkout@v3 - # Step to count lines of code using scc + - name: Install scc + run: | + sudo snap install scc + - name: Count lines of code id: loc run: | From bcd2ffed49db47b723e820fa3a32838c4be244a0 Mon Sep 17 00:00:00 2001 From: FL33TW00D Date: Mon, 22 Jan 2024 23:12:18 +0000 Subject: [PATCH 5/7] test From fd8ad84192a46ef021d134df15a8cc106337668e Mon Sep 17 00:00:00 2001 From: FL33TW00D Date: Mon, 22 Jan 2024 23:14:17 +0000 Subject: [PATCH 6/7] chore: try bot --- .github/workflows/ratbot.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ratbot.yml b/.github/workflows/ratbot.yml index 0a8af966..3e5c62f1 100644 --- a/.github/workflows/ratbot.yml +++ b/.github/workflows/ratbot.yml @@ -10,16 +10,11 @@ jobs: - name: Checkout code uses: actions/checkout@v3 - - name: Install scc - run: | - sudo snap install scc - - - name: Count lines of code - id: loc - run: | - cd ./crates/ratchet-core - LINES=$(scc -irs --exclude-file kernel) - echo "::set-output name=lines::$LINES" + - name: Get the lines of code. + id: scc + uses: Adapt-API/scc-docker-action@master + with: + args: ${{ env.workspace }} -irs --exclude-file kernels # Step to comment on the PR - name: Comment PR From 7ff9d20d72a9af5233e0619bb2cad8f955167446 Mon Sep 17 00:00:00 2001 From: FL33TW00D Date: Mon, 22 Jan 2024 23:15:09 +0000 Subject: [PATCH 7/7] chore: try bot --- .github/workflows/ratbot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ratbot.yml b/.github/workflows/ratbot.yml index 3e5c62f1..d3d9a81f 100644 --- a/.github/workflows/ratbot.yml +++ b/.github/workflows/ratbot.yml @@ -21,7 +21,7 @@ jobs: uses: actions/github-script@v6 with: script: | - const codeReport = '${{ steps.loc.outputs.lines }}'; + const codeReport = '${{ steps.scc.outputs.scc }}'; github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner,