build(deps): bump tj-actions/verify-changed-files from 4a3570896cbdc5dca56a7a259fba88667845e18a to f7c3c7390ed5c5435233c9bb76d8c0ad5f99ba26 #2129
Workflow file for this run
This file contains hidden or 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: Issue and PRs Labeler | |
| on: | |
| issues: | |
| types: [opened, edited] | |
| pull_request: | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| - ready_for_review | |
| jobs: | |
| labeler: | |
| name: Add Label to PRs and Issues | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write # Needed by labeler | |
| issues: write # Needed by labeler | |
| steps: | |
| - uses: GitHubSecurityLab/actions-permissions/monitor@v1 | |
| with: | |
| config: ${{ vars.PERMISSIONS_CONFIG }} | |
| - name: Checkout repo | |
| uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
| - name: Add Labels | |
| uses: srvaroa/labeler@0a20eccb8c94a1ee0bed5f16859aece1c45c3e55 | |
| env: | |
| GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
| with: | |
| config_path: .github/labeler.yaml | |
| use_local_config: true | |
| slack-notification-doc-team: | |
| needs: labeler | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write # Needed by sticky-pull-request-comment | |
| steps: | |
| - uses: GitHubSecurityLab/actions-permissions/monitor@v1 | |
| with: | |
| config: ${{ vars.PERMISSIONS_CONFIG }} | |
| - name: Get PR labels | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| OWNER: ${{ github.repository_owner }} | |
| REPO_NAME: ${{ github.event.repository.name }} | |
| PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} | |
| run: | | |
| labels=$(gh api repos/"$OWNER"/"$REPO_NAME"/pulls/"$PULL_REQUEST_NUMBER" --jq '.labels.[].name') | |
| echo "Labels: $labels" | |
| if echo "$labels" | grep -q "need-doc-review"; then | |
| echo "review_needed=true" >> "$GITHUB_ENV" | |
| fi | |
| - uses: marocchino/sticky-pull-request-comment@52423e01640425a022ef5fd42c6fb5f633a02728 | |
| id: append_comment | |
| if: env.review_needed == 'true' | |
| with: | |
| header: pr-title-slack-doc | |
| message: "APIx Bot :bowtie:: a message has been sent to Docs Slack channel :rocket:." | |
| - uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d | |
| if: env.review_needed == 'true' && steps.append_comment.outputs.previous_comment_id == '' | |
| env: | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_DOCS }} | |
| SLACK_WEBHOOK_TYPE: incoming_webhook | |
| with: | |
| payload: | | |
| { | |
| "blocks": [ | |
| { | |
| "type": "section", | |
| "text": { | |
| "type": "mrkdwn", | |
| "text": "hey ${{ secrets.SLACK_DOCS_TAG }}, this is APIx Bot :aileafy:, could you please review <${{ github.event.pull_request.html_url }}|PR ${{ github.event.pull_request.number }}> :pretty-please:? thanks a lot!" | |
| } | |
| } | |
| ] | |
| } |