From fbe5661871ff87ae100378e3e7b75ceaa0976890 Mon Sep 17 00:00:00 2001 From: Rubens Farias Date: Wed, 18 Jan 2023 12:04:22 -0300 Subject: [PATCH] Add PR Title Linter (#96) We want to use a PR title to enforce cleaner PR titles --- .github/workflows/pr-title.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/pr-title.yaml diff --git a/.github/workflows/pr-title.yaml b/.github/workflows/pr-title.yaml new file mode 100644 index 0000000..b114603 --- /dev/null +++ b/.github/workflows/pr-title.yaml @@ -0,0 +1,18 @@ +name: Lint PR Title +# Prevent writing to the repository using the CI token. +# Ref: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#permissions +permissions: + pull-requests: read +on: + pull_request: + # By default, a workflow only runs when a pull_request's activity type is opened, + # synchronize, or reopened. We explicity override here so that PR titles are + # re-linted when the PR text content is edited. + types: + - opened + - edited + - reopened + - synchronize +jobs: + lint: + uses: bufbuild/base-workflows/.github/workflows/pr-title.yaml@main