Skip to content

Allow custom regex patterns for linking external issues #3468

Closed
@tgdchmi2

Description

@tgdchmi2
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedtype/enhancementAn improvement of existing functionalitytype/featureCompletely new functionality. Can only be merged if feature freeze is not active.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions