test: make compose visibility queue-aware #47
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: Workitems archive lock | |
| on: | |
| push: | |
| paths: | |
| - 'workitems/**' | |
| pull_request: | |
| paths: | |
| - 'workitems/**' | |
| jobs: | |
| check: | |
| name: No new workitem files | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 2 | |
| - name: Reject new files outside _archive and _templates | |
| run: | | |
| # On push, compare to previous commit; on PR compare to base | |
| if [ "${{ github.event_name }}" = "pull_request" ]; then | |
| BASE=${{ github.event.pull_request.base.sha }} | |
| else | |
| BASE=HEAD~1 | |
| fi | |
| NEW=$(git diff --name-only --diff-filter=A "$BASE" HEAD \ | |
| -- 'workitems/**/*.md' \ | |
| | grep -v '^workitems/_archive/' \ | |
| | grep -v '^workitems/_templates/' \ | |
| || true) | |
| if [ -n "$NEW" ]; then | |
| echo "::error::New files in workitems/ are not allowed after GitHub Issues migration." | |
| echo "Create a GitHub Issue instead: https://github.com/rcarmo/piclaw/issues/new/choose" | |
| echo "" | |
| echo "Rejected files:" | |
| echo "$NEW" | |
| exit 1 | |
| fi | |
| echo "No new workitem files — OK." |