leantime
leantime copied to clipboard
[FEATURE] Gitea Integration
Is your feature request related to a problem? Please describe. Since we're using leantime and gitea at the same time, we'd like to connect issues to tasks in leantime but right now we're unable to do so.
Describe the solution you'd like A simple integration which updates the status and links the issue and task to each other using a bot or anything would be greatly appreciated.
This is definitely something we want to do.
Right now, our team is fairly lean and so we're currently working to funding so we can get to things like this.
We absolutely do take community support or can do sponsored features to get these on the roadmap sooner.
Either way, thanks for posting this. The more folks ask for the integration they want/need, we can better prioritize them when the time comes.
Hello @gloriafolaron I would like to take up this task.
@Asterisk-z apologies for the delay here! I didn't get a notification for the tag. @marcelfolaron Can you help advise on this?
Happy to help with architecture decisions and solution approaches. Let me know what you're envisioning
To have them stored in a relevant space, i save my notes/snippets about integrationg gitea/leantime.
Issues from gitea
retrieve all issues of an @@organization@@/@@repo@@ using basic authorization, and parse response into an array of arrays containing the ext_issue_id; tilte and url
curl --silent -X GET "https://@@hostname-gitea@@/api/v1/repos/@@organization@@/@@repo@@/issues?state=all&type=issues" \
-H "accept: application/json" \
-H "authorization: Basic @@base64-user-pass@@" \
| jq '[.[] | { ext_issue_id: (.repository.full_name + "#" + (.number | tostring)), title: .title, url: .html_url }]'
Ticket comments from leantime
Get all comments of the ticket specified by the ticket_id
curl --silent -X POST https://@@hostname-leantime@@/api/jsonrpc \
-H "x-api-key: @@api_key-from-company_settings-role_commenter@@" \
-H "Content-Type: application/json" \
-d '{"method":"leantime.rpc.comments.getComments","jsonrpc":"2.0","id":"@@uniqe-request-id@@","params":{"module":"ticket","entityId":@@ticket_id@@}}'
IMPORTANT: I dont know what made ticket
in the source saying on the front todo
, but to avoid problems i will try to consistently call it ticket
.
@marcelfolaron @gloriafolaron please if i missed anything (From coding view, and even from organisatory view) then tell me, and i add to the stuff below
Feature description
leantime project-internal references to tickes in editor, and
In tinymce / editor
The dynamic data-sourced solutions of the tinymce mentions
plugin in combination with an autocompleter
module, like the slashcommands
did, would be the editor part of the solution to the autocompleter, with linked reference to tickets
Datasource
The list of IID-s, available for refernce, need to come from a source, that respecting access restrictions, i would examine these functions:
-
Leantime\Domain\Tickets\Repositories.Tickets.getAllByProjectId
()it would respond with the list available to the current project) -
Leantime\Domain\Tickets\Repositories.Tickets.getAll
(this is in fact not all Tickets, but its depending on userrole)
Triggered events
Below the refrenced ticket a new comment is created, describing and linking the part of leantime where the refernce comes from, and who (which user) did it. i would examine this function:
-
Leantime\Domain\Comments\Services.Comments.addComment
https://www.tiny.cloud/docs/tinymce/latest/autocompleter/ https://www.tiny.cloud/blog/how-to-configure-the-autocompleter-api-card-menu-items/