-
Notifications
You must be signed in to change notification settings - Fork 407
Fix checking state cache (fix #1136), also switch to octokit methods #1152
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
base: main
Are you sure you want to change the base?
Conversation
|
I think i ran into this issue, do you know if its likely this pr might progress? |
|
I hope some maintainer will look into this PR, but maintenance activity of this action looks to be stale. |
|
Would love for a maintainer to merge this fix in. Have a feature that's built on top of this that's needed internally and will definitely help others. |
|
@Jcambass @HarithaVattikuti @priyagupta108 Can someone merge this PR? The action is completely broken for many repos without this. We have stale issues that should have been closed weeks ago, but will never close until this fix is released. |
|
@chiranjib-swain Friendly ping to take a look at this :) |
|
Hi @itchyny, thanks for the PR! It looks like the formatting check failed during CI. The following file(s) need to be formatted with Prettier:
Could you please run Prettier locally and commit the updated formatting? You can do this with:
This will ensure your changes pass the formatting check. Additionally, the PR is based on an older commit, which is causing errors like: Failed to save:
When you get a chance, could you please merge the latest updates from the main branch into your PR? Thanks again for your contribution! |
0980a21 to
4777cc4
Compare
|
@chiranjib-swain |
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 fixes issue #1136 related to checking the state cache and modernizes the codebase by switching from raw HTTP requests to typed Octokit REST API methods.
Key changes:
- Replaced
client.request()calls with properclient.rest.actions.*methods for better type safety and maintainability - Fixed cache checking logic by using
caches.some()instead ofBoolean(caches.find())for more idiomatic JavaScript - Improved variable naming from
issueResulttocachesResultfor better clarity
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/classes/state/state-cache-storage.ts | Updated cache checking and deletion functions to use Octokit REST API methods instead of raw HTTP requests, improving type safety and code maintainability |
| dist/index.js | Compiled/bundled output reflecting the source code changes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| cachesResult.data['actions_caches'] || []; | ||
| return caches.some(cache => cache['key'] === cacheKey); | ||
| } catch (error) { | ||
| core.debug(`Error checking if cache exist: ${error.message}`); |
Copilot
AI
Dec 5, 2025
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.
Spelling error: "exist" should be "exists".
| core.debug(`Error checking if cache exist: ${error.message}`); | |
| core.debug(`Error checking if cache exists: ${error.message}`); |
Description:
This PR fixes #1136, also fixes a TODO comment about using octokit methods.
Related issue:
Check list: