Skip to content

Conversation

@SigireddyBalasai
Copy link

add ci/cd workflow which trigger on each release

Copy link

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 Homebrew distribution support for the lic-cli tool by introducing a Homebrew formula and an automated CI/CD workflow that updates the formula on each release. The changes also include a version bump to 0.1.2 and code formatting improvements.

Key changes:

  • New GitHub Actions workflow that automatically updates the Homebrew formula when a release is published
  • Homebrew formula file that defines how to install lic-cli via Homebrew with Python 3.12 and uv dependencies
  • Version bump from 0.1.1 to 0.1.2 and code formatting improvements in the CLI

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
.github/workflows/release-homebrew.yml Adds automated workflow to update Homebrew formula on release events
Formula/lic.rb Defines the Homebrew formula for installing lic-cli with dependencies and installation instructions
pyproject.toml Bumps version to 0.1.2
uv.lock Updates package name to lic-cli and version to 0.1.1
src/lic_cli/cli.py Code formatting improvements (multi-line function arguments and dictionary formatting)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

desc "Minimal interactive license generator"
version "0.1.2"
homepage "https://github.com/kushvinth/lic"
url "https://api.github.com/repos/SigireddyBalasai/lic/tarball/v0.1.2"
Copy link

Copilot AI Jan 3, 2026

Choose a reason for hiding this comment

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

The homepage URL points to "kushvinth/lic" but the tarball URL points to "SigireddyBalasai/lic". These should reference the same repository to avoid confusion and ensure the formula downloads from the correct source.

Suggested change
url "https://api.github.com/repos/SigireddyBalasai/lic/tarball/v0.1.2"
url "https://github.com/kushvinth/lic/archive/refs/tags/v0.1.2.tar.gz"

Copilot uses AI. Check for mistakes.
Copy link
Author

Choose a reason for hiding this comment

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

The homepage URL points to "kushvinth/lic" but the tarball URL points to "SigireddyBalasai/lic". These should reference the same repository to avoid confusion and ensure the formula downloads from the correct source.

the url will be changed automatically

desc "Minimal interactive license generator"
version "0.1.2"
homepage "https://github.com/kushvinth/lic"
url "https://api.github.com/repos/SigireddyBalasai/lic/tarball/v0.1.2"
Copy link

Copilot AI Jan 3, 2026

Choose a reason for hiding this comment

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

The hardcoded URL in the formula will be replaced by the workflow, but the initial value references a repository (SigireddyBalasai/lic) that doesn't match the homepage (kushvinth/lic). Ensure this initial URL value is correct or add a comment explaining it will be replaced by the CI/CD workflow.

Suggested change
url "https://api.github.com/repos/SigireddyBalasai/lic/tarball/v0.1.2"
url "https://api.github.com/repos/kushvinth/lic/tarball/v0.1.2"

Copilot uses AI. Check for mistakes.
Comment on lines +40 to +44
sed -i \
-e "s|^ url .*| url \"${{ steps.archive.outputs.url }}\"|" \
-e "s|^ sha256 .*| sha256 \"${{ steps.archive.outputs.sha256 }}\"|" \
-e "s|^ version .*| version \"${{ steps.version.outputs.version }}\"|" \
"$FORMULA"
Copy link

Copilot AI Jan 3, 2026

Choose a reason for hiding this comment

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

The sed command uses the -i flag without a backup suffix, which behaves differently on macOS (BSD sed) vs Linux (GNU sed). Since this workflow runs on ubuntu-latest, it's fine, but for clarity and to avoid confusion if the script is run elsewhere, consider being explicit about the environment or adding a comment noting this is GNU sed specific.

Copilot uses AI. Check for mistakes.
Copy link
Author

Choose a reason for hiding this comment

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

@copilot open a new pull request to apply changes based on this feedback

Comment on lines +23 to +25
VERSION=$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
echo "version=$VERSION" >> $GITHUB_OUTPUT

Copy link

Copilot AI Jan 3, 2026

Choose a reason for hiding this comment

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

The version extraction using grep and sed is fragile and could fail if the pyproject.toml format changes (e.g., using single quotes, extra spaces). Consider using a proper TOML parser like 'yq' or Python's tomllib/toml for more reliable version extraction.

Suggested change
VERSION=$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
echo "version=$VERSION" >> $GITHUB_OUTPUT
VERSION=$(python - << 'PY'
import pathlib
import sys
try:
import tomllib # Python 3.11+
except ImportError:
sys.exit("Python tomllib module is not available")
data = tomllib.loads(pathlib.Path("pyproject.toml").read_text(encoding="utf-8"))
version = None
# Try common locations for version in pyproject.toml
project = data.get("project")
if isinstance(project, dict):
version = project.get("version")
if version is None:
tool = data.get("tool")
if isinstance(tool, dict):
poetry = tool.get("poetry")
if isinstance(poetry, dict):
version = poetry.get("version")
if not version:
sys.exit("Could not find version in pyproject.toml")
print(version)
PY
)
echo "version=$VERSION" >> "$GITHUB_OUTPUT"

Copilot uses AI. Check for mistakes.
end

test do
system bin/"lic", "--help"
Copy link

Copilot AI Jan 3, 2026

Choose a reason for hiding this comment

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

The test only checks if the help command runs successfully but doesn't verify any output or actual functionality. Consider adding a more comprehensive test that validates the command produces expected output or performs a basic operation to ensure the installation is functional.

Copilot uses AI. Check for mistakes.
SigireddyBalasai and others added 2 commits January 4, 2026 09:08
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

1 participant