forked from demisto/content
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (36 loc) · 1.5 KB
/
check-contributor-pack.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Check contributor packs
on:
pull_request:
branches:
- master
permissions:
pull-requests: write
jobs:
check_contributor_pack:
runs-on: ubuntu-latest
if: github.repository == 'demisto/content' && startsWith(github.head_ref, 'contrib/') == false && startsWith(github.head_ref, 'to-merge/') == false && contains(github.head_ref, 'xsoar-bot-contrib-ContributionTestPack') == false && github.event.pull_request.head.repo.fork == false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Setup Poetry
uses: Gr1N/setup-poetry@v9
- name: Install python dependencies
run: |
poetry install --with github-actions
- name: Check pack and request review
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
BRANCH_NAME: ${{ github.head_ref }}
SENDGRID_EMAIL_API_KEY: ${{ secrets.SENDGRID_EMAIL_API_KEY }}
if: env.SENDGRID_EMAIL_API_KEY
run: |
echo "PR number is: $PR_NUMBER"
echo "Target branch name is: $BRANCH_NAME"
echo "Starting check of contributor packs"
poetry run python ./.github/github_workflow_scripts/request_contributor_review.py --pr_number $PR_NUMBER --github_token $GITHUB_TOKEN --email_api_token $SENDGRID_EMAIL_API_KEY
echo "Finished check of contributor packs"