Skip to main content

A CLI tool to automate PR creation and listing.

Project description

AutoPR

A CLI tool designed to streamline your GitHub workflow by automating Pull Request (PR) creation and issue management. Future versions will incorporate AI to assist in generating PR descriptions.

Features (Current)

  • List open GitHub issues for the current repository.
  • List all (open and closed) GitHub issues using the -a flag.
  • Create a new PR with a specified title.
  • Automatically detects the GitHub repository from your local .git configuration.

Installation & Setup

For Users (if published on PyPI):

You can install AutoPR using pip (once published):

pip install autopr_cli

For Developers (Local Setup):

  1. Clone the repository:
    git clone <your-repository-url> # Replace <your-repository-url> with the actual URL
    cd autopr-cli # Or your repository's directory name
    
  2. Create and activate a virtual environment (recommended):
    python3 -m venv venv
    source venv/bin/activate  # On Windows, use `venv\Scripts\activate`
    
  3. Install dependencies (including development tools):
    pip install -r requirements.txt
    

Usage

Make sure you are in the root directory of your Git repository.

  • List open issues:
    python run_cli.py ls
    
  • List all issues (open and closed):
    python run_cli.py ls -a
    
  • Create a new PR:
    python run_cli.py create --title "Your Amazing PR Title"
    

Development

Running Tests

To run the automated tests, use Make:

make test

Formatting Code

To format the code using Black:

make format

Publishing a New Version (for Maintainers)

This project uses Makefile targets to streamline the release process. Ensure you have twine configured with your PyPI credentials (API tokens are recommended) and have installed development dependencies via pip install -r requirements.txt.

  1. Update Version: Increment the __version__ string in autopr/__init__.py.

  2. Build the Package:

    make build
    

    This cleans old builds and creates new source distribution and wheel files in the dist/ directory.

  3. Test Publishing (Highly Recommended): Publish to TestPyPI to ensure everything works correctly before a real release.

    make publish-test
    

    You will be prompted for confirmation. Check the package on test.pypi.org.

  4. Publish to PyPI (Real):

    make publish
    

    This will upload the package to the official PyPI. You will be prompted for confirmation.

  5. Full Release (Publish to PyPI & Tag): For a complete release including Git tagging:

    make release
    

    This performs make publish and then creates a Git tag for the new version (e.g., v0.2.5). After running this, you must push the tag to the remote repository:

    git push origin vX.Y.Z  # Replace X.Y.Z with the version number
    # OR push all tags if you have multiple new tags
    git push --tags
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autopr_cli-0.2.5.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

autopr_cli-0.2.5-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file autopr_cli-0.2.5.tar.gz.

File metadata

  • Download URL: autopr_cli-0.2.5.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for autopr_cli-0.2.5.tar.gz
Algorithm Hash digest
SHA256 60fb88834cfa6ed1b404240e45c60643ffc6f986995f9e109aea9d56ff5b963b
MD5 85a6dc7190a9ca72ccb6c69ed2de1a2b
BLAKE2b-256 6f1add8fb5b21fcdaf88199eb7f8c6228b9908f1060bb8c973d9e896d5636465

See more details on using hashes here.

File details

Details for the file autopr_cli-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: autopr_cli-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for autopr_cli-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a660a10a305bb2263d5b0b0e652f9ad754e3636dab8662d816af2eb6c080d288
MD5 93542014942b1d53ba2ac430bbe9029a
BLAKE2b-256 81c8a04ee7557f84770507a899c8d4dd471cb50bbc98fb28f5b81dab1e66ae25

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page