Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

<!-- Add short version of the JIRA ticket to the PR title (e.g. "feat: new shiny feature [MTT-123]") -->

<!-- Add RFC link here if applicable. -->

## Changelog

- Added: The package whose Changelog should be added to should be in the header. Delete the changelog section entirely if it's not needed.
Expand All @@ -26,3 +24,9 @@
- [ ] Deprecation of the API is explained in the CHANGELOG.
- [ ] The users can understand why this API was removed and what they should use instead.
-->

## Backport

Link to the backport to develop branch (NGOv1.X) if applicable. If this is a backport, please add the following to the PR title: "\[Backport\] ..." .
If the backport is not needed please provide the reason why.
If "Backports" section will not be present it will lead to CI test failure
Comment thread
michalChrobot marked this conversation as resolved.
Outdated
32 changes: 32 additions & 0 deletions .github/workflows/backport-verification.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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.
# 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
# If the "##Backport" section is missing, the workflow will fail and block the PR from merging, prompting the developer to add this section.

# The workflow is configured to run when PR is created as well as when it is edited which also counts simple description edits.

name: "NGO - Backport Verification"

on:
pull_request:
types: [opened, edited]
branches:
- develop
- develop-2.0.0

jobs:
backport-verification:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Check PR description
uses: actions/github-script@v6
with:
script: |
const pr = context.payload.pull_request;
const body = pr.body || '';
if (!body.includes('## Backport')) {
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.');
}