Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented automated doc generation with read the docs, Added a parser #23

Open
wants to merge 30 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adding a parser issue resolved
Yeshvanth Raju Kurapati authored and Yeshvanth Raju Kurapati committed Mar 15, 2024
commit fca8dc80ad47d8e8ac2c7f6fc4cbf65f75cbba3d
1 change: 1 addition & 0 deletions project_explainer/examples/Project-Explainer
Submodule Project-Explainer added at 3af021
39 changes: 39 additions & 0 deletions project_explainer/github_parser.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
from github import Github
import os

# Initialize a Github instance with an access token
g = Github(os.getenv('GITHUB_TOKEN'))

def get_repo_info(repo_name):
repo = g.get_repo(repo_name)

# Fetching repository metadata
stars = repo.stargazers_count
forks = repo.forks_count
contributors = repo.get_contributors().totalCount

print(f"Stars: {stars}, Forks: {forks}, Contributors: {contributors}")

def parse_issues(repo_name):
repo = g.get_repo(repo_name)
issues = repo.get_issues(state='open')

print("\nOpen Issues:")
for issue in issues:
print(f"- {issue.title}: {issue.html_url}")

def parse_pull_requests(repo_name):
repo = g.get_repo(repo_name)
pull_requests = repo.get_pulls(state='open', sort='created')

print("\nOpen Pull Requests:")
for pr in pull_requests:
print(f"- {pr.title}: {pr.html_url}")

if __name__ == "__main__":
repo_name = "c2siorg/Project-Explainer"

print(f"Fetching information for {repo_name}")
get_repo_info(repo_name)
parse_issues(repo_name)
parse_pull_requests(repo_name)
3 changes: 3 additions & 0 deletions project_explainer/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
gradio
-e git+https://github.com/c2siorg/Project-Explainer.git@main#subdirectory=project_explainer&egg=gh_explainer&egg=gh_explainer
-e git+https://github.com/c2siorg/Project-Explainer.git@main#subdirectory=project_processor&egg=gh_processor
1 change: 1 addition & 0 deletions project_explainer/src/gh-explainer
Submodule gh-explainer added at 3af021
1 change: 1 addition & 0 deletions project_explainer/src/gh-processor
Submodule gh-processor added at 3af021