This commit is contained in:
Harsh Shandilya 2023-01-12 16:47:22 +05:30
parent 22111dd3bd
commit c769d169a0
No known key found for this signature in database
2 changed files with 1 additions and 11 deletions

View File

@ -1,8 +0,0 @@
module.exports = async ({github, context}) => {
octokit.rest.issues.createComment({
owner: context.payload.repository.owner.login,
repo: context.payload.repository.name,
issue_number: context.payload.number,
body: `This PR is targeting the 'main' branch but did not originate from 'staging', please make sure this intentional`,
});
}

View File

@ -18,13 +18,11 @@ jobs:
- name: Validate PR head and base branches
if: "${{ github.base_ref == 'main' && github.head_ref != 'staging' }}"
uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0 # v6.3.3
id: validate-pr-base
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.rest.issues.createComment({
owner: context.payload.repository.owner.login,
repo: context.payload.repository.name,
issue_number: context.payload.number,
body: `This PR is targeting the 'main' branch but did not originate from 'staging', please make sure this intentional`,
body: `This PR is targeting the main branch but did not originate from staging, please make sure this intentional`,
});