mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
open_pr.sh's PR-dedup loop relied on `gh pr diff <num>` which the GitHub API refuses with HTTP 406 once a PR exceeds 300 changed files. Under `set -euo pipefail` that killed the workflow whenever any unrelated large PR was open against the same base branch. Replace the diff-hash check with a tree-SHA comparison: fetch each PR's head commit shallowly, compare `git log -1 --format=%T` against HEAD's tree. Same-tree means same end-state regardless of base SHA, whitespace, file order, or patch context. Unfetchable heads (deleted branches, lost permissions) fall through as non-duplicates instead of aborting the run. image_versions.sh / repository_refs.sh also pick up an explicit `# shellcheck disable=SC1091` above their `. .env` source since the dotenv file is generated at runtime and never present during shellcheck's static parse. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
14 lines
299 B
Bash
Executable File
14 lines
299 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
|
REPO_ROOT="$(cd -- "${SCRIPT_DIR}/../../.." && pwd)"
|
|
|
|
cd "${REPO_ROOT}"
|
|
make dotenv >/dev/null
|
|
set -a
|
|
# shellcheck disable=SC1091
|
|
. .env
|
|
set +a
|
|
python3 -m cli.contributing.update.repository "$@"
|