Skip to content
Discussion options

You must be logged in to vote

You can't directly access the wikiCount field in the GitHub GraphQL API under the search query for a repository. It's more likely used in search operations involving multiple repositories or a broader search scope. When you need to fetch data for one specific repository, including wiki-related information, you could typically query the repository object directly.

import subprocess
import os

def clone_and_count_wiki_pages(repo_url, temp_dir):
    # Clone the wiki Git repository
    wiki_repo_url = repo_url.rstrip('/') + '.wiki.git'
    subprocess.run(['git', 'clone', wiki_repo_url, temp_dir], check=True)

    # Count the number of Markdown files
    wiki_page_count = len([f for f in os.li…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ReenigneArcher
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Apps API and Webhooks Discussions related to GitHub's APIs or Webhooks Question Ask and answer questions about GitHub features and usage inactive This discussion has been automatically marked as inactive. This was formerly labeled stale.
2 participants