SourceHut Integration¶
DejaCode’s integration with SourceHut allows you to automatically forward Workflow Requests to SourceHut tickets. This behavior can be selectively applied to any Request Template of your choice.
Prerequisites¶
A SourceHut project hosted on https://todo.sr.ht that you want to integrate with DejaCode.
A SourceHut account with API access and permission to create/edit tickets.
SourceHut API Token¶
To enable integration, you need a SourceHut API token.
Create a Token:
Under Personal Access Tokens, click “Generate new token”
Set a clear description like
DejaCode Integrationin the “Comment” fieldSelect both the
todo.sr.ht>TRACKERSANDTICKETSscopesGenerate token and copy the entire token string
Note
It is recommended to create a dedicated SourceHut user with a clear, descriptive
name such as dejacode-integration. This ensures that all SourceHut issues
managed by integration are clearly attributed to that user, improving traceability
and auditability.
DejaCode Dataspace Configuration¶
To use your SourceHut token in DejaCode:
Go to the Administration dashboard
Navigate to Dataspaces, and select your Dataspace
Scroll to the SourceHut Integration section under Configuration
Paste your SourceHut token in the SourceHut token field
Save the form
Activate SourceHut Integration on Request Templates¶
Go to the Administration dashboard
Navigate to Workflow > Request templates
Create or edit a Request Template in your Dataspace
Set the Issue Tracker ID field to your SourceHut project URL, e.g.:
https://todo.sr.ht/~USERNAME/PROJECT_NAME
Once the integration is configured:
New Requests using this template will be automatically pushed to SourceHut
Field updates (like title or priority) and status changes (e.g. closed) will be synced
New Comments on a DejaCode Request will be propagated to the SourceHut ticket