blob: b4d5f9c34ba5b1a7468c68f804ef8ab0ecb5f8cf [file] [log] [blame]
#!/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 rich_click as click
from github import Github
from rich.console import Console
console = Console(color_system="standard", width=200)
@click.command(short_help='List committer logins - used to sync list of committers in CI configuration')
@click.option('--github-token', envvar='GITHUB_TOKEN',
help="You can generate the token with readOrg permissions: "
"https://github.com/settings/tokens/new?description=Read%20Org&scopes=read:org")
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(" - update the `/runners/apache/airflow/configOverlay` parameter in AWS SSM ParameterStore")
click.echo(" - restart the self-hosted runners")
click.echo(
" - finally, replace the list of committers in the `build-info` job in apache/airflow's `.github/workflows/ci.yml`\n"
)
click.echo(',\n'.join(committer_usernames))
if __name__ == "__main__":
main()