Skip to content

Fix/new precommit githuh actions static checker#818

Open
SortaCookie wants to merge 2 commits intoyoutube:mainfrom
SortaCookie:fix/new-precommit-githuh-actions-static-checker
Open

Fix/new precommit githuh actions static checker#818
SortaCookie wants to merge 2 commits intoyoutube:mainfrom
SortaCookie:fix/new-precommit-githuh-actions-static-checker

Conversation

@SortaCookie
Copy link
Copy Markdown
Contributor

LABEL TESTER PLEASE IGORE

Change-Id: I634e14f3876bc17f9c10110a185673bfda392aca
Change-Id: I4038b7bf410fff437e461f63fd996cd6bcdba535
@SortaCookie SortaCookie requested a review from a team as a code owner December 22, 2025 20:12
@SortaCookie SortaCookie requested review from fayev-g and removed request for a team December 22, 2025 20:12
@SortaCookie SortaCookie added the documentation Improvements or additions to documentation label Dec 22, 2025
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds actionlint as a pre-commit hook to statically check GitHub Actions workflows. This is a great addition for improving workflow reliability. I've suggested a few changes to use the official actionlint repository and a more specific file pattern for better security, maintainability, and efficiency.

Comment on lines +39 to +43
- repo: https://github.com/SortaCookie/actionlint
rev: v1.7.7
hooks:
- id: actionlint
files: ^.github/
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

For better security and maintainability, it's recommended to use the official actionlint repository instead of a fork. The official repository is actively maintained and provides its own pre-commit support.

Additionally, the files pattern can be made more specific to only target workflow files within the .github/workflows directory. This prevents the hook from running unnecessarily on other files in the .github directory.

I've suggested using the latest official release from rhysd/actionlint and a more precise regex for matching workflow files.

-   repo: https://github.com/rhysd/actionlint
    rev: v1.7.1
    hooks:
    -   id: actionlint
        files: ^\.github/workflows/.*\.(?:ya?ml)$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant