Debian Codegraph @

crt/s2n/.github/bin/label_issues.sh

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2 set -eu
3
4 update_labelscip-shell shell shell-project 0.0.0 update_label().() {
5 # $1 is a username
6 USER=$1
7 # $2 is a cutoff date; use $(date +%Y-%m-%d) for now
8 DATE=$2
9
10 gh api -X GET search/issues -f q="repo:aws/s2n-tls is:open -label:s2n-core author:${USER} created:<${DATE}" > ${USER}.json
11 jqscip-shell system . . jq. -c -r '.items|.[]|.number' $USER.json > ${USER}_ISSUES.log
12 if [scip-shell system . . `[`. $(catscip-shell system . . cat. ${USER}_ISSUES.log|wcscip-shell system . . wc. -l) -eq 0 ]; then
13 echoscip-shell system . . echo. "No issues for ${USER}"
14 return
15 fi
16 echoscip-shell system . . echo. "Found $(catscip-shell system . . cat. ${USER}_ISSUES.log|wcscip-shell system . . wc. -l) issues for $USER, continue?"
17 read
18 for issue in $(catscip-shell system . . cat. ${USER}_ISSUES.log); do
19 echoscip-shell system . . echo. "Updating $issue"
20 echoscip-shell system . . echo. '["s2n-core"]'| gh api --silent -X POST repos/aws/s2n-tls/issues/$issue/labels --input -
21 done
22 echoscip-shell system . . echo. "Done with $USER"
23 }
24
25 internal="toidiu
26 zaherd
27 NLMalloy
28 ttjsu-aws
29 rday
30 agray256
31 tawdry-audrey
32 salusasecondus
33 dougch
34 lrstewart
35 goatgoose
36 camshaft
37 maddeleine
38 WesleyRosenblum"
39
40 maint="colmmacc
41 alexw91
42 baldwinmatt
43 soco
44 alexeblee"
45
46 for USER in ${internal}; do
47 update_labelscip-shell shell shell-project 0.0.0 update_label(). ${USER} $(datescip-shell system . . date. +%Y-%m-%d)
48 done
49
50 for USER in ${maint}; do
51 update_labelscip-shell shell shell-project 0.0.0 update_label(). ${USER} 2019-10-23
52 done