Skip to content

Commit d6b5a2d

Browse files
committed
Github query URL for all bugs sheriff needs to look at.
-- PiperOrigin-RevId: 147713590 MOS_MIGRATED_REVID=147713590
1 parent 6279efd commit d6b5a2d

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

scripts/url-for-sheriff.sh

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#! /usr/bin/env bash
2+
#
3+
# Copyright 2017 The Bazel Authors. All rights reserved.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
# Prints a github URL for all bugs sheriff needs to look at
18+
# (open, no category assigned)
19+
20+
NO_LABELS=$(curl https://api.github.com/repos/bazelbuild/bazel/labels 2>/dev/null | grep "url" | awk -f <(cat - <<-'EOD'
21+
BEGIN {
22+
ORS = ""
23+
}
24+
$2 ~ /.*category:.*/ {
25+
match($2, /(category:.*)\",/, cat)
26+
label = cat[1]
27+
label = gensub(":", "%3A", "g", label)
28+
label = gensub("+", "%2B", "g", label)
29+
# print label
30+
print "%20-label%3A\"" label "\""
31+
}
32+
EOD
33+
))
34+
echo "https://github.com/bazelbuild/bazel/issues?utf8=✓&q=is%3Aopen%20-label%3A\"type%3A%20documentation\"%20-label%3A\"Under investigation\"${NO_LABELS}"

0 commit comments

Comments
 (0)