grokkit/.gitea/workflows/auto-complete-todo.yml
Greg Gauthier 6e3a52728e
All checks were successful
CI / Test (push) Successful in 30s
CI / Lint (push) Successful in 26s
CI / Build (push) Successful in 20s
chore(todo): complete feature suggestions TODO and queue individual tasks
- Update CI workflow runner from ubuntu-latest to ubuntu-gitea for auto-complete-todo.
- Move 3-new-feature-suggestions.md to completed/.
- Create queued TODOs for testgen, changelog, and profile features.
2026-03-02 19:33:34 +00:00

37 lines
1.4 KiB
YAML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: 'Auto-complete TODO'
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
move-todo:
runs-on: ubuntu-gitea
steps:
- name: 'Clone PR branch, move TODO, push update'
env:
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
SERVER_URL: ${{ github.server_url }}
REPO_OWNER: ${{ github.repository_owner }}
REPO_NAME: ${{ github.event.pull_request.head.repo.name }}
PR_BRANCH: ${{ github.head_ref }}
run: |
git clone https://${PAT_TOKEN}@${SERVER_URL}/${REPO_OWNER}/${REPO_NAME}.git pr-temp || exit 1
cd pr-temp
git checkout ${PR_BRANCH}
BRANCH=$(git rev-parse --abbrev-ref HEAD)
TODO_NAME="${BRANCH#feature/}.md"
if [[ "${BRANCH}" == feature/* && -f todo/queued/${TODO_NAME} ]]; then
mkdir -p todo/completed
mv todo/queued/${TODO_NAME} todo/completed/
git config user.name 'Gitea Actions Bot'
git config user.email 'actions@noreply.local'
git add todo/
git commit -m "chore: auto-complete ${TODO_NAME} via Gitea Actions"
git push https://${PAT_TOKEN}@${SERVER_URL}/${REPO_OWNER}/${REPO_NAME}.git ${PR_BRANCH}
echo "✅ Moved todo/queued/${TODO_NAME} → completed/"
else
echo " No action: branch='${BRANCH}', expected 'feature/*' with todo/queued/${TODO_NAME}"
fi
cd ..
rm -rf pr-temp