From 1a018c571b39b20af18eb13e7a2c54d13a9b4759 Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Wed, 14 Dec 2022 08:34:08 +0200 Subject: [PATCH] chore: Add PR Lint workflow (#5387) Fixes #5381 --- .github/semantic.yaml | 56 --------------------------------------- .github/workflows/pr.yaml | 20 ++++++++++++++ 2 files changed, 20 insertions(+), 56 deletions(-) delete mode 100644 .github/semantic.yaml create mode 100644 .github/workflows/pr.yaml diff --git a/.github/semantic.yaml b/.github/semantic.yaml deleted file mode 100644 index aeb4d469b7..0000000000 --- a/.github/semantic.yaml +++ /dev/null @@ -1,56 +0,0 @@ -############################################################################### -# This file configures "Semantic Pull Requests", which is documented here: -# https://github.com/zeke/semantic-pull-requests -# -# This action/spec implements the "Conventional Commits" RFC which is -# available here: -# https://www.notion.so/coderhq/Conventional-commits-1d51287f58b64026bb29393f277734ed -############################################################################### - -# We have no valid scopes right now. -# A scope should be added when commits aren't aligning with associated change anymore. -scopes: - -# We only check that the PR title is semantic. The PR title is automatically -# applied to the "Squash & Merge" flow as the suggested commit message, so this -# should suffice unless someone drastically alters the message in that flow. -titleOnly: true - -# Types are the 'tag' types in a commit or PR title. For example, in -# -# chore: fix thing -# -# 'chore' is the type. -types: - # A build of any kind. - - build - - # Any code task that operates outside of CI, docs, or the product. Examples - # include configurations, linters etc. - - chore - - # Any work performed on CI. - - ci - - - example - - # Work that directly implements or supports the implementation of a feature. - - feat - - # A fix for either a released or unrelesed bug. - - fix - - # A fix for a released bug (regression fix) that is intended for patch-release - # purposes. - - hotfix - - # A refactor changes code structure without any behavioral change. - - refactor - - # A git revert for any style of commit. - - revert - - # Adding tests of any kind. Should be separate from feature or fix - # implementations. For example, if a commit adds a fix + test, it's a fix - # commit. If a commit is simply bumping coverage, it's a test commit. - - test diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml new file mode 100644 index 0000000000..5faca9fd81 --- /dev/null +++ b/.github/workflows/pr.yaml @@ -0,0 +1,20 @@ +name: Lint PR + +on: + pull_request_target: + types: + - opened + - reopened + - edited + - synchronize + +jobs: + main: + name: Validate PR title + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + requireScope: false