-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add linear check * Update pull_request_template.md
- Loading branch information
Showing
2 changed files
with
34 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
## Description | ||
[Provide a brief description of the changes in this PR] | ||
|
||
[Provide a brief description of the changes in this PR] | ||
|
||
## How Has This Been Tested? | ||
[Describe the tests you ran to verify your changes] | ||
|
||
[Describe the tests you ran to verify your changes] | ||
|
||
## Backporting (check the box to trigger backport action) | ||
|
||
Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches. | ||
|
||
- [ ] This PR should be backported (make sure to check that the backport attempt succeeds) | ||
- [ ] [Optional] Override Linear Check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Ensure PR references Linear | ||
|
||
on: | ||
pull_request: | ||
types: [opened, edited, reopened, synchronize] | ||
|
||
jobs: | ||
linear-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check PR body for Linear link or override | ||
run: | | ||
PR_BODY="${{ github.event.pull_request.body }}" | ||
# Looking for "https://linear.app" in the body | ||
if echo "$PR_BODY" | grep -qE "https://linear\.app"; then | ||
echo "Found a Linear link. Check passed." | ||
exit 0 | ||
fi | ||
# Looking for a checked override: "[x] Override Linear Check" | ||
if echo "$PR_BODY" | grep -q "\[x\].*Override Linear Check"; then | ||
echo "Override box is checked. Check passed." | ||
exit 0 | ||
fi | ||
# Otherwise, fail the run | ||
echo "No Linear link or override found in the PR description." | ||
exit 1 |