Gitea Tea CLI: List, Create, Merge and Close Pull Requests with CLI

Have you ever thought… “Hmmm it’d be nice to merge my PR directly from the command line.” Well…

Gitea Tea CLI

Table of Contents


Introduction

We show how to use Gitea’s CLI tool called Tea. We show basic commands that complement the Git CLI.

Prerequisites

  • SSH Key set on Gitea instance
  • Token set on Gitea instance

Installation

  • MacOS or Linux
    brew install tea
    
  • Windows, via MSYS2

Gitea Tea CLI Commands

  • See login list
    tea login
    
  • Add user to login
    tea login add
    
  • List pull requests
    tea pr
    
  • Close a pull request
    tea pr close 25 --repo organization/repository
    
  • Create a pull request
    tea pull create --repo organization/repository/ --title "Pull Request Title" --base development --head development_branch_example
    
  • List the pull requests
    tea pr
    
  • Merge a pull requests (e.g. #27)
    tea pr merge --repo organization/repository/ --title "Merge Commit Title" --message "Merge Commit Message" 27
    
  • delete branch locally
    git branch -d development_branch_example
    
  • push deleted branch changed to remote
    git push origin :development_branch_example
    
  • Consult help for any commands and parameters
    tea pr create --help
    

References

For more information, consult Tea’s repo.