-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Thank you 🙇♀ for wanting to create an issue in this repository. Before you do, please ensure you are filing the issue in the right place. Issues should only be opened on if the issue relates to code in this repository.
- If you have found a security issue please submit it here
- If you have questions about writing workflows or action files, then please visit the GitHub Community Forum's Actions Board
- If you are having an issue or question about GitHub Actions then please contact customer support
If your issue is relevant to this repository, please include the information below:
Describe the bug
Documentation specifies that to get information about a workflow you can either specify workflow_id or workflow_name:
- https://developer.github.com/v3/actions/workflows/#get-a-workflow
- https://octokit.github.io/rest.js/v17#actions-get-workflow
However the Typescript type definition for Github.actions.getWorkflow only lets me specify workflow_id as a number and does not allow me to specify a string.
To Reproduce
See: https://octokit.github.io/types.ts/modules/_generated_endpoints_.html#actionsgetworkflowusageendpoint
Or try to create some Typescript code in VScode and try to feed actions.getWorflow anything else than a number. E.g.:
const { owner, repo } = github.context.repo;
const workflow_id="CI"
const workflow= await client.actions.getWorkflow({
owner,
repo,
workflow_id,
});Expected behavior
Either a hybrid type that allows id or name or something like an additional getWorkflowbyName signature
Screenshots
N/A
Desktop (please complete the following information):
N/A
Smartphone (please complete the following information):
N/A
Additional context
I'm trying to make an action that cleans up the logs of other actions on the same repo and I can't get the action ID of the other actions from the UI, so I need a way to get from name to ID.