--- name: gitea-push-watch description: Monitor and debug Gitea Actions after a push. Use when a user asks to check if an action ran or failed on a Gitea instance, and use the provided API token for authentication. --- # Gitea Push Watch This skill provides tools to monitor Gitea Actions and debug failures using the Gitea API. ## Workflow 1. **Identify Repository Info**: Extract the Gitea server URL and repository path (e.g., `owner/repo`) from the project context or git remote. 2. **Authenticate**: Use the user-provided API token. Ensure it is passed as a `token ` header in API calls. 3. **Monitor Run**: Use the `scripts/gitea_action_monitor.py` script to check the status of the latest run. 4. **Analyze Failures**: If a run fails, use the Gitea API to fetch specific job logs to identify the root cause (e.g., permission issues, network errors). ## Script Usage ```bash python3 scripts/gitea_action_monitor.py ``` Example: ```bash python3 scripts/gitea_action_monitor.py https://gitea.example.com sstent/my-repo MY_TOKEN ``` ## Common Gitea API Endpoints - List runs: `GET /api/v1/repos/{owner}/{repo}/actions/runs` - Get run details: `GET /api/v1/repos/{owner}/{repo}/actions/runs/{id}` - List jobs: `GET /api/v1/repos/{owner}/{repo}/actions/runs/{id}/jobs`