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

Private Repo Icon Directory #3

Closed
scottgriv opened this issue Dec 7, 2023 · 1 comment
Closed

Private Repo Icon Directory #3

scottgriv opened this issue Dec 7, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@scottgriv
Copy link
Owner

I may add a feature to allow you to add a custom icon for private repo in the private_repos folder and pick up the image from there to solve this problem instead of adding it to the private markdown file which can be used for other things.

@scottgriv scottgriv added the enhancement New feature or request label Dec 7, 2023
@scottgriv scottgriv self-assigned this Dec 7, 2023
scottgriv added a commit that referenced this issue Dec 7, 2023
@scottgriv
Copy link
Owner Author

scottgriv commented Dec 7, 2023

I added the feature by updating the project_tier_table_generator.py under commit line af5bc4b.

 # Check if the repo is private to use the private repo icon (Issue #3)
                        if repo_data['private']:
                            # Construct the expected icon file path
                            expected_icon_path = os.path.join(PRIVATE_REPO_ICON_DIR, f"{repo_data['name']}.png")

                            # Check if the icon file exists
                            if os.path.isfile(expected_icon_path):
                                # Use the relative path from your project root to the icon
                                if MD_ONLY_TIER_TABLE:
                                    path_start = '..'
                                icon_url = f"{PRIVATE_REPO_ICON_DIR}/{repo_data['name']}.png"
                                print(f"Using private repo icon for {repo_data['name']}.")
                            else:
                                # Use placeholder if the icon file does not exist
                                if MD_ONLY_TIER_TABLE:
                                    path_start = '..'
                                icon_url = PLACEHOLDER_ICON
                                print(f"Icon not found for private repo {repo_data['name']}, using placeholder.")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

1 participant