Skip to content

🐛 RZB-2500047: bugfix for canvas and survey pages #12

🐛 RZB-2500047: bugfix for canvas and survey pages

🐛 RZB-2500047: bugfix for canvas and survey pages #12

name: "Auto Replace X in Issue Title"
on:
issues:
types: [opened]
permissions:
issues: write
jobs:
update_issue_title:
runs-on: ubuntu-latest
steps:
- name: Replace 'X' with issue number
env:
GH_TOKEN: ${{ secrets.ISSUE_TOKEN }}
run: |
ISSUE_NUMBER=${{ github.event.issue.number }}
OLD_TITLE="${{ github.event.issue.title }}"
# Replace 'X' with the actual issue number in the title
NEW_TITLE=$(echo "$OLD_TITLE" | sed "s/X/$ISSUE_NUMBER/g")
# Update issue title using GitHub API
gh issue edit "$ISSUE_NUMBER" --title "$NEW_TITLE" --repo "${{ github.repository }}"
shell: bash