Skip to content

DRAFT: Ensure agent PR flow honors Forgejo provider and tokens#3

Draft
MrGeorgen wants to merge 2 commits intofeat/forgejo-ui-env-protocolfrom
fix/forgejo-pr-token-awareness
Draft

DRAFT: Ensure agent PR flow honors Forgejo provider and tokens#3
MrGeorgen wants to merge 2 commits intofeat/forgejo-ui-env-protocolfrom
fix/forgejo-pr-token-awareness

Conversation

@MrGeorgen
Copy link
Copy Markdown
Owner

Summary

  • Update resolver conversation instruction prompts to explicitly require using the configured git provider end-to-end
  • Instruct the agent to use provider-specific token env vars: $github_token, $gitlab_token, $bitbucket_token, $forgejo_token, $azure_devops_token
  • Warn explicitly not to default to GitHub when another provider is selected
  • Clarify that for Forgejo instances, the agent should use the configured host/base domain and Forgejo APIs (not GitHub endpoints)

Files changed

  • openhands/resolver/prompts/resolve/basic-conversation-instructions.jinja
  • openhands/resolver/prompts/resolve/basic-with-tests-conversation-instructions.jinja
  • openhands/resolver/prompts/resolve/basic-followup-conversation-instructions.jinja

Rationale

  • Addresses reports where PR creation “thinks” there is no Forgejo token unless the user explicitly tells it
  • Makes the intent unambiguous for provider choice and token env vars during agent reasoning/execution

Testing

  • Validate that PR creation on Forgejo repos no longer defaults to GitHub
  • Confirm that environment variable exposure includes $forgejo_token when configured and that agent instructions align with it

Co-authored-by: openhands openhands@all-hands.dev

… use provider-specific tokens (incl. Forgejo)\n\nPrevents unintended GitHub fallback during PR creation by explicitly guiding the agent to use and Forgejo APIs when Forgejo is selected.\n\nCo-authored-by: openhands <openhands@all-hands.dev>
… task token mapping (FORGEJO_TOKEN)\n\n- New templates: integrations/templates/resolver/forgejo/* (issue & PR instruction/prompt)\n- Suggested tasks now map Forgejo to FORGEJO_TOKEN and Forgejo API terms\n\nCo-authored-by: openhands <openhands@all-hands.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants