Repository navigation
Report type errors in function/method-calls on lower level, when MixedType is involved in Ternary #1035
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
| # https://help.github.com/en/categories/automating-your-workflow-with-github-actions | ||
|
Check warning on line 1 in .github/workflows/close-issues-on-merge.yml
|
||
| name: Close issues from merged PRs | ||
| on: | ||
| pull_request_target: | ||
| branches: | ||
| - "2.1.x" | ||
| types: | ||
| - closed | ||
| permissions: | ||
| contents: read | ||
| jobs: | ||
| close-issues: | ||
| name: Close linked issues | ||
| if: github.repository_owner == 'phpstan' && github.event.pull_request.merged == true | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Harden the runner (Audit all outbound calls) | ||
| uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4 | ||
| with: | ||
| egress-policy: audit | ||
| - name: "Find and close linked issues" | ||
| env: | ||
| GH_TOKEN: ${{ secrets.PHPSTAN_BOT_TOKEN }} | ||
| run: | | ||
| PR_BODY=$(gh pr view ${{ github.event.pull_request.number }} --repo "${{ github.repository }}" --json body --jq '.body') | ||
| # Parse "Closes/Fixes https://github.com/phpstan/phpstan/issues/123" and "Closes/Fixes phpstan/phpstan#123" patterns | ||
| NUMBERS=$(echo "$PR_BODY" | grep -oiP '(?:closes?|fix(?:es)?)\s+(?:https://github\.com/phpstan/phpstan/issues/|phpstan/phpstan#)[0-9]+' | grep -oP '[0-9]+$' || true) | ||
| NUMBERS=$(echo "$NUMBERS" | sort -u) | ||
| if [ -z "$NUMBERS" ]; then | ||
| echo "No linked issues found in PR body" | ||
| exit 0 | ||
| fi | ||
| echo "$NUMBERS" | while read -r NUMBER; do | ||
| echo "Closing phpstan/phpstan#${NUMBER}" | ||
| gh issue close "$NUMBER" --repo "phpstan/phpstan" --comment "Closed via merging ${{ github.event.pull_request.html_url }}" | ||
| done | ||