Skip to content

Allow custom regex patterns for linking external issues #3468

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 of 7 tasks
tgdchmi2 opened this issue Feb 7, 2018 · 3 comments · Fixed by #17624
Closed
2 of 7 tasks

Allow custom regex patterns for linking external issues #3468

tgdchmi2 opened this issue Feb 7, 2018 · 3 comments · Fixed by #17624
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/enhancement An improvement of existing functionality type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Milestone

Comments

@tgdchmi2
Copy link

tgdchmi2 commented Feb 7, 2018

  • Gitea version (or commit ref): 1.3.2
  • Git version: 2.16.1
  • Operating system: Linux
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

For external issue tracker: alphanumeric issue recognition does not work when:

  • Key before the dash contains a number. Example: BLG5-456
  • Key is enclosed in quotes. Example: 'BLG-456' or "BLG-456"
  • Key follows a slash: Example BLG-123/BLG-564 (first key is recognized, second one not)

We think implementing so many additional 'rules' could lead to many false positives.
Thus we propose to add a third External Issue Tracker Naming Style for specifying custom patterns to apply for matching issue keys. Then we could specify a pattern like (WP-\d+)|(BLG5-\d+) ourselves.
The matched group should then be used for replacing {index} in the External Issue Tracker URL Format.

@lafriks lafriks added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Feb 7, 2018
@bkcsoft bkcsoft added the type/enhancement An improvement of existing functionality label Feb 10, 2018
@stale
Copy link

stale bot commented Feb 8, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale stale bot added the issue/stale label Feb 8, 2019
@lunny lunny added issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented and removed issue/stale labels Feb 8, 2019
@strk
Copy link
Member

strk commented May 30, 2019

See also #7084 for an even more flexible mapping idea

@jonny64
Copy link

jonny64 commented Nov 18, 2020

Hi, we have tasks/{uuid v4} as issue {index}, what should we do?

@lunny lunny added this to the 1.17.0 milestone Jun 10, 2022
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/enhancement An improvement of existing functionality type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
6 participants