From e3b1b3305b0dbdb17ede85f2f2ac47037ed65578 Mon Sep 17 00:00:00 2001 From: FG-TUM Date: Fri, 9 Feb 2024 13:00:22 +0100 Subject: [PATCH 01/13] added footer to PR message --- badges/coverage.svg | 2 +- dist/index.js | 3 +++ src/main.ts | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/badges/coverage.svg b/badges/coverage.svg index 6d43479..08dacc5 100644 --- a/badges/coverage.svg +++ b/badges/coverage.svg @@ -1 +1 @@ -Coverage: 95.05%Coverage95.05% \ No newline at end of file +Coverage: 95.08%Coverage95.08% \ No newline at end of file diff --git a/dist/index.js b/dist/index.js index 83881e4..1207705 100644 --- a/dist/index.js +++ b/dist/index.js @@ -29146,6 +29146,9 @@ The following doc files are unchanged, but some related sources were changed. Ma message += `- [ ] [${path.basename(docfile)}](${(0, utils_1.getUrlToFile)(docfile)}) (changed: ${tagsToUrls(tags)})\n`; } } + // Add footer with information about the bot. + message += `---\n' +[What is this?](https://github.com/AutoPas/DocTagChecker)`; return message; } /** diff --git a/src/main.ts b/src/main.ts index 235138c..e75fe33 100644 --- a/src/main.ts +++ b/src/main.ts @@ -279,6 +279,10 @@ The following doc files are unchanged, but some related sources were changed. Ma } } + // Add footer with information about the bot. + message += `---\n' +[What is this?](https://github.com/AutoPas/DocTagChecker)` + return message } From 55ab6e8ecaf9ff7428b3221cdac4539ba9ec30a4 Mon Sep 17 00:00:00 2001 From: FG-TUM Date: Fri, 9 Feb 2024 13:30:57 +0100 Subject: [PATCH 02/13] add workflow for DocTagChecker --- .github/workflows/DocTagChecker.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/DocTagChecker.yml diff --git a/.github/workflows/DocTagChecker.yml b/.github/workflows/DocTagChecker.yml new file mode 100644 index 0000000..c338a8d --- /dev/null +++ b/.github/workflows/DocTagChecker.yml @@ -0,0 +1,25 @@ +name: DocTagChecker + +on: + pull_request + +jobs: + DocTagCheck: + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Check for missing userdoc updates + uses: AutoPas/DocTagChecker@footerMessage + with: + githubToken: ${{ secrets.GITHUB_TOKEN }} + # multiple paths are separated by whitespace or ',' + userDocsDirs: __tests__/testData/ + # Optional inputs with defaults: + # DON'T use '/other stuff/i' as it contains intentional fakes + # dirTagSectionRegex: + # Check userDocsDirs recursively. + recurseUserDocDirs: true + # File extensions for files to be considered documentation. + docFileExtensions: md + # File extensions for files to be considered source code. + srcFileExtensions: ts From e03a082ca86ca0583a5f3ac9fb78d1a23a210783 Mon Sep 17 00:00:00 2001 From: FG-TUM Date: Fri, 9 Feb 2024 13:34:38 +0100 Subject: [PATCH 03/13] add runs on --- .github/workflows/DocTagChecker.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/DocTagChecker.yml b/.github/workflows/DocTagChecker.yml index c338a8d..af6c8c4 100644 --- a/.github/workflows/DocTagChecker.yml +++ b/.github/workflows/DocTagChecker.yml @@ -4,6 +4,7 @@ on: pull_request jobs: + runs-on: ubuntu-latest DocTagCheck: steps: - name: Checkout From 8bc138dad6b10d47ba2009c0932b11111436b8bf Mon Sep 17 00:00:00 2001 From: FG-TUM Date: Fri, 9 Feb 2024 13:35:50 +0100 Subject: [PATCH 04/13] move runs on to correct location --- .github/workflows/DocTagChecker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/DocTagChecker.yml b/.github/workflows/DocTagChecker.yml index af6c8c4..b5d2807 100644 --- a/.github/workflows/DocTagChecker.yml +++ b/.github/workflows/DocTagChecker.yml @@ -4,8 +4,8 @@ on: pull_request jobs: - runs-on: ubuntu-latest DocTagCheck: + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 From fbf8177ade0cd5b03de497d800fa1d822655c2a3 Mon Sep 17 00:00:00 2001 From: FG-TUM Date: Fri, 9 Feb 2024 13:37:48 +0100 Subject: [PATCH 05/13] typo --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index e75fe33..15051d6 100644 --- a/src/main.ts +++ b/src/main.ts @@ -280,7 +280,7 @@ The following doc files are unchanged, but some related sources were changed. Ma } // Add footer with information about the bot. - message += `---\n' + message += `---\n [What is this?](https://github.com/AutoPas/DocTagChecker)` return message From 4f0cbedf6926967cb1bcb388096e11c8743a9eca Mon Sep 17 00:00:00 2001 From: FG-TUM Date: Fri, 9 Feb 2024 17:17:31 +0100 Subject: [PATCH 06/13] use version of who triggered the workflow --- .github/workflows/DocTagChecker.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/DocTagChecker.yml b/.github/workflows/DocTagChecker.yml index b5d2807..4215409 100644 --- a/.github/workflows/DocTagChecker.yml +++ b/.github/workflows/DocTagChecker.yml @@ -10,7 +10,8 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Check for missing userdoc updates - uses: AutoPas/DocTagChecker@footerMessage + # Use the version from the branch that triggered the workflow + uses: AutoPas/DocTagChecker@${{ github.head_ref || github.ref_name }} with: githubToken: ${{ secrets.GITHUB_TOKEN }} # multiple paths are separated by whitespace or ',' From f832dbe3c2ad3e6d1a7c8319e016ff84e0b24b49 Mon Sep 17 00:00:00 2001 From: FG-TUM Date: Fri, 9 Feb 2024 17:41:29 +0100 Subject: [PATCH 07/13] Push poorly written test can down the road another ten years --- .github/workflows/DocTagChecker.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/DocTagChecker.yml b/.github/workflows/DocTagChecker.yml index 4215409..93d0ae0 100644 --- a/.github/workflows/DocTagChecker.yml +++ b/.github/workflows/DocTagChecker.yml @@ -6,12 +6,23 @@ on: jobs: DocTagCheck: runs-on: ubuntu-latest + env: + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} steps: - name: Checkout uses: actions/checkout@v4 + - name: Debug + run: | + echo "-----------------------------------" + echo $BRANCH_NAME + echo "-----------------------------------" + echo ${{ github.head_ref }} + echo "-----------------------------------" + echo ${{ github.ref_name }} + echo "-----------------------------------" - name: Check for missing userdoc updates # Use the version from the branch that triggered the workflow - uses: AutoPas/DocTagChecker@${{ github.head_ref || github.ref_name }} + uses: AutoPas/DocTagChecker@${BRANCH_NAME} with: githubToken: ${{ secrets.GITHUB_TOKEN }} # multiple paths are separated by whitespace or ',' From fdfabd00aa65fe0f9f0f9a014fcc837a763abc45 Mon Sep 17 00:00:00 2001 From: FG-TUM Date: Fri, 9 Feb 2024 17:52:25 +0100 Subject: [PATCH 08/13] fixed mistaken bug --- .github/workflows/DocTagChecker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/DocTagChecker.yml b/.github/workflows/DocTagChecker.yml index 93d0ae0..3a6ba5f 100644 --- a/.github/workflows/DocTagChecker.yml +++ b/.github/workflows/DocTagChecker.yml @@ -22,7 +22,7 @@ jobs: echo "-----------------------------------" - name: Check for missing userdoc updates # Use the version from the branch that triggered the workflow - uses: AutoPas/DocTagChecker@${BRANCH_NAME} + uses: AutoPas/DocTagChecker@${{ github.head_ref || github.ref_name }} with: githubToken: ${{ secrets.GITHUB_TOKEN }} # multiple paths are separated by whitespace or ',' From 78b11a2a4089521e081a80ef42b9c505c56b2786 Mon Sep 17 00:00:00 2001 From: FG-TUM Date: Fri, 9 Feb 2024 17:55:08 +0100 Subject: [PATCH 09/13] Added missing file in previous commit --- .github/workflows/DocTagChecker.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/DocTagChecker.yml b/.github/workflows/DocTagChecker.yml index 3a6ba5f..a137765 100644 --- a/.github/workflows/DocTagChecker.yml +++ b/.github/workflows/DocTagChecker.yml @@ -22,7 +22,8 @@ jobs: echo "-----------------------------------" - name: Check for missing userdoc updates # Use the version from the branch that triggered the workflow - uses: AutoPas/DocTagChecker@${{ github.head_ref || github.ref_name }} + # uses: AutoPas/DocTagChecker@${{ github.head_ref || github.ref_name }} + uses: AutoPas/DocTagChecker@main with: githubToken: ${{ secrets.GITHUB_TOKEN }} # multiple paths are separated by whitespace or ',' From aafa9afa48e4873d4aef7efeed9ae8142ff89bad Mon Sep 17 00:00:00 2001 From: FG-TUM Date: Fri, 9 Feb 2024 18:00:12 +0100 Subject: [PATCH 10/13] I dont know what I am doing --- .github/workflows/DocTagChecker.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/DocTagChecker.yml b/.github/workflows/DocTagChecker.yml index a137765..08e85c6 100644 --- a/.github/workflows/DocTagChecker.yml +++ b/.github/workflows/DocTagChecker.yml @@ -11,7 +11,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - name: Debug + - name: debug run: | echo "-----------------------------------" echo $BRANCH_NAME @@ -20,9 +20,10 @@ jobs: echo "-----------------------------------" echo ${{ github.ref_name }} echo "-----------------------------------" + ACTION_VERSION=${BRANCH_NAME} - name: Check for missing userdoc updates # Use the version from the branch that triggered the workflow - # uses: AutoPas/DocTagChecker@${{ github.head_ref || github.ref_name }} + uses: AutoPas/DocTagChecker@${{ steps.debug.outputs.ACTION_VERSION }} uses: AutoPas/DocTagChecker@main with: githubToken: ${{ secrets.GITHUB_TOKEN }} From 3e6c596bd0d9cea5f0fc84653f704511b2f51850 Mon Sep 17 00:00:00 2001 From: FG-TUM Date: Fri, 9 Feb 2024 18:00:25 +0100 Subject: [PATCH 11/13] Who Let the Bugs Out?? --- .github/workflows/DocTagChecker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/DocTagChecker.yml b/.github/workflows/DocTagChecker.yml index 08e85c6..775473b 100644 --- a/.github/workflows/DocTagChecker.yml +++ b/.github/workflows/DocTagChecker.yml @@ -24,7 +24,7 @@ jobs: - name: Check for missing userdoc updates # Use the version from the branch that triggered the workflow uses: AutoPas/DocTagChecker@${{ steps.debug.outputs.ACTION_VERSION }} - uses: AutoPas/DocTagChecker@main + # uses: AutoPas/DocTagChecker@main with: githubToken: ${{ secrets.GITHUB_TOKEN }} # multiple paths are separated by whitespace or ',' From 075317bbe6eab1d169639d8c10a45383f9b77f3c Mon Sep 17 00:00:00 2001 From: FG-TUM Date: Fri, 9 Feb 2024 18:05:18 +0100 Subject: [PATCH 12/13] totally more readable --- .github/workflows/DocTagChecker.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/DocTagChecker.yml b/.github/workflows/DocTagChecker.yml index 775473b..baaf1e6 100644 --- a/.github/workflows/DocTagChecker.yml +++ b/.github/workflows/DocTagChecker.yml @@ -11,19 +11,9 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - name: debug - run: | - echo "-----------------------------------" - echo $BRANCH_NAME - echo "-----------------------------------" - echo ${{ github.head_ref }} - echo "-----------------------------------" - echo ${{ github.ref_name }} - echo "-----------------------------------" - ACTION_VERSION=${BRANCH_NAME} - name: Check for missing userdoc updates # Use the version from the branch that triggered the workflow - uses: AutoPas/DocTagChecker@${{ steps.debug.outputs.ACTION_VERSION }} + uses: ./ # uses: AutoPas/DocTagChecker@main with: githubToken: ${{ secrets.GITHUB_TOKEN }} From f8e216f4c9cee7d321b139d79a9f663873b17536 Mon Sep 17 00:00:00 2001 From: FG-TUM Date: Fri, 9 Feb 2024 18:07:23 +0100 Subject: [PATCH 13/13] Use the current state of the repo as action --- .github/workflows/DocTagChecker.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/DocTagChecker.yml b/.github/workflows/DocTagChecker.yml index baaf1e6..b0e2a07 100644 --- a/.github/workflows/DocTagChecker.yml +++ b/.github/workflows/DocTagChecker.yml @@ -12,9 +12,9 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Check for missing userdoc updates - # Use the version from the branch that triggered the workflow + # Use the DocTagChecker version from the branch that triggered the workflow + # This is the repo relative path to actions.yml uses: ./ - # uses: AutoPas/DocTagChecker@main with: githubToken: ${{ secrets.GITHUB_TOKEN }} # multiple paths are separated by whitespace or ','