Skip to content

Conversation

osinjoku
Copy link
Contributor

@osinjoku osinjoku commented Oct 2, 2025

Description

This PR allows for publishing to custom pypi repositories and creating releases in custom GitHub instances.

Fixes # N/A

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist

Please delete options that are not relevant.

  • I have read the CONTRIBUTING document
  • My code follows the style guidelines of this project
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have updated the documentation accordingly
  • I have added a note to CHANGELOG.md describing my changes
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Testing

N/A.

Additional Notes

Add any other context about the pull request here.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for custom release locations by allowing users to specify custom PyPI repository URLs and custom GitHub API URLs in the run.py script. This enables publishing to private/custom PyPI repositories and creating releases in GitHub Enterprise instances.

  • Added --repo-url parameter to the publish command for custom PyPI repositories
  • Added --github-api-url parameter to the release command for custom GitHub instances
  • Updated command-line interface documentation to reflect the new parameters

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

run.py Outdated
Comment on lines 175 to 179
if repo_url:
repo_url_arg = f'--repository-url {repo_url}'
twine_args = f'--verbose {repo_url_arg}'
else:
twine_args = '--repository testpypi --verbose' if testpypi else '--verbose'
Copy link
Preview

Copilot AI Oct 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The repo_url parameter is directly interpolated into a command string without validation. This could allow command injection if the URL contains shell metacharacters. Consider validating the URL format or using proper argument passing instead of string concatenation.

Copilot uses AI. Check for mistakes.

run.py lint [-s | --skip-build]
run.py publish [-s | --skip-build] [--testpypi]
run.py release
run.py publish [-s | --skip-build] [(--testpypi | --repo-url=<url>)]
Copy link
Preview

Copilot AI Oct 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docstring syntax suggests --testpypi and --repo-url are mutually exclusive with the parentheses and pipe operator, but the code logic doesn't enforce this. If they are mutually exclusive, add validation to prevent both flags from being used simultaneously.

Copilot uses AI. Check for mistakes.

Copy link
Collaborator

@sankalps0549 sankalps0549 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants