How to create issues via an action #25698
-
I was trying to create an GitHub action (here) that open an issue or at least adds a comment to an existing issue when an event occurs. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Hi, firstly we wanted to mention actions/github-script, as it might help you in the future to make API calls easier:
actions/github-scriptWrite workflows scripting the GitHub API in JavaScript - actions/github-script For the error itself, we weren’t able to find the specific workflow run demonstrating this error, but most likely you could resolve this issue by using a PAT instead of the GITHUB_TOKEN: You can then add it as a secret, and use the secret in the workflow to make the API call: https://docs.github.com/en/actions/reference/encrypted-secrets#using-encrypted-secrets-in-a-workflow |
Beta Was this translation helpful? Give feedback.
-
@github-support I am a bit busy, but I will look at that later. |
Beta Was this translation helpful? Give feedback.
-
I have found a solution. |
Beta Was this translation helpful? Give feedback.
-
another option: it appears that the runners have the github cli installed on them by default |
Beta Was this translation helpful? Give feedback.
-
@dradetsky Thanks! |
Beta Was this translation helpful? Give feedback.
Hi, firstly we wanted to mention actions/github-script, as it might help you in the future to make API calls easier:
actions/github-script
Write workflows scripting the GitHub API in JavaScript - actions/github-script
For the error itself, we weren’t able to find the specific workflow run demonstrating this error, but most likely you could resolve this issue by using a PAT instead of the GITHUB_TOKEN:
https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token
You can then add it as a secret, and use the secret in the wor…