Skip to content

Fix(docker): resolve 404 error #81

Fix(docker): resolve 404 error

Fix(docker): resolve 404 error #81

name: PR Commit Convention Linter
on:
pull_request:
types: [opened, synchronize, reopened]
permissions:
pull-requests: write
jobs:
commit-lint:
runs-on: ubuntu-latest
steps:
- name: Minimal Git clone without actions/checkout
run: |
git init
git remote add origin https://github.com/${{ github.repository }}.git
git fetch origin ${{ github.event.pull_request.head.ref }} --depth=1
git checkout FETCH_HEAD
- name: Install GitHub CLI and Python
run: |
sudo apt-get update
sudo apt-get install -y gh python3
- name: Get latest commit message
id: get_commit
run: |
git log -1 --pretty=format:"%s" > commit.txt
- name: Validate commit message and suggest fix
id: validate
run: |
echo "invalid=0" >> $GITHUB_OUTPUT
echo "suggestion=" >> $GITHUB_OUTPUT
python3 scripts/validate_commit.py
- name: Comment on PR if invalid
if: ${{ steps.validate.outputs.invalid == '1' }}
run: |
suggestion="${{ steps.validate.outputs.suggestion }}"
if [ -n "$suggestion" ]; then
gh pr comment "$PR_NUMBER" --body "🚫 One or more commit messages in this PR **do not follow the commit convention.**
💡 **Suggested fix**:
\`\`\`suggestion
$suggestion
\`\`\`
📘 See our [Wiki](https://github.com/khyeonm/2025_Advanced_Programming/wiki/Git-Commit-Convention) for details."
else
gh pr comment "$PR_NUMBER" --body "🚫 One or more commit messages in this PR **do not follow the commit convention.**
Please revise them to match the format: \`Feat(actions): add something cool\`
📘 See our [Wiki](https://github.com/khyeonm/2025_Advanced_Programming/wiki/Git-Commit-Convention) for details."
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}