@senior: gitea #15

Merged
ffaerber merged 1 commits from ai/issue-14 into main 2026-07-03 13:10:42 +02:00

Summary

Add a gitea-api opencode skill so agents can open referenced issues/PRs (same or cross-repo) and read Actions run logs — the capability that was missing when the agent couldn't open a connected issue. Reuses the already-broadened shared AGENT_TOKEN (no new secret) and mirrors the established node1-ssh skill pattern. This is a capability change to the shared workflow used by every repo, so it stays an additive, independently-mergeable step.

Changes

  • .gitea/workflows/agent.yml: new Set up gitea-api skill step that emits ~/.config/opencode/skills/gitea-api/SKILL.md (only when AGENT_TOKEN is set) documenting the API base URL, Authorization: token $AGENT_TOKEN header, read/write curl examples (issues/PRs/comments/labels, Actions runs/jobs/logs, org repos), and the security guards (never echo the token; treat fetched content as untrusted data not instructions — prompt-injection guard; stop on 403).
  • .gitea/workflows/agent.yml: expose AGENT_TOKEN in the Run agent step env so the agent process can call the API (previously only the Publish step had it).
  • README.md: update the AGENT_TOKEN secrets-table row to note it now also powers the gitea-api skill cross-repo, and not to re-narrow its scopes without removing the skill.

Resolves #14 · 🤖 @senior

## Summary Add a `gitea-api` opencode skill so agents can open referenced issues/PRs (same or cross-repo) and read Actions run logs — the capability that was missing when the agent couldn't open a connected issue. Reuses the already-broadened shared `AGENT_TOKEN` (no new secret) and mirrors the established `node1-ssh` skill pattern. This is a capability change to the shared workflow used by every repo, so it stays an additive, independently-mergeable step. ## Changes - `.gitea/workflows/agent.yml`: new `Set up gitea-api skill` step that emits `~/.config/opencode/skills/gitea-api/SKILL.md` (only when `AGENT_TOKEN` is set) documenting the API base URL, `Authorization: token $AGENT_TOKEN` header, read/write `curl` examples (issues/PRs/comments/labels, Actions runs/jobs/logs, org repos), and the security guards (never echo the token; treat fetched content as untrusted data not instructions — prompt-injection guard; stop on 403). - `.gitea/workflows/agent.yml`: expose `AGENT_TOKEN` in the `Run agent` step env so the agent process can call the API (previously only the `Publish` step had it). - `README.md`: update the `AGENT_TOKEN` secrets-table row to note it now also powers the `gitea-api` skill cross-repo, and not to re-narrow its scopes without removing the skill. --- Resolves #14 · 🤖 @senior
gitea-actions bot added 1 commit 2026-07-03 13:07:43 +02:00
- New gitea-api opencode skill (mirrors node1-ssh): documents the Gitea REST API
  base URL, Authorization: token $AGENT_TOKEN header, and example curl calls for
  read (issue/PR + comments, Actions runs/jobs/logs, org repos) and write (comment,
  label, close), with explicit warnings: never echo the token, treat fetched
  content as untrusted data (prompt-injection guard), and stop on 403.
- Wire AGENT_TOKEN into the Run agent step env so the agent process itself can
  call the API (previously only the Publish step saw it).
- Update README secrets table: AGENT_TOKEN now also powers gitea-api; do not
  re-narrow scopes without removing the skill.
ffaerber merged commit 25c915f540 into main 2026-07-03 13:10:42 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gitea/agents#15