You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# This workflow is designed to verify that the pull request description contains a "## Backport" section, which is important as a reminder to account for backports for anyone that works with NGO repository.
2
+
# We have 2 development branches (develop and develop-2.0.0) and we need to ensure that relevant changes are landing in only one or both of them
3
+
# If the "##Backport" section is missing, the workflow will fail and block the PR from merging, prompting the developer to add this section.
4
+
5
+
# The workflow is configured to run when PR is created as well as when it is edited which also counts simple description edits.
6
+
7
+
name: "NGO - Backport Verification"
8
+
9
+
on:
10
+
pull_request:
11
+
types: [opened, edited]
12
+
branches:
13
+
- develop
14
+
- develop-2.0.0
15
+
16
+
jobs:
17
+
backport-verification:
18
+
runs-on: ubuntu-latest
19
+
steps:
20
+
- name: Checkout code
21
+
uses: actions/checkout@v3
22
+
23
+
- name: Check PR description
24
+
uses: actions/github-script@v6
25
+
with:
26
+
script: |
27
+
const pr = context.payload.pull_request;
28
+
const body = pr.body || '';
29
+
30
+
if (!body.includes('## Backport')) {
31
+
core.setFailed('PR description must include a "## Backport" section. Please add this section and provide information about this PR backport to develop or develop-2.0.0 branch respectively or explain why backport is not needed.');
0 commit comments