instructlab / instructlab-bot

GitHub bot to assist with the taxonomy contribution workflow
Apache License 2.0
14 stars 17 forks source link

Remove "maintainer" check from teamMembership.GetState() #232

Closed nerdalert closed 6 months ago

nerdalert commented 6 months ago
nerdalert commented 6 months ago

Membership is already checked in the code block prior:

    teamMembership, response, err := client.Teams.GetTeamMembershipBySlug(ctx, prComment.repoOrg, teamName, prComment.author)
    if err != nil {
        if response.StatusCode == http.StatusNotFound {
            h.Logger.Infof("User %s is not a part of the team %s : %v", prComment.author, teamName, err)
            return false, nil
        }
        return false, err
    }