diff --git a/.github/workflows/summarizer.yml b/.github/workflows/summarizer.yml index 11e0cd3..a8920e3 100644 --- a/.github/workflows/summarizer.yml +++ b/.github/workflows/summarizer.yml @@ -33,6 +33,6 @@ jobs: PR_NUMBER: ${{ github.event.pull_request.number }} GITHUB_REPOSITORY: ${{ github.repository }} run: | - python main.py > summary.txt + python ./src/main.py > summary.txt SUMMARY=$(cat summary.txt) echo "$SUMMARY" \ No newline at end of file diff --git a/__init__.py b/__init__.py deleted file mode 100644 index 5f97dab..0000000 --- a/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -""" -GitHub PR Summarizer Bot - -This package uses the Gemini API to summarize pull requests. -""" diff --git a/setup.py b/setup.py deleted file mode 100644 index f92d880..0000000 --- a/setup.py +++ /dev/null @@ -1,36 +0,0 @@ - -from setuptools import setup, find_packages - -import os - -def readme(): - try: - with open(os.path.join(os.path.dirname(__file__), 'README.md')) as f: - return f.read() - except Exception: - return '' - -setup( - name='github-pr-summarizer', - version='0.1.0', - packages=find_packages(), - install_requires=[ - 'google-generativeai>=0.3.2', - 'requests>=2.31.0', - 'python-dotenv>=1.0.0', - ], - entry_points={ - 'console_scripts': [ - 'pr-summary=main:main', - ], - }, - author='Your Name', - description='A GitHub Action bot that summarizes pull requests using Google Gemini API', - long_description=readme(), - long_description_content_type='text/markdown', - classifiers=[ - 'Programming Language :: Python :: 3', - 'License :: OSI Approved :: MIT License', - ], - python_requires='>=3.8', -) \ No newline at end of file diff --git a/main.py b/src/main.py similarity index 94% rename from main.py rename to src/main.py index db371c9..a5a1522 100644 --- a/main.py +++ b/src/main.py @@ -34,5 +34,4 @@ def post_comment(comment): print("[DEBUG] GEMINI_API_KEY is not set.") pr_body, diff = get_pr_data() summary = generate_summary(pr_body, diff) - post_comment(f"**PR Summary**\n\n{summary}") - print(summary) \ No newline at end of file + post_comment(f"**PR Summary**\n\n{summary}") \ No newline at end of file diff --git a/summarizer.py b/src/summarizer.py similarity index 100% rename from summarizer.py rename to src/summarizer.py