github-for-jira icon indicating copy to clipboard operation
github-for-jira copied to clipboard

Feature Request: linking Jira issue in commit messages on Github

Open pro-vi opened this issue 3 years ago • 12 comments

Currently, linking Jira issues in Github only works for issue body like here as [JIRA-123]. Would be great if the same applies for commit messages like "[JIRA-321] this is a commit". Where we can click on the link to the Jira issue through commit message.

pro-vi avatar Jan 13 '21 20:01 pro-vi

You can link Jira issues on commits and comments using custom autolinks : https://docs.github.com/en/github/administering-a-repository/configuring-autolinks-to-reference-external-resources

Raul6469 avatar Feb 01 '21 08:02 Raul6469

Auto links are a workaround but it is a pain to setup on every repository. It would be really good if this App can do this. For example, GitLab's jira integration is really good

NasAmin avatar Mar 06 '21 12:03 NasAmin

Autolinks are not even working well. If I refresh the commit page 3 times, I get 3 different sets of linked tickets. So the feature is utterly broken.

They have immense maintenance burden which is to configure it for each repo multiplied by the number of Jira projects you might have. Since both things are moving targets in a growing company their administration is unsustainable.

sodul avatar Mar 25 '21 21:03 sodul

Hi @ProvidenceXz. I'm from a team at Atlassian that is currently in the process of migrating the ownership over to us from GitHub. As a part of this, we're currently going through the backlog of issues and prs to see what can still be addressed and what should be closed.

I've flagged this with the 'to-triage' label so my team can discuss. We'll keep you posted on the status of this.

rachellerathbone avatar May 17 '21 10:05 rachellerathbone

GitHub has just released beta access to the API the integration would need to configure autolinks. This work has been planned for FY22Q2. The lack of an API was the only known blocker 😃

ccrolf avatar Aug 06 '21 05:08 ccrolf

As good as that feature will be (less work for us :tada: ), I'm fairly certain we can implement our own version of creating links as they're all standard and we should be able to build it using the data that we have.

mboudreau avatar Aug 06 '21 05:08 mboudreau

I imagine this will be a lot simpler to implement once organization-level autolinks are introduced. 🤞

usmonster avatar Aug 06 '21 14:08 usmonster

https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/configuring-autolinks-to-reference-external-resources

  1. Newbie here. Not sure if this the right place to ask this but what is the difference between the above mentioned autolink feature and the GithubJira AddOn?

to link issues, pull requests, commit messages, and release descriptions to external third-party services.

From what I understood, GH Jira Addon can only link smart commit to the Jira board issues.

  1. I don't see the "autolink references" option in my repo settings, so am assuming it is not for free accounts.

Thanks.

bulbulbhojpuri avatar Jul 03 '22 06:07 bulbulbhojpuri

I don't see the "autolink references" option in my repo settings, so am assuming it is not for free accounts.

Correct, @bulbulbhojpuri, this is from the documentation:

Autolinks are available in repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server.

The GitHub-native feature only creates hyperlinks in the GitHub UI when it sees a pattern matching a given issue ID format, while this Atlassian-developed app provides a deeper integration by sending information from GitHub to Jira that can then be displayed in your issues and used by Jira Automation, for example.

usmonster avatar Jul 03 '22 07:07 usmonster

Is there any update on allowing the integration to make it work in GitHub UI instead of a separate setup?

I understand that GitHub had to make this API available which by today (28-November-2022) is already in place: https://docs.github.com/en/rest/repos/autolinks?apiVersion=2022-11-28

jefersonchaves avatar Apr 14 '23 11:04 jefersonchaves

I imagine this will be a lot simpler to implement once organization-level autolinks are introduced. 🤞

Looks like organization-level autolinks are still being discussed: https://github.com/orgs/community/discussions/12386?sort=top

dijonkitchen avatar Mar 19 '24 14:03 dijonkitchen

One 'workaround' with auto links that seem to work for us is that we now manage the bulk of our repositories configuration through Terraform. We do have to add new repos and Jira projects to our terraform files but then we are now mostly in sync. An org level setting would still be much better but it is now mostly manageable.

https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository_autolink_reference

sodul avatar Mar 19 '24 19:03 sodul