mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
synchronize makefile.common for community (#7108)
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
This commit is contained in:
parent
002b391dfc
commit
b3cf6ef332
|
@ -11,7 +11,7 @@ branch="makefile_common"
|
||||||
commit_msg="makefile: update Makefile.common with newer version"
|
commit_msg="makefile: update Makefile.common with newer version"
|
||||||
pr_title="Synchronize Makefile.common from prometheus/prometheus"
|
pr_title="Synchronize Makefile.common from prometheus/prometheus"
|
||||||
pr_msg="Propagating changes from master Makefile.common located in prometheus/prometheus."
|
pr_msg="Propagating changes from master Makefile.common located in prometheus/prometheus."
|
||||||
org="prometheus"
|
orgs="prometheus prometheus-community"
|
||||||
|
|
||||||
GITHUB_TOKEN="${GITHUB_TOKEN:-}"
|
GITHUB_TOKEN="${GITHUB_TOKEN:-}"
|
||||||
if [ -z "${GITHUB_TOKEN}" ]; then
|
if [ -z "${GITHUB_TOKEN}" ]; then
|
||||||
|
@ -28,10 +28,12 @@ source_checksum="$(sha256sum Makefile.common | cut -d' ' -f1)"
|
||||||
tmp_dir=$(mktemp -d)
|
tmp_dir=$(mktemp -d)
|
||||||
trap "rm -rf ${tmp_dir}" EXIT
|
trap "rm -rf ${tmp_dir}" EXIT
|
||||||
|
|
||||||
# Iterate over all repositories in ${org}. The GitHub API can return 100 items
|
for org in $orgs
|
||||||
# at most but it should be enough for us as there are less than 40 repositories
|
do
|
||||||
# currently.
|
# Iterate over all repositories in ${org}. The GitHub API can return 100 items
|
||||||
curl --retry 5 --silent -u "${git_user}:${GITHUB_TOKEN}" https://api.github.com/users/${org}/repos?per_page=100 2>/dev/null | jq -r '.[] | select( .name != "prometheus" ) | .name' | while read -r; do
|
# at most but it should be enough for us as there are less than 40 repositories
|
||||||
|
# currently.
|
||||||
|
curl --retry 5 --silent -u "${git_user}:${GITHUB_TOKEN}" https://api.github.com/users/${org}/repos?per_page=100 2>/dev/null | jq -r '.[] | select( .name != "prometheus" ) | .name' | while read -r; do
|
||||||
repo="${REPLY}"
|
repo="${REPLY}"
|
||||||
echo -e "\e[32mAnalyzing '${repo}'\e[0m"
|
echo -e "\e[32mAnalyzing '${repo}'\e[0m"
|
||||||
|
|
||||||
|
@ -67,4 +69,5 @@ curl --retry 5 --silent -u "${git_user}:${GITHUB_TOKEN}" https://api.github.com/
|
||||||
"https://api.github.com/repos/${org}/${repo}/pulls"
|
"https://api.github.com/repos/${org}/${repo}/pulls"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue