Questions tagged [github-script]
6 questions
1
vote
0 answers
Finding all collaborators and teams with organization repository access using github-script
I am trying to create a report that will list all teams and individual collaborators to our organizational repositories. So far I have been able to generate an array that contains the list of repositories for an organization:
const…

mikey
- 13
- 1
- 4
1
vote
1 answer
There does not seem to be a good substitute for core.exportVariable in github-script right now
Every time we use core.exportVariable which, as far as I know, is the canonical way to export a variable in @action/core and, consequently, in github-script, you get an error such as this one:
Warning: The set-env command is deprecated and will be…

jjmerelo
- 22,578
- 8
- 40
- 86
0
votes
1 answer
Put github-script output on new line
I have a GitHub Actions pipeline that uses github-script to publish comments on my PRs e.g.:
jobs:
my-job:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
with:
script: |
const output =…

Nespony
- 1,253
- 4
- 24
- 42
0
votes
0 answers
Can't override some HTTP headers with github.request() in actions/github-script workflow script
My workflow's script with action/github-script(v6) step:
const response = await github.request('POST https://example.com', {
headers: {
authorization: 'Bearer xxx',
accept: 'application/vnd.heroku+json; version=3', // I want header to be…

tlenex
- 488
- 1
- 5
- 13
0
votes
0 answers
Github Script can't use outputs
I am trying to create a PR message as a result of a failed action but the message's body is always erroring out as being "blank".
This is the code I'm running on my action, all those console.logs are empty and I can't understand why.
Thanks for any…

Carlos Silva
- 101
- 2
- 9
0
votes
1 answer
How to access GraphQL mutation result in Github Workflow
I have a step in a github workflow job that looks like this:
- name: Create a workflow-started comment
uses: actions/github-script@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
//…

Konrad Kleine
- 4,275
- 3
- 27
- 35