From b2a21bfb27c082f5fec1668c0f9fb2f5754c0c2f Mon Sep 17 00:00:00 2001 From: ericluoliu Date: Tue, 29 Jun 2021 16:29:47 -0700 Subject: [PATCH 1/4] fix-contributors-list --- scripts/release.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/release.py b/scripts/release.py index 6892a0758ea..2d8255e8918 100644 --- a/scripts/release.py +++ b/scripts/release.py @@ -22,6 +22,11 @@ def announce(version): contributors = set(stdout.splitlines()) + # remove strings within contributors that have substring "[bot]" + for name in contributors: + if "[bot]" in name: + contributors.remove(name) + template_name = ( "release.minor.rst" if version.endswith(".0") else "release.patch.rst" ) From 87d9a7e7ca3a49b4bd3cc8e2d045f1327ff515b6 Mon Sep 17 00:00:00 2001 From: ericluoliu Date: Wed, 30 Jun 2021 06:31:39 -0700 Subject: [PATCH 2/4] remove-bots --- scripts/release.py | 9 +++------ totalContributors.py | 11 +++++++++++ 2 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 totalContributors.py diff --git a/scripts/release.py b/scripts/release.py index 2d8255e8918..d90b62a3df7 100644 --- a/scripts/release.py +++ b/scripts/release.py @@ -20,12 +20,9 @@ def announce(version): stdout = check_output(["git", "log", f"{last_version}..HEAD", "--format=%aN"]) stdout = stdout.decode("utf-8") - contributors = set(stdout.splitlines()) - - # remove strings within contributors that have substring "[bot]" - for name in contributors: - if "[bot]" in name: - contributors.remove(name) + contributors = { + name for name in stdout.splitlines() if not name.endswith("[bot]") + } template_name = ( "release.minor.rst" if version.endswith(".0") else "release.patch.rst" diff --git a/totalContributors.py b/totalContributors.py new file mode 100644 index 00000000000..2dc1f4cf755 --- /dev/null +++ b/totalContributors.py @@ -0,0 +1,11 @@ +import subprocess +PIPE = subprocess.PIPE +branch = 'my_branch' + +process = subprocess.Popen(['git', 'pull', branch], stdout=PIPE, stderr=PIPE) +stdoutput, stderroutput = process.communicate() + +if 'fatal' in stdoutput: + # Handle error case +else: + # Success! \ No newline at end of file From 3f094d4b38edf9b8c0aaeae55ceeffb719c93278 Mon Sep 17 00:00:00 2001 From: ericluoliu Date: Wed, 30 Jun 2021 06:35:06 -0700 Subject: [PATCH 3/4] delete-extraneous-file --- totalContributors.py | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 totalContributors.py diff --git a/totalContributors.py b/totalContributors.py deleted file mode 100644 index 2dc1f4cf755..00000000000 --- a/totalContributors.py +++ /dev/null @@ -1,11 +0,0 @@ -import subprocess -PIPE = subprocess.PIPE -branch = 'my_branch' - -process = subprocess.Popen(['git', 'pull', branch], stdout=PIPE, stderr=PIPE) -stdoutput, stderroutput = process.communicate() - -if 'fatal' in stdoutput: - # Handle error case -else: - # Success! \ No newline at end of file From 97fb49df034482a8127bf28d5e9d41fe45cf4058 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 30 Jun 2021 13:36:48 +0000 Subject: [PATCH 4/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- scripts/release.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/release.py b/scripts/release.py index d90b62a3df7..2cfe063e981 100644 --- a/scripts/release.py +++ b/scripts/release.py @@ -20,9 +20,7 @@ def announce(version): stdout = check_output(["git", "log", f"{last_version}..HEAD", "--format=%aN"]) stdout = stdout.decode("utf-8") - contributors = { - name for name in stdout.splitlines() if not name.endswith("[bot]") - } + contributors = {name for name in stdout.splitlines() if not name.endswith("[bot]")} template_name = ( "release.minor.rst" if version.endswith(".0") else "release.patch.rst"