-
Notifications
You must be signed in to change notification settings - Fork 0
fix(ci): error on vite build. #448
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
Conversation
WalkthroughThe pull request updates the GitHub Actions workflow configuration in Changes
Warning Rate limit exceeded@hwakabh has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 9 minutes and 34 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (3)
web-frontend/src/pages/Works.vue (3)
Line range hint
5-13: Enhance error handling and state management.The current implementation has several areas for improvement:
- Add loading state management
- Implement proper error state handling for UI feedback
- Remove or conditionally use console.log statements
- Consider adding type safety for the API response
Consider refactoring to:
const workData = ref([]); +const isLoading = ref(false); +const error = ref(null); + +const fetchWorks = async () => { + isLoading.value = true; + error.value = null; + try { + const resp = await axios.get('/api/v1/works'); + workData.value = resp.data.content; + } catch (err) { + error.value = 'Failed to load works. Please try again later.'; + if (import.meta.env.DEV) { + console.error('Error fetching works:', err); + } + } finally { + isLoading.value = false; + } +}; -axios.get('/api/v1/works') - .then((resp) => { - console.log(resp.data.content); - workData.value = resp.data.content; - }) - .catch((err) => { - console.log(err); - })
Line range hint
33-39: Improve template structure and data rendering.Several improvements can enhance the component's robustness:
- Use a unique identifier instead of array index as key
- Add loading, error, and empty states
- Validate URLs before rendering
Consider updating the template:
- <ul v-for="(w, idx) in workData" - :key="idx" + <div v-if="isLoading" class="loading">Loading works...</div> + <div v-else-if="error" class="error">{{ error }}</div> + <ul v-else-if="workData.length" v-for="w in workData" + :key="w.id" class="alt work-detail" > <li> - <strong><a :href="w.url" target="_blank"> {{ w.title }} </a></strong> + <strong> + <a v-if="w.url" :href="w.url" target="_blank" rel="noopener noreferrer">{{ w.title }}</a> + <span v-else>{{ w.title }}</span> + </strong> <br> {{ w.descriptions }} </li> </ul> + <div v-else class="empty">No works available.</div>
Line range hint
15-17: Remove or utilize the onMounted hook properly.The current onMounted hook only contains a console.log statement, which appears to be debugging code. Either remove it or use it for actual initialization logic.
-// Vue lifecycle hooks -onMounted(() => { - console.log(workData); -}) +onMounted(() => { + fetchWorks(); +});
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
web-frontend/src/pages/Works.vue(1 hunks)
🔇 Additional comments (1)
web-frontend/src/pages/Works.vue (1)
28-28: LGTM! Good security practice.
Adding rel="noopener noreferrer" to external links with target="_blank" is a security best practice that prevents potential reverse tabnabbing attacks.
Issue/PR link
https://github.com/hwakabh/hwakabh.github.io/actions/runs/12098320866/job/33734653559
What does this PR do?
Describe what changes you make in your branch:
node-versionofactions/setup-nodein CI same as version defined inpackage.jsonrel="noopener noreferrer"for external link(Optional) Additional Contexts
Describe additional information for reviewers (i.e. What does not included)
mainto confirm changes would be appliedSummary by CodeRabbit
Summary by CodeRabbit
Chores
New Features
rel="noopener noreferrer"to the anchor tag.Bug Fixes