# Bug OP-12021 - GitHub pull requests comments can have wrong link

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-12021

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 13.0.0 |
| Observed in versions |  |
| Sprint | 13.0.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) |  |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### Steps to reproduce

1.  Create a pull request with title including \#{some work package id}, for instance `Fix #1234 to make stuff better`
2.  In the pull request description, add \`OP\#1234\` to have OpenProject automatically create a comment in work package 1234 about this pull requests
3.  Go to the work package 1234 activity

### What is the buggy behavior?

  - The comment is showing an invalid link: instead of linking to the pull request, it links to the work package being referenced
      - In fact, the part before `#1234` will link to the GitHub PR (`Fix`  in this example)
      - Then `#1234` will link to the work package

### What is the expected behavior?

1.  The whole `Fix #1234 to make stuff better` text should link to the GitHub PR

The [second comment](https://community.openproject.org/projects/openproject/work_packages/46316/activity#activity-2) of this work package is demonstrating the issue. Any valid markdown inside the PR title (or the GitHub user name) will be expanded into html.

### Environment information

**OpenProject installation**

- [x] Other (please specify)
  - [x] version 12.5.0.bf4bbf11c6 on community
