github¶

                                                                                
 Usage: lftools-uv github [OPTIONS] COMMAND [ARGS]...                           
                                                                                
 GitHub tools.                                                                  
                                                                                
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --help          Show this message and exit.                                  │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────╮
│ submit-pr     Submit a pr if mergeable.                                      │
│ votes         Helper for votes.                                              │
│ list          List options for github org repos.                             │
│ create-repo   Create a Github repo within an Organization.                   │
│ update-repo   Update a Github repo within an Organization.                   │
│ create-team   Create a Github team within an Organization.                   │
│ user          Add and Remove users from an org team.                         │
╰──────────────────────────────────────────────────────────────────────────────╯

Commands¶

create-repo¶

                                                                                
 Usage: lftools-uv github create-repo [OPTIONS] {organization} {repository}     
                                      {description}                             
                                                                                
 Create a Github repo within an Organization.                                   
                                                                                
 Requires an admin token.                                                       
                                                                                
╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ *    organization      <str>  GitHub organization name                       │
│                               [required]                                     │
│ *    repository        <str>  Repository name to create                      │
│                               [required]                                     │
│ *    description       <str>  Repository description                         │
│                               [required]                                     │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --has-issues            Repo should have issues                              │
│ --has-projects          Repo should have projects                            │
│ --has-wiki              Repo should have wiki                                │
│ --help                  Show this message and exit.                          │
╰──────────────────────────────────────────────────────────────────────────────╯

create-team¶

                                                                                
 Usage: lftools-uv github create-team [OPTIONS] {organization} {name} {privacy} 
                                                                                
 Create a Github team within an Organization.                                   
                                                                                
 Privacy should be set to closed This allows us to control group membership.    
                                                                                
 If you have two factor auth enabled and you get a 401 error, then you need to  
 create a personal access token and add it to your ~/.netrc file.               
                                                                                
 Requires an admin token.                                                       
                                                                                
╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ *    organization      <str>  GitHub organization name                       │
│                               [required]                                     │
│ *    name              <str>  Team name to create                            │
│                               [required]                                     │
│ *    privacy           <str>  Team privacy setting (closed/secret)           │
│                               [required]                                     │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --repo        <str>  Assign team to repo                                     │
│ --help               Show this message and exit.                             │
╰──────────────────────────────────────────────────────────────────────────────╯

list¶

                                                                                
 Usage: lftools-uv github list [OPTIONS] {organization}                         
                                                                                
 List options for github org repos.                                             
                                                                                
╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ *    organization      <str>  GitHub organization name                       │
│                               [required]                                     │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --audit                      List members without 2fa                        │
│ --repos                      List all repos                                  │
│ --full                       All members and their respective teams          │
│ --teams                      List available teams                            │
│ --team                <str>  List members of a team                          │
│ --repofeatures               List enabled features for repos in an org       │
│ --help                       Show this message and exit.                     │
╰──────────────────────────────────────────────────────────────────────────────╯

update-repo¶

                                                                                
 Usage: lftools-uv github update-repo [OPTIONS] {organization} {repository}     
                                                                                
 Update a Github repo within an Organization.                                   
                                                                                
 Requires an admin token.                                                       
                                                                                
╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ *    organization      <str>  GitHub organization name                       │
│                               [required]                                     │
│ *    repository        <str>  Repository name to update                      │
│                               [required]                                     │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --has-issues                 Repo should have issues                         │
│ --has-projects               Repo should have projects                       │
│ --has-wiki                   Repo should have wiki                           │
│ --add-team            <str>  Add team to repo                                │
│ --remove-team         <str>  Remove team from repo                           │
│ --help                       Show this message and exit.                     │
╰──────────────────────────────────────────────────────────────────────────────╯

submit-pr¶

                                                                                
 Usage: lftools-uv github submit-pr [OPTIONS] {organization} {repo} {pr}        
                                                                                
 Submit a pr if mergeable.                                                      
                                                                                
╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ *    organization      <str>  GitHub organization name                       │
│                               [required]                                     │
│ *    repo              <str>  GitHub repository name                         │
│                               [required]                                     │
│ *    pr                <int>  Pull request number                            │
│                               [required]                                     │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --help          Show this message and exit.                                  │
╰──────────────────────────────────────────────────────────────────────────────╯

user¶

                                                                                
 Usage: lftools-uv github user [OPTIONS] {organization} {user} {team}           
                                                                                
 Add and Remove users from an org team.                                         
                                                                                
╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ *    organization      <str>  GitHub organization name                       │
│                               [required]                                     │
│ *    user              <str>  GitHub username                                │
│                               [required]                                     │
│ *    team              <str>  Team name                                      │
│                               [required]                                     │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --delete          Remove user from org                                       │
│ --admin           User is admin for org, or a maintainer of a team           │
│ --help            Show this message and exit.                                │
╰──────────────────────────────────────────────────────────────────────────────╯

votes¶

                                                                                
 Usage: lftools-uv github votes [OPTIONS] {organization} {repo} {pr}            
                                                                                
 Helper for votes.                                                              
                                                                                
╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ *    organization      <str>  GitHub organization name                       │
│                               [required]                                     │
│ *    repo              <str>  GitHub repository name                         │
│                               [required]                                     │
│ *    pr                <int>  Pull request number                            │
│                               [required]                                     │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --help          Show this message and exit.                                  │
╰──────────────────────────────────────────────────────────────────────────────╯

API requires a [github] or [github.OrgName] section in ~/.config/lftools-uv/lftools-uv.ini:

[github] or [github.orgName]
token = REDACTED