Skip to content

[CrowdStrike] Add motivations and adversary type as labels on IntrusionSet #211

[CrowdStrike] Add motivations and adversary type as labels on IntrusionSet

[CrowdStrike] Add motivations and adversary type as labels on IntrusionSet #211

name: PR conventions checks
on:
pull_request:
types: [opened, edited, reopened, ready_for_review, synchronize]
jobs:
check-organization:
name: Check if label can be setup based on organization
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v6
- name: Setting labels
uses: FiligranHQ/auto-label@1.0.0
with:
labels_by_organization: "{\"FiligranHQ\":[\"filigran team\"]}"
check-signed-commits:
name: Check signed commits in PR
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Information about how to sign commits see https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits
# "with comment" below does not work for forks.
run: |
echo "If you need to sign commits, Please see https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits"
- name: Check signed commits in PR on fail see above information.
uses: 1Password/check-signed-commits-action@v1
with:
comment: |
Thank you for your contribution, but we need you to sign your commits. Please see https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits
check-pr-issue:
name: Check Pull Request is linked to an issue
if: ${{ !contains(github.event.pull_request.labels.*.name, 'dependencies') }}
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Check for linked issues
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
REPO: ${{ github.repository }}
run: |
# Get PR details including linked issues
LINKED_ISSUES=$(gh pr view $PR_NUMBER --repo $REPO --json closingIssuesReferences --jq '.closingIssuesReferences | length')
if [ "$LINKED_ISSUES" -eq 0 ]; then
echo "::error::No linked issues found. Please link at least one issue to this Pull Request."
echo "You can link an issue by using keywords like 'Fixes #123', 'Closes #123', or 'Resolves #123' in the PR description."
exit 1
else
echo "✓ Found $LINKED_ISSUES linked issue(s)"
fi
check-pr-title-convention:
name: Check that PR title follows convention
if: ${{ github.event.pull_request.user.login != 'renovate[bot]' }}
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: Slashgear/action-check-pr-title@76166c63ec0b25cdbe693e5e972e83ca186313fb
with:
regexp: '^\[\w+.+\].+$'
flags: "gm"
helpMessage: "Format: '[Connector Name] Message' for example '[MISP] updating a doc page'. see https://github.com/OpenCTI-Platform/connectors/blob/master/CONTRIBUTING.md#contributing"