Profilers #139312
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
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" |