Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Replace the label checks using bash script by ruled-labels #1576

Merged
merged 56 commits into from
Dec 12, 2022
Merged
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
06f9c27
Add rules and specs
chevdor Aug 29, 2022
1b9bd11
add labels
alvicsam Aug 30, 2022
ca08d7e
Add new checks
chevdor Aug 31, 2022
485bab8
Fix criticality check
chevdor Aug 31, 2022
0d395c1
Use the new rule filter introduced in ruled-labels v0.3.0 to better t…
chevdor Sep 2, 2022
2b76ad3
Add workflow to tests label rules
chevdor Sep 2, 2022
22fa2f3
Fix trigger
chevdor Sep 2, 2022
3fd9f9b
Add new GH Workflow
chevdor Sep 2, 2022
e06eb58
Don't swallow failures but allow them
chevdor Sep 2, 2022
93432e2
Fix new script
chevdor Sep 2, 2022
aeb4d43
Simplify check
chevdor Sep 2, 2022
d8025e0
Fix Workflow
chevdor Sep 2, 2022
40b009d
Remove dup var
chevdor Sep 2, 2022
b627874
Fix vars
chevdor Sep 2, 2022
b650e2c
Move pull image to separate step
chevdor Sep 2, 2022
2f603e2
Remove continue on error
chevdor Sep 2, 2022
7272cba
Show input list of labels
chevdor Sep 2, 2022
7c21220
Merge remote-tracking branch 'origin/master' into wk-220829-ruled_labels
Oct 5, 2022
78cdc3c
Fix check-labels workflow
chevdor Oct 6, 2022
068a6aa
Remove Docker -it flags
chevdor Oct 6, 2022
fbeb7fc
Prevent shell from splitting on spaces
chevdor Oct 6, 2022
36fea89
Fix rules path
chevdor Oct 6, 2022
2747a66
Comment out rules related to labels not present in the repo
chevdor Oct 6, 2022
a8a5802
Fix tests
chevdor Oct 6, 2022
f5eaa51
Fix labels specs and tests
Oct 7, 2022
480ff65
fix test
the-right-joyce Oct 11, 2022
bef76f9
new label description and rules
the-right-joyce Oct 31, 2022
790010b
fix tests
the-right-joyce Oct 31, 2022
f4a1c60
use ruled_labels as crate
alvicsam Nov 9, 2022
03445db
fix toolchain
alvicsam Nov 9, 2022
fcc1be9
fix component
alvicsam Nov 9, 2022
768e5d7
move from docker to crate
alvicsam Nov 9, 2022
fa42ebb
fix test
alvicsam Nov 9, 2022
d5c0018
fail without labels
alvicsam Nov 9, 2022
7dc0a98
add cache
alvicsam Nov 9, 2022
04397d0
fix check no labels
alvicsam Nov 9, 2022
aa8be5b
add D-labels check
alvicsam Nov 9, 2022
efac3a0
fix emtpy label check
alvicsam Nov 9, 2022
66f7475
try docker
alvicsam Nov 10, 2022
86401c9
fix specs
alvicsam Nov 10, 2022
d27a373
test D label
alvicsam Nov 10, 2022
f4b6e7e
revert Cargo.toml
alvicsam Nov 10, 2022
b1fb7aa
use tags for ruled_labels
alvicsam Nov 10, 2022
4be1954
fix rules
alvicsam Nov 10, 2022
295acf5
test D label
alvicsam Nov 10, 2022
4522dd4
fix tags
alvicsam Nov 10, 2022
ee5ae94
remove changes
alvicsam Nov 10, 2022
79cb53a
add PR tag to single criticality rule
the-right-joyce Nov 10, 2022
da9b635
Merge branch 'wk-220829-ruled_labels' of https://github.com/paritytec…
the-right-joyce Nov 10, 2022
71131c0
remove old line
alvicsam Nov 16, 2022
a55a31e
Merge branch 'master' into wk-220829-ruled_labels
alvicsam Nov 16, 2022
5865d0d
test ruled_labels test
alvicsam Nov 16, 2022
c62ec4a
disable Check label Rules
alvicsam Nov 16, 2022
713cd33
fix GHA name
alvicsam Nov 16, 2022
75fc005
fix tests
alvicsam Nov 21, 2022
dee90ab
rename files, upd ruled_labels 0.3.2
alvicsam Nov 21, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix new script
  • Loading branch information
chevdor committed Sep 2, 2022
commit 93432e29c403e651f7bb70d58c089b3e7441a862
12 changes: 10 additions & 2 deletions scripts/ci/github/check_labels_new.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,18 @@ api_base="https://api.github.com/repos"
repo="$GITHUB_REPOSITORY"
pr_id="$GITHUB_PR"

echo "repo: $repo"
echo "pr_ir: $pr_id"

pushd "$DIR/../ruled_labels" > /dev/null

# Fetch the labels for the PR under test
labels=$(curl -H "Authorization: token $GITHUB_PR_TOKEN" -s "$api_base/$repo/pulls/$pr_id" | jq ".labels | .[] " | grep '"name":' | tr -d ',' | sed 's/ "name": //g' | tr -d '"' | awk '{ORS=" "} {print$NF}')
labels="$(curl -H "Authorization: token $GITHUB_PR_TOKEN" -s "$api_base/$repo/pulls/$pr_id" | jq ".labels | .[] | .name" | tr '\n' ' ')"

echo "labels: $labels"

ruled-labels --version
ruled-labels check --labels "${labels}"
cmd='ruled-labels check --labels '${labels[@]}
echo "cmd: $cmd"
bash -c "$cmd"
# ruled-labels check --labels ${labels[@]}