Skip to content

Commit

Permalink
chore: add PR title check to follow Git commit convention (#1178)
Browse files Browse the repository at this point in the history
Enforces PR naming to follow with the Git [commit
convention](https://www.conventionalcommits.org/en/v1.0.0/)
- Uses https://github.com/amannn/action-semantic-pull-request to check
- Fails to comply will result in the PR title check failing:

![image](https://github.com/user-attachments/assets/2c9da64b-b1a4-4347-9bd0-2ba5183498ec)
  • Loading branch information
hogo6002 authored Aug 21, 2024
1 parent 9f879f2 commit 2bc1b28
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: OSV PR format check

on:
# `pull_request_target` is only required when editing PRs from forks.
pull_request:
types:
- opened
- edited
- reopened

permissions:
pull-requests: read

jobs:
title-check:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 2bc1b28

Please sign in to comment.