blob: 83b0f648e0a6e5aaf7d5115fe1dfc6f005bc6cb7 [file] [log] [blame]
philwoef4936c2019-06-24 04:56:54 -07001#!/usr/bin/env bash
Dmitry Lomovd6b5a2d2017-02-16 14:27:47 +00002#
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
Xiaoyi Shi47890ca2020-07-21 07:13:28 -070020NO_LABELS=$(curl -f https://api.github.com/repos/bazelbuild/bazel/labels 2>/dev/null | grep "url" | awk -f <(cat - <<-'EOD'
Dmitry Lomovd6b5a2d2017-02-16 14:27:47 +000021 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 }
32EOD
33))
philwoef4936c2019-06-24 04:56:54 -070034echo "https://github.com/bazelbuild/bazel/issues?utf8=✓&q=is%3Aopen%20-label%3A\"type%3A%20documentation\"%20-label%3A\"Under investigation\"${NO_LABELS}"