Skip to content

Midnight Ops: Mac trackpad key layout, slide, prone, melee, grenades, map #177

Midnight Ops: Mac trackpad key layout, slide, prone, melee, grenades, map

Midnight Ops: Mac trackpad key layout, slide, prone, melee, grenades, map #177

Workflow file for this run

# Every pull request that changes something players can see must add a What's new entry as its own file,
# e63334287a3deaa3/news/<name>.json (see e63334287a3deaa3/news/README.md and CLAUDE.md). The entry gets its version
# and date when it is merged (whats-new-publish.yml), so pull requests never edit the same lines of news.js.
# Changes to only docs (README, CLAUDE.md, .github) pass without one, and a pull request labelled "no-news" skips
# the check.
name: What's new entry
on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
jobs:
news:
runs-on: ubuntu-latest
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-news') }}
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0, persist-credentials: false }
- name: Check for a What's new entry
run: |
base="${{ github.event.pull_request.base.sha }}"
files="$(git diff --name-only "$base"...HEAD)"
echo "$files"
visible="$(echo "$files" | grep -vE '^(README\.md|CLAUDE\.md|\.github/)' || true)"
if [ -z "$visible" ]; then echo "Docs only: no entry needed."; exit 0; fi
if git diff "$base"...HEAD -- e63334287a3deaa3/news.js | grep -qE "^\+\s*\{date: '"; then
echo "::error file=e63334287a3deaa3/news.js::Don't add entries to news.js directly: it makes open pull requests conflict. Put the entry in its own file in e63334287a3deaa3/news/ instead (see the README there); it is added to news.js with its version and date when this is merged."
exit 1
fi
entries="$(git diff --name-only --diff-filter=AM "$base"...HEAD -- 'e63334287a3deaa3/news/*.json' | grep -v '/_' || true)"
if [ -z "$entries" ]; then
echo "::error::Add a What's new entry for this change as a new file in e63334287a3deaa3/news/ (copy _example.json; see the README there), or label the pull request no-news if players can't notice it."
exit 1
fi
node .github/scripts/news.js check $entries