{"repo":"JJ/github-pr-contains-action","free":true,"listed":false,"github":"https://github.com/JJ/github-pr-contains-action","clone":"git clone https://github.com/JJ/github-pr-contains-action.git","description":"Action that checks whether the body or diff in a PR contains a certain word.","language":"TypeScript","stars":40,"topics":["github-actions","github","hacktoberfest","hacktoberfest2021","hacktoberfest2023"],"license":"MIT","category":"workflow-automation","readme_excerpt":"A GitHub action that checks pull requests description and contents This GitHub action checks for the presence/absence of a string or group of strings in the body of the pull request or the file diffs, as well as certain conditions in the PR: number of files changed, and number of lines changed. It uses the GitHub API, so you'll need to provide a token. Don't worry, that's built-in. Using this action You would need to put this in a YAML file ( .github/workflows/check-pr.yml , for instance) in the .github/workflows directory: The pull request event is needed, because it will use its payload. The bodyContains variable will include the string that we want the body of the PR to include, such as checked items in a checklist; obviously bodyDoesNotContain will hold the opposite, what we don't want to see in the PR body. Any of them can have a separated list of words or expressions. The PR will check it contains any of the words in bodyContains and none of the words in bodyDoesNotContain . Same pattern for diff(Contains DoesNotContain) . Can be a word or list of words you want in the diff (for instance, you want it to always change code so it contains a statement terminator) or don't want in the diff (for instance, you don't want it to include TODOs because people never ever do them). If you want to allow check marks, remember to use an expression such as [x] [X] , since both are admissible as such in a body. These strings are unwittingly converted into regular expressions, so any reg","default_branch":null,"files":null,"tree":[],"storefront":"/r/JJ","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/JJ/github-pr-contains-action/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}