From 66b9730108651e90b2667ae045a40ba8263d54d9 Mon Sep 17 00:00:00 2001 From: Kelly Thomas Reardon Date: Wed, 6 May 2026 22:24:34 -0500 Subject: [PATCH 01/12] skeleton ready --- .gitea/workflows/docker-build.yaml | 69 +++++++++++ .gitignore | 4 + .postmate/collections/Donetick API.json | 38 ++++++ .postmate/postmate-history.json | 29 +++++ .postmate/postmateHeader.json | 7 ++ Dockerfile | 6 + Start-DoneTickNotifier.ps1 | 6 + docker-compose.yaml | 12 ++ ref/chore-schema.json | 152 ++++++++++++++++++++++++ 9 files changed, 323 insertions(+) create mode 100644 .gitea/workflows/docker-build.yaml create mode 100644 .gitignore create mode 100644 .postmate/collections/Donetick API.json create mode 100644 .postmate/postmate-history.json create mode 100644 .postmate/postmateHeader.json create mode 100644 Dockerfile create mode 100644 Start-DoneTickNotifier.ps1 create mode 100644 docker-compose.yaml create mode 100644 ref/chore-schema.json diff --git a/.gitea/workflows/docker-build.yaml b/.gitea/workflows/docker-build.yaml new file mode 100644 index 0000000..3343317 --- /dev/null +++ b/.gitea/workflows/docker-build.yaml @@ -0,0 +1,69 @@ +name: Build and Push Docker Image + +on: + push: + branches: + - "**" + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Compute image tag + id: tag + run: | + BRANCH="${{ gitea.ref_name }}" + + if [ "$BRANCH" = "main" ]; then + TAG="latest" + elif [[ "$BRANCH" == v* ]]; then + TAG="$BRANCH" + else + TAG="test" + fi + + echo "tag=$TAG" >> $GITHUB_OUTPUT + + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: blinkfink182/donetick-notifier:${{ steps.tag.outputs.tag }} + + - name: Notify Apprise (success) + if: success() + run: | + curl -X POST \ + -H "Content-Type: application/json" \ + -d "{ + \"tags\": \"all\", + \"title\": \"Gitea Build Succeeded\", + \"body\": \"Repo: ${{ gitea.repository }}\\nBranch: ${{ gitea.ref_name }}\\nImage tag built successfully\" + }" \ + REMOVED_URL + + - name: Notify Apprise (failure) + if: failure() + run: | + curl -X POST \ + -H "Content-Type: application/json" \ + -d "{ + \"tags\": \"all\", + \"title\": \"Gitea Build Failed\", + \"body\": \"Repo: ${{ gitea.repository }}\\nBranch: ${{ gitea.ref_name }}\\nCheck logs in Gitea\" + }" \ + REMOVED_URL \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c5b4966 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.postmate/postmate-envs.json +.vscode/launch.json +.env.ps1 +debug.ps1 diff --git a/.postmate/collections/Donetick API.json b/.postmate/collections/Donetick API.json new file mode 100644 index 0000000..9b73cdb --- /dev/null +++ b/.postmate/collections/Donetick API.json @@ -0,0 +1,38 @@ +{ + "id": "7214af45-3f3b-4b7b-a9b7-ef6dbca83ab5", + "collectionName": "Donetick API", + "creatredOn": "2026-05-06T22:35:56.440Z", + "folders": [], + "requests": [ + { + "id": "2ca9a16c-8b4d-4620-8466-15daa317f7ad", + "collectionId": "7214af45-3f3b-4b7b-a9b7-ef6dbca83ab5", + "containerId": "7214af45-3f3b-4b7b-a9b7-ef6dbca83ab5", + "collectionName": "Donetick API", + "name": "Get Chores", + "url": "https://todo.ktr32.org/eapi/v1/chore", + "method": "GET", + "headers": { + "accept": "*/*", + "user-agent": "https://postmateclient.com", + "secretkey": "REMOVED_API_KEY" + }, + "body": { + "json": {} + }, + "tests": [], + "bodyFromat": "json", + "testScript": "", + "bodyFormat": "json", + "preRequestScript": "", + "preRequests": [], + "auth": { + "type": "apikey", + "key": "secretkey", + "value": "{{secretkey}}", + "addTo": "header" + }, + "cookies": [] + } + ] +} \ No newline at end of file diff --git a/.postmate/postmate-history.json b/.postmate/postmate-history.json new file mode 100644 index 0000000..b28fd15 --- /dev/null +++ b/.postmate/postmate-history.json @@ -0,0 +1,29 @@ +[ + { + "url": "https://todo.ktr32.org/eapi/v1/chore", + "method": "GET", + "headers": { + "accept": "*/*", + "user-agent": "https://postmateclient.com", + "secretkey": "REMOVED_API_KEY" + }, + "tests": [], + "preRequestScript": "", + "testScript": "", + "id": "2ca9a16c-8b4d-4620-8466-15daa317f7ad", + "name": "Get Chores", + "collectionId": "7214af45-3f3b-4b7b-a9b7-ef6dbca83ab5", + "containerId": "7214af45-3f3b-4b7b-a9b7-ef6dbca83ab5", + "collectionName": "Donetick API", + "bodyFormat": "json", + "preRequests": [], + "auth": { + "type": "apikey", + "key": "secretkey", + "value": "{{secretkey}}", + "addTo": "header" + }, + "cookies": [], + "timestamp": 1778107167278 + } +] \ No newline at end of file diff --git a/.postmate/postmateHeader.json b/.postmate/postmateHeader.json new file mode 100644 index 0000000..cd1cb84 --- /dev/null +++ b/.postmate/postmateHeader.json @@ -0,0 +1,7 @@ +[ + { + "key": "content-type", + "value": "application/json", + "default": false + } +] \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d9685ac --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM mcr.microsoft.com/powershell + +WORKDIR /data +ADD ["Start-DoneTickNotifier.ps1", "/data/"] + +ENTRYPOINT ["pwsh", "-Command", "/data/Start-DoneTickNotifier.ps1"] \ No newline at end of file diff --git a/Start-DoneTickNotifier.ps1 b/Start-DoneTickNotifier.ps1 new file mode 100644 index 0000000..72f7d28 --- /dev/null +++ b/Start-DoneTickNotifier.ps1 @@ -0,0 +1,6 @@ +[string] $dtHost = $ENV:DONETICKHOST +[string] $dtPort = $ENV:DONETICKPORT +[string] $dtAPIKey = $ENV:DONETICKAPIKEY +[string] $appriseWebhookURL = $ENV:APPRISEWEBHOOKURL +[string] $appriseWebhookTag = $ENV:APPRISEWEBHOOKTAG + diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..ef401c0 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,12 @@ +# SAMPLE DOCKER COMPOSE +services: + donetick-notifier: + container_name: donetick-notifier + image: docker.io/blinkfink182/donetick-notifier + environment: + # BELOW ARE ALL REQUIRED + - DONETICKHOST=host.docker.internal # donetick host + - DONETICKPORT=8787 # donetick port + - DONETICKAPIKEY=adminpass # donetick API key + - APPRISEWEBHOOKURL=https://apprisehost/notify/config # apprise notification url + - APPRISEWEBHOOKTAG=all # apprise notification tag \ No newline at end of file diff --git a/ref/chore-schema.json b/ref/chore-schema.json new file mode 100644 index 0000000..3d492bf --- /dev/null +++ b/ref/chore-schema.json @@ -0,0 +1,152 @@ +{ + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "frequencyType": { + "type": "string" + }, + "frequency": { + "type": "integer" + }, + "frequencyMetadata": { + "type": "object", + "properties": { + "unit": { + "type": "string" + }, + "time": { + "type": "string" + }, + "timezone": { + "type": "string" + }, + "weekPattern": { + "type": "string" + } + }, + "required": [ + "unit", + "time", + "timezone", + "weekPattern" + ] + }, + "nextDueDate": { + "type": [ + "null", + "string" + ] + }, + "isRolling": { + "type": "boolean" + }, + "assignedTo": { + "type": [ + "integer", + "null" + ] + }, + "assignees": { + "type": "array" + }, + "assignStrategy": { + "type": "string" + }, + "isActive": { + "type": "boolean" + }, + "notification": { + "type": "boolean" + }, + "notificationMetadata": { + "type": "object", + "properties": { + "templates": { + "type": "array" + } + }, + "required": [ + "templates" + ] + }, + "labels": { + "type": "null" + }, + "labelsV2": { + "type": "array" + }, + "circleId": { + "type": "integer" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "createdBy": { + "type": "integer" + }, + "updatedBy": { + "type": "integer" + }, + "thingChore": { + "type": "null" + }, + "status": { + "type": "integer" + }, + "priority": { + "type": "integer" + }, + "description": { + "type": "string" + }, + "requireApproval": { + "type": "boolean" + }, + "isPrivate": { + "type": "boolean" + }, + "completionWindow": { + "type": "integer" + } + }, + "required": [ + "id", + "name", + "frequencyType", + "frequency", + "frequencyMetadata", + "nextDueDate", + "isRolling", + "assignedTo", + "assignees", + "assignStrategy", + "isActive", + "notification", + "notificationMetadata", + "labels", + "labelsV2", + "circleId", + "createdAt", + "updatedAt", + "createdBy", + "updatedBy", + "thingChore", + "status", + "priority", + "description", + "requireApproval", + "isPrivate", + "completionWindow" + ] + } +} \ No newline at end of file From 6658043fcc74536313affc7ee4972fa03b4a9e1e Mon Sep 17 00:00:00 2001 From: Kelly Thomas Reardon Date: Wed, 6 May 2026 22:50:23 -0500 Subject: [PATCH 02/12] first mvp --- .gitignore | 1 + Start-DoneTickNotifier.ps1 | 70 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) diff --git a/.gitignore b/.gitignore index c5b4966..f863632 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ .vscode/launch.json .env.ps1 debug.ps1 +.postmate/postmate-history.json diff --git a/Start-DoneTickNotifier.ps1 b/Start-DoneTickNotifier.ps1 index 72f7d28..b14584f 100644 --- a/Start-DoneTickNotifier.ps1 +++ b/Start-DoneTickNotifier.ps1 @@ -4,3 +4,73 @@ [string] $appriseWebhookURL = $ENV:APPRISEWEBHOOKURL [string] $appriseWebhookTag = $ENV:APPRISEWEBHOOKTAG + +function Send-Notification +{ + param( + # Title of the notification + [Parameter(Mandatory=$true)] + [string] + $title, + + # Content of the notification + [Parameter(Mandatory=$true)] + [string] + $content + ) + + $headers = @{ + "Content-Type"="application/json" + } + $body = @{ + title=$title + body=$content + tags="$appriseWebhookTag" + } + $json = $body | ConvertTo-Json + try { + Invoke-WebRequest -URI $appriseWebhookURL -Method post -Body $json -Headers $headers + } + catch { + Write-Host "Notification Error Encountered: $($global:Error[0])" + } +} + +function Get-Chores +{ + try { + $headers = @{ + secretkey = $dtAPIKey + } + $results = Invoke-WebRequest -Uri "https://$dtHost`:$dtPort/eapi/v1/chore" -Method Get -Headers $headers + return ($results.Content | ConvertFrom-Json) + } + catch { + Write-Error "Error fetching chores: $($global:Error[0])" + } +} + +$today = (Get-Date "23:59:59") +$chores = Get-Chores + +foreach($chore in $chores) +{ + if ($chore.nextDueDate) + { + $dueDate = Get-Date $chore.nextDueDate + if (($dueDate - $today).Days -lt 0) #OVERDUE + { + write-host "$($chore.name) $dueDate is overdue!" + Send-Notification -title "OVERDUE TASK" -content "$($chore.Name) is overdue! Due date is $($chore.nextDueDate)" + } + elseif (($dueDate - $today) -lt 1) #due today + { + write-host "$($chore.name) $dueDate is due today!" + Send-Notification -title "TASK DUE TODAY" -content "$($chore.Name) is due today!" + } + else + { + write-host "$($chore.name) $dueDate is due in the future" + } + } +} \ No newline at end of file From 1472501a1f552b55513d11cbd47dc2df39a78662 Mon Sep 17 00:00:00 2001 From: Kelly Thomas Reardon Date: Thu, 7 May 2026 16:49:14 -0500 Subject: [PATCH 03/12] grouped notifications into a single notification instead of one per task --- Start-DoneTickNotifier.ps1 | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/Start-DoneTickNotifier.ps1 b/Start-DoneTickNotifier.ps1 index b14584f..b01f14d 100644 --- a/Start-DoneTickNotifier.ps1 +++ b/Start-DoneTickNotifier.ps1 @@ -53,6 +53,9 @@ function Get-Chores $today = (Get-Date "23:59:59") $chores = Get-Chores +$overdueTasks = @() +$todaysTasks = @() + foreach($chore in $chores) { if ($chore.nextDueDate) @@ -61,16 +64,40 @@ foreach($chore in $chores) if (($dueDate - $today).Days -lt 0) #OVERDUE { write-host "$($chore.name) $dueDate is overdue!" - Send-Notification -title "OVERDUE TASK" -content "$($chore.Name) is overdue! Due date is $($chore.nextDueDate)" + $overdueTasks += $chore } elseif (($dueDate - $today) -lt 1) #due today { write-host "$($chore.name) $dueDate is due today!" - Send-Notification -title "TASK DUE TODAY" -content "$($chore.Name) is due today!" + $todaysTasks += $chore + # Send-Notification -title "TASK DUE TODAY" -content "$($chore.Name) is due today!" } else { write-host "$($chore.name) $dueDate is due in the future" } } + +} + +if ($overdueTasks.Count -ne 0) +{ + Write-Host "Sending a notification for $($overdueTasks.Count) overdue tasks" + $content = "The following tasks are overdue!\n" + foreach($overdueTask in $overdueTasks) + { + $content += "$($overdueTask.Name) was due $($overdueTask.nextDueDate)\n" + } + Send-Notification -title "OVERDUE TASKS" -content $content +} + +if ($todaysTasks.Count -ne 0) +{ + Write-Host "Sending a notification for $($todaysTasks.Count) tasks due today" + $content = "The following tasks are due today!\n" + foreach($task in $todaysTasks) + { + $content += "$($task.Name) is due $($task.nextDueDate)\n" + } + Send-Notification -title "TODAY'S TASKS" -content $content } \ No newline at end of file From 84f1360f6996bef6ce052403ef73e63edcdb42a5 Mon Sep 17 00:00:00 2001 From: Kelly Thomas Reardon Date: Thu, 7 May 2026 16:53:40 -0500 Subject: [PATCH 04/12] corrected newline escape character and enforced datetime format --- Start-DoneTickNotifier.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Start-DoneTickNotifier.ps1 b/Start-DoneTickNotifier.ps1 index b01f14d..655cc2b 100644 --- a/Start-DoneTickNotifier.ps1 +++ b/Start-DoneTickNotifier.ps1 @@ -83,10 +83,10 @@ foreach($chore in $chores) if ($overdueTasks.Count -ne 0) { Write-Host "Sending a notification for $($overdueTasks.Count) overdue tasks" - $content = "The following tasks are overdue!\n" + $content = "The following tasks are overdue!/n" foreach($overdueTask in $overdueTasks) { - $content += "$($overdueTask.Name) was due $($overdueTask.nextDueDate)\n" + $content += "$($overdueTask.Name) was due $(Get-Date $overdueTask.nextDueDate -Format "MM/dd/yyyy HH:mm")/n" } Send-Notification -title "OVERDUE TASKS" -content $content } @@ -94,10 +94,10 @@ if ($overdueTasks.Count -ne 0) if ($todaysTasks.Count -ne 0) { Write-Host "Sending a notification for $($todaysTasks.Count) tasks due today" - $content = "The following tasks are due today!\n" + $content = "The following tasks are due today!/n" foreach($task in $todaysTasks) { - $content += "$($task.Name) is due $($task.nextDueDate)\n" + $content += "$($task.Name) is due $(Get-Date $task.nextDueDate -Format "MM/dd/yyyy HH:mm")/n" } Send-Notification -title "TODAY'S TASKS" -content $content } \ No newline at end of file From 1957e17680e73c862993628608a5d80b5d66ea03 Mon Sep 17 00:00:00 2001 From: Kelly Thomas Reardon Date: Thu, 7 May 2026 17:03:27 -0500 Subject: [PATCH 05/12] fighting escapes --- Start-DoneTickNotifier.ps1 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Start-DoneTickNotifier.ps1 b/Start-DoneTickNotifier.ps1 index 655cc2b..2d2d8ac 100644 --- a/Start-DoneTickNotifier.ps1 +++ b/Start-DoneTickNotifier.ps1 @@ -26,6 +26,7 @@ function Send-Notification title=$title body=$content tags="$appriseWebhookTag" + "interpret-escapes"=yes } $json = $body | ConvertTo-Json try { @@ -83,10 +84,10 @@ foreach($chore in $chores) if ($overdueTasks.Count -ne 0) { Write-Host "Sending a notification for $($overdueTasks.Count) overdue tasks" - $content = "The following tasks are overdue!/n" + $content = "The following tasks are overdue!\\n" foreach($overdueTask in $overdueTasks) { - $content += "$($overdueTask.Name) was due $(Get-Date $overdueTask.nextDueDate -Format "MM/dd/yyyy HH:mm")/n" + $content += "$($overdueTask.Name) was due $(Get-Date $overdueTask.nextDueDate -Format "MM/dd/yyyy HH:mm")\\n" } Send-Notification -title "OVERDUE TASKS" -content $content } @@ -94,10 +95,10 @@ if ($overdueTasks.Count -ne 0) if ($todaysTasks.Count -ne 0) { Write-Host "Sending a notification for $($todaysTasks.Count) tasks due today" - $content = "The following tasks are due today!/n" + $content = "The following tasks are due today!\\n" foreach($task in $todaysTasks) { - $content += "$($task.Name) is due $(Get-Date $task.nextDueDate -Format "MM/dd/yyyy HH:mm")/n" + $content += "$($task.Name) is due $(Get-Date $task.nextDueDate -Format "MM/dd/yyyy HH:mm")\\n" } Send-Notification -title "TODAY'S TASKS" -content $content } \ No newline at end of file From 8d37b966aeba46cda942a0e80ca28c45dfb35378 Mon Sep 17 00:00:00 2001 From: Kelly Thomas Reardon Date: Thu, 7 May 2026 21:37:09 -0500 Subject: [PATCH 06/12] changing escape to backtick for newlines --- Start-DoneTickNotifier.ps1 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Start-DoneTickNotifier.ps1 b/Start-DoneTickNotifier.ps1 index 2d2d8ac..4e8918e 100644 --- a/Start-DoneTickNotifier.ps1 +++ b/Start-DoneTickNotifier.ps1 @@ -26,7 +26,6 @@ function Send-Notification title=$title body=$content tags="$appriseWebhookTag" - "interpret-escapes"=yes } $json = $body | ConvertTo-Json try { @@ -84,10 +83,10 @@ foreach($chore in $chores) if ($overdueTasks.Count -ne 0) { Write-Host "Sending a notification for $($overdueTasks.Count) overdue tasks" - $content = "The following tasks are overdue!\\n" + $content = "The following tasks are overdue!`n" foreach($overdueTask in $overdueTasks) { - $content += "$($overdueTask.Name) was due $(Get-Date $overdueTask.nextDueDate -Format "MM/dd/yyyy HH:mm")\\n" + $content += "$($overdueTask.Name) was due $(Get-Date $overdueTask.nextDueDate -Format "MM/dd/yyyy HH:mm")`n" } Send-Notification -title "OVERDUE TASKS" -content $content } @@ -95,10 +94,10 @@ if ($overdueTasks.Count -ne 0) if ($todaysTasks.Count -ne 0) { Write-Host "Sending a notification for $($todaysTasks.Count) tasks due today" - $content = "The following tasks are due today!\\n" + $content = "The following tasks are due today!`n" foreach($task in $todaysTasks) { - $content += "$($task.Name) is due $(Get-Date $task.nextDueDate -Format "MM/dd/yyyy HH:mm")\\n" + $content += "$($task.Name) is due $(Get-Date $task.nextDueDate -Format "MM/dd/yyyy HH:mm")`n" } Send-Notification -title "TODAY'S TASKS" -content $content } \ No newline at end of file From 5cc265583dfc46dd16910e77f83fd26dd89e3318 Mon Sep 17 00:00:00 2001 From: Kelly Thomas Reardon Date: Sun, 10 May 2026 22:34:59 -0500 Subject: [PATCH 07/12] updating dockerfile for best practices --- .gitea/workflows/docker-build.yaml | 14 ++++++++++++++ .vscode/settings.json | 3 +++ Dockerfile | 4 +++- 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 .vscode/settings.json diff --git a/.gitea/workflows/docker-build.yaml b/.gitea/workflows/docker-build.yaml index 3343317..7b006de 100644 --- a/.gitea/workflows/docker-build.yaml +++ b/.gitea/workflows/docker-build.yaml @@ -13,6 +13,20 @@ jobs: - name: Checkout uses: actions/checkout@v4 + # - name: Run Trivy vulnerability scanner in repo mode + # uses: aquasecurity/trivy-action@v0.36.0 + # with: + # scan-type: 'fs' + # ignore-unfixed: true + # format: 'sarif' + # output: 'trivy-results.sarif' + # severity: 'CRITICAL' + + # - name: Upload Trivy scan results to GitHub Security tab + # uses: github/codeql-action/upload-sarif@v4 + # with: + # sarif_file: 'trivy-results.sarif' + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..e106e53 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "trivy.secretScanning": true +} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index d9685ac..bed4acb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,8 @@ FROM mcr.microsoft.com/powershell +USER 1000:1000 + WORKDIR /data -ADD ["Start-DoneTickNotifier.ps1", "/data/"] +COPY ["Start-DoneTickNotifier.ps1", "/data/"] ENTRYPOINT ["pwsh", "-Command", "/data/Start-DoneTickNotifier.ps1"] \ No newline at end of file From 27e31ac2a0ba8abcf4a34a7a1e6bcce59bf9fd31 Mon Sep 17 00:00:00 2001 From: Kelly Thomas Reardon Date: Mon, 11 May 2026 06:16:59 -0500 Subject: [PATCH 08/12] updated api call to use variables --- .gitignore | 1 + .postmate/collections/Donetick API.json | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f863632..64d45fe 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ .env.ps1 debug.ps1 .postmate/postmate-history.json +.postmate/postmate-envs.json \ No newline at end of file diff --git a/.postmate/collections/Donetick API.json b/.postmate/collections/Donetick API.json index 9b73cdb..707ae52 100644 --- a/.postmate/collections/Donetick API.json +++ b/.postmate/collections/Donetick API.json @@ -32,7 +32,8 @@ "value": "{{secretkey}}", "addTo": "header" }, - "cookies": [] + "cookies": [], + "dataTags": [] } ] } \ No newline at end of file From 4d3421949e7951a5ce4cda0e7ee1a3ce1f8015e7 Mon Sep 17 00:00:00 2001 From: kelly Date: Mon, 11 May 2026 16:42:23 -0500 Subject: [PATCH 09/12] Delete .postmate/postmate-history.json --- .postmate/postmate-history.json | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 .postmate/postmate-history.json diff --git a/.postmate/postmate-history.json b/.postmate/postmate-history.json deleted file mode 100644 index b28fd15..0000000 --- a/.postmate/postmate-history.json +++ /dev/null @@ -1,29 +0,0 @@ -[ - { - "url": "https://todo.ktr32.org/eapi/v1/chore", - "method": "GET", - "headers": { - "accept": "*/*", - "user-agent": "https://postmateclient.com", - "secretkey": "REMOVED_API_KEY" - }, - "tests": [], - "preRequestScript": "", - "testScript": "", - "id": "2ca9a16c-8b4d-4620-8466-15daa317f7ad", - "name": "Get Chores", - "collectionId": "7214af45-3f3b-4b7b-a9b7-ef6dbca83ab5", - "containerId": "7214af45-3f3b-4b7b-a9b7-ef6dbca83ab5", - "collectionName": "Donetick API", - "bodyFormat": "json", - "preRequests": [], - "auth": { - "type": "apikey", - "key": "secretkey", - "value": "{{secretkey}}", - "addTo": "header" - }, - "cookies": [], - "timestamp": 1778107167278 - } -] \ No newline at end of file From 0d7842da4e30fca5b717b8b2ce79a9c506ecf090 Mon Sep 17 00:00:00 2001 From: Kelly Thomas Reardon Date: Mon, 11 May 2026 16:43:50 -0500 Subject: [PATCH 10/12] correcting gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 64d45fe..9daf30a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,4 @@ .env.ps1 debug.ps1 .postmate/postmate-history.json -.postmate/postmate-envs.json \ No newline at end of file +.postmate/postmate-envs.json From 0a5268d18b410e1969ca7c0d654f22bffe0ce4c6 Mon Sep 17 00:00:00 2001 From: Kelly Thomas Reardon Date: Mon, 11 May 2026 16:52:34 -0500 Subject: [PATCH 11/12] updating build to use secret for notification url --- .gitea/workflows/docker-build.yaml | 4 +-- .postmate/collections/Donetick API.json | 39 ------------------------- .postmate/postmateHeader.json | 7 ----- 3 files changed, 2 insertions(+), 48 deletions(-) delete mode 100644 .postmate/collections/Donetick API.json delete mode 100644 .postmate/postmateHeader.json diff --git a/.gitea/workflows/docker-build.yaml b/.gitea/workflows/docker-build.yaml index 7b006de..0bbd5cf 100644 --- a/.gitea/workflows/docker-build.yaml +++ b/.gitea/workflows/docker-build.yaml @@ -68,7 +68,7 @@ jobs: \"title\": \"Gitea Build Succeeded\", \"body\": \"Repo: ${{ gitea.repository }}\\nBranch: ${{ gitea.ref_name }}\\nImage tag built successfully\" }" \ - REMOVED_URL + ${{ secrets.APPRISE_URL }} - name: Notify Apprise (failure) if: failure() @@ -80,4 +80,4 @@ jobs: \"title\": \"Gitea Build Failed\", \"body\": \"Repo: ${{ gitea.repository }}\\nBranch: ${{ gitea.ref_name }}\\nCheck logs in Gitea\" }" \ - REMOVED_URL \ No newline at end of file + ${{ secrets.APPRISE_URL }} \ No newline at end of file diff --git a/.postmate/collections/Donetick API.json b/.postmate/collections/Donetick API.json deleted file mode 100644 index 707ae52..0000000 --- a/.postmate/collections/Donetick API.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "id": "7214af45-3f3b-4b7b-a9b7-ef6dbca83ab5", - "collectionName": "Donetick API", - "creatredOn": "2026-05-06T22:35:56.440Z", - "folders": [], - "requests": [ - { - "id": "2ca9a16c-8b4d-4620-8466-15daa317f7ad", - "collectionId": "7214af45-3f3b-4b7b-a9b7-ef6dbca83ab5", - "containerId": "7214af45-3f3b-4b7b-a9b7-ef6dbca83ab5", - "collectionName": "Donetick API", - "name": "Get Chores", - "url": "https://todo.ktr32.org/eapi/v1/chore", - "method": "GET", - "headers": { - "accept": "*/*", - "user-agent": "https://postmateclient.com", - "secretkey": "REMOVED_API_KEY" - }, - "body": { - "json": {} - }, - "tests": [], - "bodyFromat": "json", - "testScript": "", - "bodyFormat": "json", - "preRequestScript": "", - "preRequests": [], - "auth": { - "type": "apikey", - "key": "secretkey", - "value": "{{secretkey}}", - "addTo": "header" - }, - "cookies": [], - "dataTags": [] - } - ] -} \ No newline at end of file diff --git a/.postmate/postmateHeader.json b/.postmate/postmateHeader.json deleted file mode 100644 index cd1cb84..0000000 --- a/.postmate/postmateHeader.json +++ /dev/null @@ -1,7 +0,0 @@ -[ - { - "key": "content-type", - "value": "application/json", - "default": false - } -] \ No newline at end of file From ed122d1fee14fef45431732d653bc291e84a85e5 Mon Sep 17 00:00:00 2001 From: Kelly Thomas Reardon Date: Mon, 11 May 2026 17:15:08 -0500 Subject: [PATCH 12/12] migrated api handling to missio for security --- Donetick/get-chore.yml | 20 ++++++++++++++++++++ Donetick/opencollection.yml | 13 +++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 Donetick/get-chore.yml create mode 100644 Donetick/opencollection.yml diff --git a/Donetick/get-chore.yml b/Donetick/get-chore.yml new file mode 100644 index 0000000..dcfb225 --- /dev/null +++ b/Donetick/get-chore.yml @@ -0,0 +1,20 @@ +info: + name: Get-Chore + type: http + seq: 1 +http: + method: GET + url: "{{baseUrl}}/eapi/v1/chore" + headers: [] + params: [] +settings: + encodeUrl: true + timeout: 30000 + followRedirects: true + maxRedirects: 5 +runtime: + auth: + type: apikey + key: secretkey + value: "{{secretkey}}" + placement: header diff --git a/Donetick/opencollection.yml b/Donetick/opencollection.yml new file mode 100644 index 0000000..8e0e4d6 --- /dev/null +++ b/Donetick/opencollection.yml @@ -0,0 +1,13 @@ +opencollection: 1.0.0 +info: + name: Donetick + version: 1.0.0 +config: + environments: + - name: Production + variables: + - name: baseUrl + value: https://todo.ktr32.org + - name: secretkey + secret: true +items: []