feat(issue): allow work_items URLs
Description
This change updates the URL parsing logic to recognize GitLab work items in addition to regular issues. Previously, the system could only parse URLs that contained "/issues/" paths, but now it also accepts "/work_items/" paths. The regular expressions (patterns used to match URL formats) were modified in two files to include this new work item pattern, and tests were added to verify that work item URLs are properly recognized and parsed. This allows the command-line tool to handle both traditional GitLab issues and the newer work items feature using the same commands.
- feat(issue): allow work_items URLs
Before:
❯ glab issue view https://gitlab.com/gitlab-org/gitlab/-/work_items/337780
ERROR
Invalid issue format: "https://gitlab.com/gitlab-org/gitlab/-/work_items/337780".Related Issues
Internal thread https://gitlab.slack.com/archives/CETG54GQ0/p1773183960656729
How has this been tested?
glab issue view https://gitlab.com/gitlab-org/gitlab/-/work_items/337780
glab issue view https://gitlab.com/gitlab-org/gitlab/-/issues/337780
glab issue view https://gitlab.com/gitlab-org/gitlab/-/work_items/337780 --output jsonScreenshots (if appropriate):
Edited by Jay McCure