Add pre-commit configuration and GitHub Actions for large file checks#37
Conversation
- Introduced a pre-commit hook to prevent committing files larger than 1MB. - Updated README to include instructions for setting up pre-commit. - Added GitHub Actions workflow to enforce the same large file check on pushes and pull requests to the main branch. - Updated several binary image files in the 'pytorchcon2025-report' directory.
Summary of ChangesHello @mino-park7, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request establishes a robust system for managing repository size by preventing the addition of excessively large files. It integrates Highlights
Changelog
Ignored Files
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
이 PR은 pre-commit과 GitHub Actions를 도입하여 1MB를 초과하는 파일이 저장소에 추가되는 것을 방지하는 좋은 변경입니다. 이를 통해 저장소 용량을 효율적으로 관리할 수 있습니다. 몇 가지 설정 오류와 문서상의 개선점을 발견하여 리뷰 코멘트를 남겼습니다. 특히 .pre-commit-config.yaml의 버전 오류는 훅 설치를 불가능하게 하므로 반드시 수정이 필요합니다. 제안된 내용을 확인하고 반영해 주시기 바랍니다.
|
|
||
| jobs: | ||
| check-large-files: | ||
| runs-on: ubuntu-latest |
There was a problem hiding this comment.
runner를 runner-base로 사용하시는건 어떨까요!
There was a problem hiding this comment.
넵, 이게 원래 이렇게 오래 기다리지는 않는데 뭔가 이상한 것 같습니다...! 제가 한 번 확인해보겠습니다!
This reverts commit 52b319f.
Add pre-commit and .github workflow
Pre-commit 1MB 파일 체크 — 수행 결과 요약
목적
Git 저장소에 1MB를 초과하는 파일이 커밋되는 것을 막아 저장소 용량 증가를 방지합니다.
추가·수정된 항목
1.
.pre-commit-config.yaml(신규)pre-commit-hooks의check-added-large-files--maxkb=1024→ 1MB 초과 시 커밋 거부git commit시 스테이징된 파일을 자동 검사2.
.github/workflows/check-large-files.yml(신규)main브랜치에 대한 push, pull_requestcheck-added-large-files만 실행 (--all-files로 전체 저장소 검사)3.
README.md(수정)사용 방법
참고
CI 워크플로우는
--all-files로 전체를 검사하므로, 해당 파일이 있으면 워크플로우가 실패함.→ 대용량 파일 압축·정리 후 push하거나, 정리 전까지 워크플로우를 비활성화할 수 있음.
Image resize in pytorchcon2025-report (using Claude Code)
Image Optimization Summary
Date: 2025-02-08
Target:
content/posts/pytorchcon2025-report/Method
sips --resampleWidth 1600(macOS built-in)--maxkb=1024(1MB)Results
Total: ~14.5MB -> ~7.2MB (50% reduction)
All files are now under the 1MB pre-commit threshold.