Skip to content

fix(SENTINEL-239, 3.1.0): URLEncode Package Names #75

fix(SENTINEL-239, 3.1.0): URLEncode Package Names

fix(SENTINEL-239, 3.1.0): URLEncode Package Names #75

name: Slash Command Dispatch
env:
REPO_OWNER: "${{ vars.REPO_OWNER }}"
REPO_NAME: "${{ vars.REPO_NAME }}"
on:
issue_comment:
types: [created]
pull_request:
types: [closed]
concurrency:
group: "slash-command-${{ github.event.issue.number || github.run_id }}"
cancel-in-progress: true
permissions:
contents: read
issues: write
pull-requests: write
jobs:
pull-request-status:
if: |
github.actor != 'dependabot[bot]' &&
!github.event.pull_request.head.repo.fork &&
github.event.issue.pull_request &&
(
contains(github.event.comment.body, '/package') ||
contains(github.event.comment.body, '/Package') ||
contains(github.event.comment.body, '/PACKAGE')
)
uses: ./.github/workflows/pullRequestStatus.yaml
slash-command-dispatch:
runs-on: ubuntu-latest
needs: pull-request-status
if: |
needs.pull-request-status.outputs.isPullRequestMerged == 'False' &&
!github.event.pull_request.head.repo.fork
steps:
- name: Generate GitHub App token
id: generate_token
uses: actions/create-github-app-token@333678481b1f02ee31fa1443aba4f1f7cb5b08b5 # v2.0.0
with:
app-id: ${{ secrets.APPLICATION_ID }}
private-key: ${{ secrets.APPLICATION_PRIVATE_KEY }}
- name: Dispatch slash command
uses: peter-evans/slash-command-dispatch@4e1c50465f191a0ce64750ff69c4c96bd25745c7 # v4.0.0
with:
token: ${{ steps.generate_token.outputs.token }}
permission: none
commands: package,Package,PACKAGE
repository: ${{ env.REPO_OWNER }}/${{ env.REPO_NAME }}
issue-type: pull-request
reactions: false
add-auto-package-label:
name: Add auto-package label
needs: slash-command-dispatch
if: success()
uses: ./.github/workflows/addLabelOnPr.yaml
with:
labelName: "auto-package"
secrets: inherit