diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..0dacba0 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,21 @@ +name: Lint PR Title + +on: + pull_request: + types: [opened, reopened] + +jobs: + lint_pr_title: + runs-on: ubuntu-latest + steps: + - name: Check PR Title + run: | + title="${{ github.event.pull_request.title }}" + echo $title + if [[ $title =~ ^(chore|fix|feat) ]]; then + echo "PR title starts with 'chore', 'fix', or 'feat'" + exit 0 + else + echo "PR title did not start with 'chore', 'fix', or 'feat'" + exit 1 + fi diff --git a/README.md b/README.md new file mode 100644 index 0000000..c1f2bbb --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# Context + +This repo is for understanding GitHub contexts and command injection using the functionality. +