You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ka...@apache.org on 2021/11/23 21:15:59 UTC
[airflow-ci-infra] branch main updated: Add script to list out committers (#45)
This is an automated email from the ASF dual-hosted git repository.
kaxilnaik pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow-ci-infra.git
The following commit(s) were added to refs/heads/main by this push:
new 2317624 Add script to list out committers (#45)
2317624 is described below
commit 23176249c91c2312e178771534945961fde0d549
Author: Jed Cunningham <66...@users.noreply.github.com>
AuthorDate: Tue Nov 23 14:15:55 2021 -0700
Add script to list out committers (#45)
---
.gitignore | 1 +
scripts/list_committers | 41 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 42 insertions(+)
diff --git a/.gitignore b/.gitignore
index b0001ad..f9f8225 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
.cache
__pycache__/
+.mypy_cache
# Created by https://www.toptal.com/developers/gitignore/api/terraform
# Edit at https://www.toptal.com/developers/gitignore?templates=terraform
diff --git a/scripts/list_committers b/scripts/list_committers
new file mode 100755
index 0000000..deaafb5
--- /dev/null
+++ b/scripts/list_committers
@@ -0,0 +1,41 @@
+#!/usr/bin/env python3
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+import click
+from github import Github
+
+
+@click.command(short_help='List committer logins - used to sync list of committers in CI configuration')
+@click.argument('github-token', envvar='GITHUB_TOKEN')
+def main(github_token):
+ gh = Github(github_token)
+ org = gh.get_organization('apache')
+ committers = org.get_team_by_slug('airflow-committers')
+ committer_usernames = sorted(f'"{c.login}"' for c in committers.get_members())
+
+ click.echo("Take the below list and:")
+ click.echo(
+ " - replace the list of commiters in the `build-info` job in apache/airflow's `.github/workflows/ci.yml`"
+ )
+ click.echo(" - update the `/runners/apache/airflow/configOverlay` parameter in AWS SSM ParameterStore\n")
+ click.echo(',\n'.join(committer_usernames))
+
+
+if __name__ == "__main__":
+ main()