Closed
Description
Description
The external issue tracker regular expression feature isn't configurable via the Gitea API. Other aspects of the external issue tracker are configurable via the API, but the regexp pattern specifically is not.
Example:
curl -X 'PATCH' \
'https://try.gitea.io/api/v1/repos/andrewimeson/test_repo?token=redacted' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"external_tracker": {
"external_tracker_format": "https://jira.example.com/browse/LOL-{index}",
"external_tracker_style": "regexp",
"external_tracker_regexp_pattern": "LOL-(\\d+)",
"external_tracker_url": "https://jira.example.com/projects/LOL/issues"
},
"has_issues": true
}'
which responds with this JSON, which you can see is missing the external_tracker_regexp_pattern
field. The field name I guessed at, but if I set it in the web UI and then execute the API request again it still doesn't show the regex in the JSON response:
{
"id": 37590,
"owner": {
"id": 518534,
"login": "andrewimeson",
"login_name": "",
"full_name": "",
"email": "[email protected]",
"avatar_url": "https://try.gitea.io/avatar/fd2e41aec83c11fc97b9915fe441cb76",
"language": "",
"is_admin": false,
"last_login": "0001-01-01T00:00:00Z",
"created": "2022-10-04T19:23:51Z",
"restricted": false,
"active": false,
"prohibit_login": false,
"location": "",
"website": "",
"description": "",
"visibility": "public",
"followers_count": 0,
"following_count": 0,
"starred_repos_count": 0,
"username": "andrewimeson"
},
"name": "test_repo",
"full_name": "andrewimeson/test_repo",
"description": "",
"empty": true,
"private": false,
"fork": false,
"template": false,
"parent": null,
"mirror": false,
"size": 76,
"language": "",
"languages_url": "https://try.gitea.io/api/v1/repos/andrewimeson/test_repo/languages",
"html_url": "https://try.gitea.io/andrewimeson/test_repo",
"ssh_url": "[email protected]:andrewimeson/test_repo.git",
"clone_url": "https://try.gitea.io/andrewimeson/test_repo.git",
"original_url": "",
"website": "",
"stars_count": 0,
"forks_count": 0,
"watchers_count": 1,
"open_issues_count": 0,
"open_pr_counter": 0,
"release_counter": 0,
"default_branch": "main",
"archived": false,
"created_at": "2022-10-04T19:24:34Z",
"updated_at": "2022-10-04T19:33:28Z",
"permissions": {
"admin": true,
"push": true,
"pull": true
},
"has_issues": true,
"external_tracker": {
"external_tracker_url": "https://jira.example.com/projects/LOL/issues",
"external_tracker_format": "https://jira.example.com/browse/LOL-{index}",
"external_tracker_style": "regexp"
},
"has_wiki": true,
"has_pull_requests": true,
"has_projects": true,
"ignore_whitespace_conflicts": false,
"allow_merge_commits": true,
"allow_rebase": true,
"allow_rebase_explicit": true,
"allow_squash_merge": true,
"allow_rebase_update": true,
"default_delete_branch_after_merge": false,
"default_merge_style": "merge",
"avatar_url": "",
"internal": false,
"mirror_interval": "",
"mirror_updated": "0001-01-01T00:00:00Z",
"repo_transfer": null
}
Gitea Version
1.17.2
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
Helm chart
Database
PostgreSQL