Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Attach file to issue in GitHub via API

My requirement is to migrate issues from Redmine to GitHub issue tracker. I exported Redmine issues to a csv file. Using GitHub issue api I am able to create issues in github along with labels.

But I also need to attach file while creating issue, using GitHub REST apis. Is it possible to attach files while creating issue in github via API?

If anybody knows the solution for this please let me know.

like image 442
yogeshagr Avatar asked Dec 17 '15 07:12

yogeshagr


People also ask

How do I attach a file to a GitHub issue?

To attach a file to an issue or pull request conversation, drag and drop it into the comment box. Alternatively, you can click the bar at the bottom of the comment box to browse, select, and add a file from your computer.

How do I upload a file to GitHub API?

For uploading the file into GitHub you can go through basic steps: Get the file content using 'fs' module. Encode the content into base64 format. then use GitHub API “https://api.github.com/repos/{owner}/{repo}/contents/{file name}”.

How do you attach an issue to a pull request?

Under your repository name, click Pull requests. In the list of pull requests, click the pull request that you'd like to link to an issue. In the right sidebar, in the "Development" section click . Click the issue you want to link to the pull request.


1 Answers

No, it's not possible to attach files to issues via the GitHub API.

like image 185
Ivan Zuzak Avatar answered Sep 19 '22 21:09

Ivan Zuzak