github: Remove the disfunc open collective #1
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
| env: | ||
| TESTS_TIMEOUT: 10 # in minutes | ||
| on: | ||
| workflow_call: | ||
| jobs: | ||
| potfiles: | ||
| name: Check POTFILES.in | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Repository checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Check POTFILES.in | ||
| run: .github/workflows/check-potfiles.sh | ||
| jobs: | ||
| shellcheck: | ||
| name: Differential ShellCheck | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Repository checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Differential ShellCheck | ||
| uses: redhat-plumbers-in-action/differential-shellcheck@v4 | ||
| with: | ||
| severity: warning | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| block-autosquash: | ||
| name: Block Autosquash Commits | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check out flatpak | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Determine PR number | ||
| run: | | ||
| if [[ "${{ github.event_name }}" == "merge_group" ]]; then | ||
| echo "Running in merge_group context" | ||
| echo "Branch ref: $GITHUB_REF_NAME" | ||
| PR_NUMBER=$(echo "$GITHUB_REF_NAME" | grep -oP 'pr-\K[0-9]+') | ||
| elif [[ "${{ github.event_name }}" == "pull_request" ]]; then | ||
| echo "Running in pull_request context" | ||
| PR_NUMBER="${{ github.event.pull_request.number }}" | ||
| else | ||
| echo "Unsupported event: ${{ github.event_name }}" | ||
| exit 1 | ||
| fi | ||
| echo "Resolved PR Number: $PR_NUMBER" | ||
| echo "PR_NUMBER=$PR_NUMBER" >> "$GITHUB_ENV" | ||
| - name: Check for fixup/squash commits in PR ${{ env.PR_NUMBER }} | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| run: | | ||
| gh pr view "$PR_NUMBER" --json commits --jq '.commits[].messageHeadline' | \ | ||
| grep -E '^(fixup!|squash!)' && \ | ||
| { echo "❌ Found fixup!/squash! commits in PR #$PR_NUMBER"; exit 1; } || \ | ||
| echo "✅ PR #$PR_NUMBER is clean!" | ||