Adding files to a github repo and attaching the file to an issue from the command line

Viewed 316

I want to create github issues from the command line, using something like :
https://cli.github.com/manual/gh_issue_create
or
https://docs.github.com/en/rest/reference/issues#create-an-issue
but I can't find a way to do it and add attachments to the issue.

If I add the issue through the website, the files are added to the repo, and then a link to the is created in the following format:
(filename)[link-to-the-file]
and the link-to-the-file looks something like this:
https://github.com/username/repo-name/files/x/file-name

So I suppose that if I add the file to the repo under files/ then I will be able to reference it with the right format, then my question is how can I add a file to a github repo, and then get the link to that file, from the command line to be able to attach it to an issue?

0 Answers
Related