From 673ff94759a8012c12fa8c3a326275df9fb184e2 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 22 Sep 2024 08:48:30 +0100 Subject: [PATCH] build: Use codeberg mirror to self-test todo action There is now a mirror of this repo at https://codeberg.org/kemitix/todo-checker We use both this original repo and that repo to verify both are working as a valid actions. Closes kemitix/forgejo-todo-checker#10 --- .forgejo/workflows/push-next.yml | 5 +++- README.md | 40 +++++++++++++++++++++----------- 2 files changed, 31 insertions(+), 14 deletions(-) diff --git a/.forgejo/workflows/push-next.yml b/.forgejo/workflows/push-next.yml index 4e17ac9..f290d0b 100644 --- a/.forgejo/workflows/push-next.yml +++ b/.forgejo/workflows/push-next.yml @@ -27,9 +27,12 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Check TODOs + - name: Check TODOs (Origin) uses: https://git.kemitix.net/kemitix/forgejo-todo-checker@v1.0.0 + - name: Check TODOs (Codeberg mirror) + uses: kemitix/todo-checker@v1.0.0 + - name: Machete uses: https://git.kemitix.net/kemitix/rust@v2.1.0 with: diff --git a/README.md b/README.md index 082a9f7..a64fe4b 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,30 @@ A ForgeJo Action. (Inspired by https://woodpecker-ci.org/plugins/TODO-Checker) +## Codeberg Mirror + +Main development takes place on [git.kemitix.net](https://git.kemitix.net/kemitix/forgejo-todo-checker). + +There is a mirror on Codeberg.org as [kemitix/todo-checker](https://codeberg.org/kemitix/todo-checker). + +This mirror allows you to refer to the action as simply `kemitix/todo-checker@v1.0.0`. + +## Usage + +```yaml +jobs: + tests: + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Check TODOs + # Original: + # uses: https://git.kemitix.net/kemitix/forgejo-todo-checker@v1.0.0 + # Codeberg mirror: + uses: kemitix/todo-checker@v1.0.0 +``` + ## Comments Format This Action only pays attention to comments in a particular format. e.g: @@ -31,18 +55,7 @@ The `ISSUE_NUMBER` must correspond to an **OPEN** Issue in the repo that the Act If the issue has been closed or can't be found then the comment is marked as an error and the Check with fail. -## Example Use as a ForgeJo Action Step - -```yaml -jobs: - tests: - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Check TODOs - uses: https://git.kemitix.net/kemitix/forgejo-todo-checker@v1.0.0 -``` +## Example Output The output will be similar to the following if there are any errors: @@ -50,11 +63,12 @@ The output will be similar to the following if there are any errors: Forgejo TODO Checker! Repo: kemitix/my-projext Prefix: (#|//)\s*(TODO|FIXME) -Issues: ( |)(\(|\(#)(?P\d+)(\)) +Issues: \(#?(?P\d+)\) - Issue number missing: src/main.rs#38: // TODO: implement this cool feature and get rich! - Closed/Invalid Issue: (19) README.md#12: // TODO: (#19) This is the comment +>> 1 error in src/model/line.rs Error: Invalid or closed TODO/FIXMEs found ```