From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- src/doc/rustc-dev-guide/ci/check-in.sh | 38 ++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 src/doc/rustc-dev-guide/ci/check-in.sh (limited to 'src/doc/rustc-dev-guide/ci/check-in.sh') diff --git a/src/doc/rustc-dev-guide/ci/check-in.sh b/src/doc/rustc-dev-guide/ci/check-in.sh new file mode 100755 index 000000000..4477789c7 --- /dev/null +++ b/src/doc/rustc-dev-guide/ci/check-in.sh @@ -0,0 +1,38 @@ +#!/bin/sh + +set -eu + +# This is not a very smart script +if [ $# != 2 ]; then + echo "usage: $0 " + if [ $# = 0 ]; then + echo "help: you can find the last check-in at" \ + "https://rust-lang.zulipchat.com/#narrow/stream/238009-t-compiler.2Fmeetings/search/wg-rustc-dev-guide" + elif [ $# = 1 ] ; then + echo "help: you can find the number of PRs merged at" \ + "https://github.com/rust-lang/rustc-dev-guide/pulls?q=is%3Apr+is%3Amerged+updated%3A%3E$1" + fi + exit 1 +fi + +curl() { + command curl -s "$@" +} + +# Get recently updated PRs +curl "https://api.github.com/repos/rust-lang/rustc-dev-guide/pulls?state=closed&per_page=$2" \ + | jq '[.[] | select(.merged_at > "'"$1"'")]' > pulls.json + +show_pulls() { + jq -r '.[] | { title, number, html_url, user: .user.login } | "- " + .title + " [#" + (.number | tostring) + "](" + .html_url + ")"' +} + +echo "### Most notable changes" +echo +show_pulls < pulls.json +echo +echo "### Most notable WIPs" +echo +# If there are more than 30 PRs open at a time, you'll need to set `per_page`. +# For now this seems unlikely. +curl "https://api.github.com/repos/rust-lang/rustc-dev-guide/pulls?state=open" | show_pulls -- cgit v1.2.3