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.
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.
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}”.
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.
No, it's not possible to attach files to issues via the GitHub API.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With