Add API to set repository external issue tracker
chortels opened this issue · 7 comments
Hi,
Does the Gogs API offer the possibility of establishing the integration of a repository with a issue tracker, or doing manually is the only way of achieving this? I'd like to deploy a Gogs image in OpenShift and automating the creation of the issue tracker URL, but it seems that it is not possible. Am I wrong?
Hi,
establishing the integration of a repository with a issue tracker
automating the creation of the issue tracker URL
Can you explain more on these two sentences?
Hi,
Yes, I'll explain you in more detail:
I'd like to deploy in OpenShift a Gogs image that incorporates by default the integration with an issue tracker (JIRA, por example), so it wouldn't be necessary to establish it manually. So I wonder if it is possible to do it through an API request, in the same way that it is possible, for example, to create a repository (https://github.com/gogs/go-gogs-client/wiki/Repositories) using a CURL sentence and the API tool.
Regards.
Hi @unknwon . I see that you have labeled this issue as feature. Would you make an estimation about its date of release?
Thanks.
Hi @unknwon :
Related to this request, I have one question: is there any way to link a JIRA (or another external tracker) issue with a commit? For example, in the case of making a commit with a message that includes the reference to that issue (MY_ISSUE-XXX), would that commit reference appear in the issue? I have tested this feature using GitLab and JIRA, and it is explained here: https://docs.gitlab.com/ee/user/project/integrations/jira.html.
Regards.
@chortels I don't think so, external issue tracker is simple one-way URL redirecting.
New API added!
You should be able to edit repository issue tracker options as follows:
c.EditIssueTracker("username", "reponame", gogs.EditIssueTrackerOption{
EnableIssues: gogs.Bool(true),
EnableExternalTracker: gogs.Bool(true),
ExternalTrackerURL: gogs.String("http://www.example.com"),
})
You can test it on https://try.gogs.io, docs: https://github.com/gogs/go-gogs-client/wiki/Repositories#edit-issue-tracker