(ctx, issue_number)
Remove all labels from an issue or pull request. This is useful when there are too
    many labels and its state cannot be modified (known GitHub issue).

    \b
    `$ ddev meta scripts remove-labels 5626`
Remove all labels from an issue or pull request. This is useful when there are too
    many labels and its state cannot be modified (known GitHub issue).
Remove all labels from an issue or pull request . This is useful when there are too many labels and its state cannot be modified ( known GitHub issue ) .
def remove_labels(ctx, issue_number):
    """Remove all labels from an issue or pull request. This is useful when there are too
    many labels and its state cannot be modified (known GitHub issue).

    \b
    `$ ddev meta scripts remove-labels 5626`
    """
    repo = ctx.obj['repo_name']
    github_config = ctx.obj['github']

    github_user = github_config.get('user')
    if not github_user:
        abort('No `github.user` has been set')

    github_token = github_config.get('token')
    if not github_token:
        abort('No `github.token` has been set')

    try:
        response = requests.delete(
            f'https://api.github.com/repos/DataDog/{repo}/issues/{issue_number}/labels',
            auth=(github_user, github_token),
        )
        response.raise_for_status()
    except Exception as e:
        abort(str(e))

    echo_success('Success!')
def remove_labels ( ctx , issue_number ) : repo = ctx . obj [ 'repo_name' ] github_config = ctx . obj [ 'github' ] github_user = github_config . get ( 'user' ) if not github_user : abort ( 'No `github.user` has been set' ) github_token = github_config . get ( 'token' ) if not github_token : abort ( 'No `github.token` has been set' ) try : response = requests . delete ( f'https://api.github.com/repos/DataDog/{repo}/issues/{issue_number}/labels' , auth = ( github_user , github_token ) , ) response . raise_for_status ( ) except Exception as e : abort ( str ( e ) ) echo_success ( 'Success!' )