-
Notifications
You must be signed in to change notification settings - Fork 424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
octokit.rest.actions not available #345
Comments
Same issue (different function, though):
Can't use |
i'm experience the same issue, workflow:
and getting the following error in the output:
|
This is what I'm running into. Are there any plans to update this to take advantage of the new api methods? |
This requires updating the version of used As a workaround, you can use the await github.request('GET /repositories/{repository_id}/environments/{environment_name}/variables/{name}', {
repository_id: 'REPOSITORY_ID',
environment_name: 'ENVIRONMENT_NAME',
name: 'NAME',
headers: {
'X-GitHub-Api-Version': '2022-11-28'
}
}) Our API documentation has examples you can use: https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#get-an-environment-variable |
Hey @joshmgross - following up here now that I have a better understanding of using the Is there a good way to know which |
Based on https://stackoverflow.com/questions/152483/is-there-a-way-to-print-all-methods-of-an-object, I printed out all of the available endpoints for - uses: actions/github-script@v6
with:
script: |
for (const id in github.rest.actions) {
try {
if (typeof(github.rest.actions[id]) === "function") {
console.log(id);
}
} catch (err) {
console.error(err);
}
} https://github.com/joshmgross/actions-testing/actions/runs/5025713514/jobs/9013042586 Currently available endpoints
|
@joshmgross just wondering if there's any timeline on when the version would be updated? |
No timeline, I'm not sure if anything is tracking the update required to |
@joshmgross, I'm hitting some permissions errors hitting that specific endpoint. Any idea what permissions my job/workflow token needs to be able to have the I even tried with |
The |
@joshmgross, is there any special token handling needed to use When I used However, I tried using the
To confirm the token isn't the actual issue, I tested successfully using similar token (with org secret read/write permission) with However, it encountered similar invalid token error when switched to using |
Disregard my previous comment. The invalid token error isn't related to the authentication token. Maybe during the code snippet copy for github.request function, some formatting / encoding got in the way. Rewriting it from scratch works fine. |
Describe the bug
To Reproduce
Expected behavior
github.rest.actions.getEnvironmentVariable should be defined as documented in octokit/rest
The text was updated successfully, but these errors were encountered: