git 如何将 github 连接到 JIRA?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5421647/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do I connect github to JIRA?
提问by user675202
I've been trying to find a way to update JIRA when I commit to github.
当我提交到 github 时,我一直试图找到一种更新 JIRA 的方法。
It doesn't look like there are any service hooks to do it at github, but you never know, someone might have a ninja way, so I thought I'd ask.
在 github 上看起来没有任何服务挂钩可以做到这一点,但你永远不知道,有人可能有忍者的方式,所以我想我会问。
回答by Kuf
UPDATE
更新
For integrating with Bitbucket, GitHub and GitHub Enterprise, check out the following link:
要与 Bitbucket、GitHub 和 GitHub Enterprise 集成,请查看以下链接:
Linking Bitbucket and GitHub accounts to JIRA
将 Bitbucket 和 GitHub 帐户链接到 JIRA
ORIGINAL POST
原帖
JIRA GitHub Connectoris deprecated:
不推荐使用JIRA GitHub 连接器:
This plugin has been superseded by the JIRA DVCS Connector, which includes GitHub functionality.
此插件已被包含 GitHub 功能的 JIRA DVCS 连接器取代。
So to connect Jira to github use JIRA DVCS Connector for Bitbucket and GitHub:
因此,要将 Jira 连接到 github,请使用适用于 Bitbucket 和 GitHub 的 JIRA DVCS 连接器:
You can connect Bitbucket or GitHub accounts with JIRA using the free JIRA DVCS Connector plugin. This plugin comes with JIRA OnDemand. For JIRA download users, this is a system plugin that you can install. Using the DVCS connector, you can:
- Link all or a subset of your existing repositories (both public and private to JIRA).
- Create new repositories and have them link automatically to JIRA.
- Reference JIRA issues from DVCS commit message and have those commits appear in the issue's Commits tab in JIRA.
- Transition issues through a JIRA OnDemand workflow (for example, Close, Reopen, and so forth) using smart commit messages.
您可以使用免费的 JIRA DVCS 连接器插件将 Bitbucket 或 GitHub 帐户与 JIRA 连接。这个插件随 JIRA OnDemand 一起提供。对于JIRA下载用户,这是一个可以安装的系统插件。使用 DVCS 连接器,您可以:
- 链接所有或现有存储库的子集(公共和私有到 JIRA)。
- 创建新的存储库并让它们自动链接到 JIRA。
- 从 DVCS 提交消息中引用 JIRA 问题,并将这些提交显示在 JIRA 中问题的“提交”选项卡中。
- 使用智能提交消息通过 JIRA OnDemand 工作流(例如,关闭、重新打开等)转换问题。
check out Using the JIRA DVCS Connector Pluginfor more information.
查看使用 JIRA DVCS 连接器插件了解更多信息。
回答by Eric Hauser
Atlassian has a plugin on GitHub to connect the two:
Atlassian 在 GitHub 上有一个插件来连接两者:
https://github.com/atlassian/jira-github-connector-plugin
https://github.com/atlassian/jira-github-connector-plugin
Looks like it adds a project setting to point to a GitHub project and a tab that will show your commits in GitHub.
看起来它添加了一个项目设置以指向一个 GitHub 项目和一个选项卡,它将显示您在 GitHub 中的提交。
回答by bky
In addition you can also define Webhooks on the GitHub site that do a POST-Request to other Webservers. Have a look here: https://developer.github.com/webhooks/
此外,您还可以在 GitHub 站点上定义对其他 Web 服务器执行 POST 请求的 Webhooks。看看这里:https: //developer.github.com/webhooks/
On the JIRA site, you have the Jira REST APIs with which you can edit or update or create or do pretty much anything with your Jira issues: https://developer.atlassian.com/display/JIRADEV/JIRA+REST+APIs
在 JIRA 站点上,您拥有 Jira REST API,您可以使用它编辑、更新或创建或对 Jira 问题执行几乎任何操作:https: //developer.atlassian.com/display/JIRADEV/JIRA+REST+APIs
回答by Rob
I have made a small Chrome plugin recently which will edit GitHubs PR pages to show information on the linked Atlassian tickets.
我最近制作了一个小的 Chrome 插件,它将编辑 GitHubs 公关页面以显示有关链接的 Atlassian 票证的信息。
It will require a PR title format of [ISSUE-9485] Some description
but works pretty cool, if you ask me.
[ISSUE-9485] Some description
如果你问我,它将需要一个 PR 标题格式,但效果很酷。
https://chrome.google.com/webstore/detail/github-jira-integration/faenbbkpfnklhncjianlfllkfekgghih
https://chrome.google.com/webstore/detail/github-jira-integration/faenbbkpfnklhncjianlfllkfekgghih
Source code is here: https://github.com/RobQuistNL/chrome-github-jira
源代码在这里:https: //github.com/RobQuistNL/chrome-github-jira
EDIT: It will also automatically create a "template" for your pull request, based on content / description of the ticket.
编辑:它还会根据票证的内容/描述自动为您的拉取请求创建一个“模板”。
E.g. it will take items under the header "Acceptance Criteria" and post it as a checkable list, adds some description, a how to test, etc.
例如,它将获取标题“验收标准”下的项目并将其作为可检查列表发布,添加一些描述、如何测试等。
回答by Zongbin
I just experienced the same issue and found the answers and the official reference web maybe need to be more specific for Github enterprise version. If you are using the enterprise Github, you should:
我刚刚遇到了同样的问题并找到了答案,官方参考网站可能需要针对 Github 企业版更具体。如果您使用的是企业版 Github,您应该:
1) Register the application under the enterprise's settings, not under the user's.
1) 在企业设置下注册应用程序,而不是在用户设置下注册。
2) Suppose your JIRA site as http://myjira.com/jirawhich you can access your JIRA main page, then the Homapage URL and the Authorization callback URL should be the same as your JIRA site URL.
2)假设你的JIRA站点是http://myjira.com/jira,你可以访问你的JIRA主页,那么Homapage URL和Authorization callback URL应该和你的JIRA站点URL相同。
3) When add new account in JIRA, the Host field shoud be GitHub Enterprise, the Team or User Account should be the enterprise's name which can be found under the organization profile in Github.
3)在JIRA中添加新账号时,Host字段应为GitHub Enterprise,Team或User Account应为企业名称,可在Github中的组织资料下找到。
4) The Host URL should be Github main page.
4) Host URL 应该是 Github 主页。
Then I think it should work for enterprise when connect the JIRA and github.
然后我认为连接JIRA和github时它应该适用于企业。
回答by Anand
If you visiting this page in 2016, and using Cloud JIRA, it is find here-
如果您在 2016 年访问此页面并使用 Cloud JIRA,则可以在此处找到-
Application>>Integrations>>DVCS Accounts, instead of under Add Ons as mentioned in blog posts being thrown up by Google.
应用程序>>集成>>DVCS 帐户,而不是在 Google 抛出的博客文章中提到的附加组件下。
回答by user13567327
Check out this plugin https://marketplace.atlassian.com/apps/1220080/smart-git-integration-for-jiraSmart Git intagration for Jira add-on allows to connect your Jira project to Git with repository URL in a few clicks.
查看此插件https://marketplace.atlassian.com/apps/1220080/smart-git-integration-for-jira用于 Jira 附加组件的 Smart Git 集成允许通过单击几下存储库 URL 将您的 Jira 项目连接到 Git .
回答by Termato
For those of you who are looking for how to import the Project
data from GitHub onto JIRA, then you should go to this link: https://confluence.atlassian.com/adminjiraserver071/importing-data-from-github-802592903.html
对于那些正在寻找如何将Project
数据从 GitHub导入JIRA 的人,那么你应该去这个链接:https: //confluence.atlassian.com/adminjiraserver071/importing-data-from-github-802592903.html
It gives you in dept instructions on how to do that. I was able to bring in everything and map bugs to bugs, etc. Even completed tasks came in.
它为您提供了有关如何执行此操作的详细说明。我能够引入所有内容并将错误映射到错误等。甚至完成的任务也进来了。
If the link decides not to work one day, here is a summary which I take no credit for:
如果链接有一天决定不工作,这里是一个我不相信的摘要:
1. Log in to JIRA as a user with the JIRA Administrators global permission.
2. Choose > System. Select Import & Export > External System Import to open the List item Import external projects page.
3. Select the Import button associated with the GitHub option to open the GitHub Import Wizard.
4. On the GitHub Setup page, select which type of GitHub you are using. If you are using GitHub Enterprise you will also be required to provide your GitHub Enterprise URL. You also need to provide either your GitHub username and password, or a GitHub Personal Access Token. Note if you have used the GitHub import wizard before and saved a previous configuration file, you can select the configuration file here to speed up your import.
5. Click Next.
Have 2 factor authentication? Click here..
The Authentication page displays, verifying your authentication has been successful.
6. Click Next. The Map projects page displays, and will show a list of all your public and private repositories, as well as any repositories you have starred.
Then you just select the projects you wants to add...and the rest is easy. I hope this helps.
然后,您只需选择要添加的项目……剩下的就很简单了。我希望这有帮助。
回答by Alsushi
Top post is deprecated.
顶帖已弃用。
2020 URL:
$JIRAPROJECT.atlassian.net/secure/admin/ConfigureDvcsOrganizations!default.jspa
2020 年网址:
$JIRAPROJECT.atlassian.net/secure/admin/ConfigureDvcsOrganizations!default.jspa
If you're connecting a Jira Core project:
Choose [WHEEL icon TOP RIGHT corner] > Products.
Under INTEGRATIONS, select DVCS accounts.
Select Link Bitbucket Cloud account.
That page would also allow Gitlab connection
该页面还允许 Gitlab 连接