-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
Motivation
It's hard to estimate appropriate timeout-minutes per job.
So it would be great if we can estimate timeout-minutes based on actual jobs execution time.
GitHub API
I can't find GraphQL API to get Jobs data.
- https://docs.github.com/en/graphql/reference/objects#workflowrun
- https://github.com/orgs/community/discussions/24493
GitHub API v3
- https://docs.github.com/en/rest/actions/workflow-jobs#list-jobs-for-a-workflow-run
- https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#list-workflow-runs-for-a-workflow
https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#list-workflow-runs-for-a-repository
Parameters
- Data range: The number of data (e.g. 100) or time range (e.g. 7w)
- Expression: Jsonnet or expr. e.g.
avg(jobs) + 5
GitHub Access Token
GitHub Access Token is required.
- GITHUB_TOKEN
- GHATM_GITHUB_TOKEN
Permissions:
- "Actions" repository permissions (read)
actions:read
Example
ghatm set -exp "avg(jobs) + 5" -date 7w -number 100
ghatm set -auto # Provide nice default settings
⚠️ Limitation
- If variables are used in a job name, it's difficult to map jobs with the job
- If workflow files were renamed, it's difficult to get old data
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request