build(mocha): bump mocha from 11.6.0 to 11.7.1 #146
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: Dependabot Pull Request Rename | |
| on: pull_request #_target | |
| permissions: | |
| pull-requests: write | |
| contents: write | |
| jobs: | |
| pull-request-title-change: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.actor == 'dependabot[bot]' }} | |
| steps: | |
| # Checkout the source code | |
| - name: 'Checkout source code' | |
| uses: actions/checkout@v4 | |
| - name: 'Fetch Dependabot metadata' | |
| id: dependabot-fetch | |
| uses: dependabot/fetch-metadata@v2 | |
| - name: 'Split title and update' | |
| id: split-title | |
| if: ${{ ! contains(github.event.pull_request.title, '):' ) && contains(github.event.pull_request.title, ':') && steps.dependabot-fetch.outcome == 'success' }} | |
| env: | |
| TITLE: ${{ github.event.pull_request.title }} | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| PR_URL: ${{github.event.pull_request.html_url}} | |
| run: | | |
| title_pt2="${TITLE##*:}" | |
| title_pt1="${TITLE%%:*}" | |
| gh pr checkout "$PR_URL" # sets the upstream metadata for `gh pr status` | |
| packagename="${{ steps.dependabot-fetch.outputs.dependency-names }}" | |
| parensOpen="(" | |
| parensClose="):" | |
| pr_title=$title_pt1$parensOpen$packagename$parensClose$title_pt2 | |
| gh pr edit "$PR_URL" --title "$pr_title" |