-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.justfile
More file actions
executable file
·52 lines (41 loc) · 1.13 KB
/
.justfile
File metadata and controls
executable file
·52 lines (41 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env -S just --justfile
set quiet := true
set shell := ['bash', '-euo', 'pipefail', '-c']
mod bootstrap
mod kubernetes
mod talos
[private]
default:
just -l
[private]
log lvl msg *args:
gum log -t rfc3339 -s -l "{{ lvl }}" "{{ msg }}" {{ args }}
[private]
template file *args:
minijinja-cli "{{ file }}" {{ args }} | op inject
merge type="":
#!/usr/bin/env bash
set -euo pipefail
if [[ -n "{{ type }}" ]]; then
if [[ ! "{{ type }}" =~ ^(digest|patch|minor|major)$ ]]; then
echo "Error: type must be one of: digest, patch, minor, major"
exit 1
fi
types=("{{ type }}")
else
types=("digest" "patch" "minor" "major")
fi
for type in "${types[@]}"; do
label="type/${type}"
prs=$(gh pr list \
--label "${label}" \
--state open \
--json number,labels \
--jq '.[] | select(.labels | map(.name) | contains(["hold"]) | not) | .number')
if [[ -z "${prs}" ]]; then
continue
fi
for pr in ${prs}; do
gh pr merge "${pr}" --rebase
done
done