mirror of
https://github.com/go-gitea/gitea.git
synced 2024-05-11 05:55:29 +00:00
@ -57,3 +57,9 @@ export function mqBinarySearch(feature, minValue, maxValue, step, unit) {
|
||||
}
|
||||
return mqBinarySearch(feature, minValue, mid - step, step, unit); // feature is < mid
|
||||
}
|
||||
|
||||
export function parseIssueHref(href) {
|
||||
const path = (href || '').replace(/[#?].*$/, '');
|
||||
const [_, owner, repo, type, index] = /([^/]+)\/([^/]+)\/(issues|pulls)\/([0-9]+)/.exec(path) || [];
|
||||
return {owner, repo, type, index};
|
||||
}
|
||||
|
Reference in New Issue
Block a user