This is an automated email from the ASF dual-hosted git repository. jedcunningham pushed a commit to branch list_commiters_script in repository https://gitbox.apache.org/repos/asf/airflow-ci-infra.git
commit 263dfb59c42b4a45758e5cb6d8ae1487fda342a5 Author: Jed Cunningham <[email protected]> AuthorDate: Tue Nov 23 13:59:35 2021 -0700 Add script to list out committers --- .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 + + [email protected](short_help='List committer logins - used to sync list of committers in CI configuration') [email protected]('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()
