Merge pull request #1668 from btat/workflow-sanitize-title

Sanitize title using intermediate var in workflow
This commit is contained in:
Billy Tat
2025-02-26 11:29:40 -08:00
committed by GitHub
+6 -4
View File
@@ -21,9 +21,11 @@ jobs:
- name: Create issue
env:
GH_TOKEN: ${{ github.token }}
REPO_TYPE: ${{ contains( github.repository, 'product-docs') && 'Product' || 'Community' }}
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
gh issue create \
--repo rancher/rancher-docs \
--title 'Port Community docs PR #${{github.event.pull_request.number}}: ${{github.event.pull_request.title}}' \
--body 'Reference: https://github.com/${{github.repository}}/pull/${{github.event.pull_request.number}}' \
--label port/community-product
--repo ${{ github.repository }} \
--title "Port $REPO_TYPE docs PR #${{ github.event.pull_request.number }}: $PR_TITLE" \
--body "Reference: https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }}" \
--label port/community-product