Is there a way to import GitHub issues to JIRA? - github

My team use Jira and we often work with open source software which are hosted on GitHub.
I often get request from my PM to update the status which can sometimes easily be followed using the GitHub public issue openend on one of those open source project.
Is there a way I can link a GitHub issue to a Jira ticket and sync all the GitHub comment in this Jira ticket ?

Answer is yes, it is.
If you want some manual import, you can check this Atlassian Community post.
As explained in here, you can perform with applying following steps:
Get list of issues in JSON format using following link from the browser
https://api.github.com/repos/\<repo-owner-name>/<repo-name>/issues?state:open
Convert JSON to CSV using any online converter
User Jira's External system import > choose CSV and upload the file.
Or, if you are looking for some programmatic way, you can check following page on zmccdn.

Related

Jira integration in Backstage giving 404 error

I'm currently testing Backstage for my company, and I tried various continuous integration pipelines like Github, Jira, Jenkins, and more. But I'm facing an issue with the Jira plugin. Maybe it's just a bad setup.
In my component, I can see the Jira entity, but every time, it says:
failed to fetch data, status 404: Not Found
When I look in the browser's console (network), I can see this 404, and this is the query used:
http://localhost:7007/api/proxy/jira/api/rest/api/latest/project/undefined
Why do I have undefined? Is it because the jira/project-key variable is not at the right place? Actually, it's in the catalog-info.yaml under metadata.
I followed all documentation I could find, but one section is not enough clear for me. It's about the annotations thing. It says `Add annotation to the yaml config file of a component. I created a component yesterday, but I don't see any file for it.
Thanks in advance.
Ok, I found the solution.
In the documentation, the file, called catalog-info.yaml, is not the one at the Backstage repository's root, but to a file in a different repository that will be used as component template in Backstage.
If you create a new repository (ex a fork from Symfony), you will have to add the file catalog-info.yaml with various informations if you want to use this repository as template for your projects.

Need a link/URL to a raw source file in Azure Dev Ops (ADO)

We recently migrated from Bitbucket to ADO and one of our platforms requires a link that will return the raw file for its deployment process. Bitbucket has a "raw" link available when viewing source files in the web UI, but I haven't found anything like that in ADO, the closest thing is a download link, but I need a link that just simply returns/displays the raw source file contents, not with a download dialog box. Is this possible?
I found that using the following in the api URL got me what I need:
_apis/sourceProviders/TfsGit
https://learn.microsoft.com/en-us/rest/api/azure/devops/build/source-providers/get-file-contents?view=azure-devops-rest-5.0

How to prevent the pull request integration for SonarQube to report issues as inline comments on Githuib?

I configured SonarQube analysis to report it's status to pull requests on my GitHub project. SonarCloud already supports pull requests as first class citizen as described in https://blog.sonarsource.com/sonarcloud-loves-your-build-pipeline. As I understand, this kind of integration is not using the GitHub Plugin for SonarQube.
The configuration provides these properties (look here for the complete configuration)
sonar.pullrequest.provider
sonar.pullrequest.github.repository
sonar.pullrequest.branch
sonar.pullrequest.key
The credentials for the technical user are set in the SonarCloud project administration.
You can see the results here: https://github.com/BudgetFreak/BudgetFreak/pull/86#pullrequestreview-125364230
Every issue is reported as an inline comment, one summary comment is made and the status is reported for the code-quality/sonarqube check.
I would like to disable the inline comment on every issue. This was possible using the GitHub plugin. Can this also be achieved with the new pull request integration?
Unfortunately, on SonarCloud, this feature is not available.

Is there a way to import Jira issues to GitHub?

I've tried exporting issues from both GitHub and Jira to CSV files, but I've never tried exporting Jira issue then importing it to GitHub, is this possible? If so, what would be the best way to approach something like this?
There is simply not a "Import issues from JIRA" feature in GitHub.
The way I see it you have two options, either to integrate your current JIRA instance with GitHub or migrate the JIRA issues into GitHub issues using your own criteria and migration script.
GitHub and JIRA Integration
I would very much like to add all the instructions here but it's one of those cases where a link to the documentation makes much more sense.
There's also a video on youtube which is quite short and easy to follow.
Migrating JIRA issues into GitHub Issues
In order to do this you would have to write your own script that reads issues from the JIRA REST API and creates new ones using GitHub Issues REST API.
Note that JIRA and GitHub issues are different in nature, so your script would have to choose how to migrate one type of issue to another.
I hope this helps.
Another way is to export the JIRA issues as XML file.
The following project provides Python 2 scripts to import such a file into a GitHub project via its REST API:
https://github.com/hbrands/jira-issues-importer
Besides issues with comments, it imports milestones, labels and components as labels. References to issues in comments are to some degree converted. Also, JIRA relationships like "blocks" and "depends on" are migrated to special issue comments in GitHub.
It avoids the problem of running into abuse rate limits by using a special Issue Import API.
Please read the sections about the features, caveats, assumptions and prerequisites on the project site. Be sure to test the issue migration with a GitHub test project first.
Here are the things you need to do for export from JIRA and import to GitHub.
First export issues (to a csv file) from JIRA with the feilds you need.
Then read the csv file line by line and use the github api to create issue in GH.
https://github.com/susinda/github-client/blob/master/src/main/java/org/wso2/git/client/GitRestApiExecutor.java
Here is a sample client to do the job[1], readme contains the steps,feel free to modify it and use if that does not match with your requirement https://github.com/susinda/github-client
Try this node module https://github.com/gavinr/github-csv-tools, need to download issue form Jira and use this to upload on GitHub.
https://github.com/parcelLab/jira-to-github is a (pretty old) project to migrate JIRA issues to Github.
Export the issues from JIRA
First, create a full export to XML as described in this guide:
https://confluence.atlassian.com/adminjiracloud/exporting-issues-776636787.html
You'll need the exported entities.xml from JIRA to upload the
issues to your GitHub repository using the GitHub API.
Run the import to GitHub
Run node index.js to use the script

JIRA GitHub Integration in an online hosted jira solution

I know there is a github jira plugin, which is a .jar https://github.com/atlassian/jira-github-connector-plugin , how do I add this to an online hosted jira solution.
Basically we'd like to see commit activity, update time in jira tickets with a github commit message and the "source" tab should show github project rather than the default svn that jira provides.
Regards,
Noj.
Came across this question today while searching, figured I would add in the link from Jira. Must not have been available at the time this question was asked.
https://confluence.atlassian.com/display/JIRASTUDIO/Integrating+GitHub+with+JIRA+Studio
If you're talking about JIRA Studio, they do not support any plugins except the ones they provide:
http://confluence.atlassian.com/display/JIRASTUDIO/JIRA+Studio+Plugin+Policy