-
-
Notifications
You must be signed in to change notification settings - Fork 4
Add support to get all runs regardless the workflow file exists #176
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
Add support to get all runs regardless the workflow file exists #176
Conversation
90e1402
to
2f4aa33
Compare
2f4aa33
to
3688299
Compare
Co-authored-by: Copilot <[email protected]> Signed-off-by: igor.js <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the workflow‐run deletion logic to fetch and delete runs across all workflows (regardless of whether the workflow file still exists), simplifies the main action entrypoint, removes old date utilities, and bumps the package version.
- Refactor getApi to introduce
getRunsToDelete
, unifying run pagination and grouping logic. - Update
src/index.ts
to callgetRunsToDelete
and streamline logging. - Remove obsolete date utilities in
src/utils/date.ts
and adjust related code/tests.
Reviewed Changes
Copilot reviewed 14 out of 17 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
src/helpers/api.ts | Refactored to paginate all workflow runs and group them in getRunsToDelete |
src/index.ts | Updated main entrypoint to use new deletion API and improved logging |
src/utils/date.ts | Deleted outdated date‐difference utilities no longer in use |
Comments suppressed due to low confidence (2)
eslint.config.js:78
- There’s a duplicate
js.configs.recommended
entry at the end of the ESLint configuration. Removing this duplicate will prevent rules from being applied twice and keep the config clearer.
];
src/index.ts:11
- The new main entrypoint in
src/index.ts
isn’t covered by any tests. Consider adding tests that simulate both the "no runs to delete" and "successful deletion" paths to validate logging and error handling.
(async function run() {
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "@igorjs/gh-actions-clean-workflow", | |||
"version": "6.0.0", | |||
"version": "7.0.0", | |||
"description": "Github Action to delete old workflow runs", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the description to use the official GitHub
capitalization: e.g., "GitHub Action to delete old workflow runs"
.
"description": "Github Action to delete old workflow runs", | |
"description": "GitHub Action to delete old workflow runs", |
Copilot uses AI. Check for mistakes.
Closes #169
📑 Description
Add support to get all runs regardless the workflow file exists
✅ Checks
ℹ Additional Information