Skip to content

Commit

Permalink
chore: Remove unused task
Browse files Browse the repository at this point in the history
  • Loading branch information
adinhodovic committed May 30, 2024
1 parent 83c1dc3 commit 1d4d008
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions django_wtf/core/github_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,37 +227,6 @@ def categorize_repository(repo_full_name):
repo.save()


@app.task()
def download_markdown_html():
import base64

repo = "danihodovic/celery-exporter"
token = ""

http = http_client()
headers = {"Authorization": f"Bearer {token}" "X-GitHub-Api-Version: 2022-11-28"}

res = http.get(
f"https://api.github.com/repos/{repo}/contents/README.md",
headers=headers,
)

base64_content = res.json()["content"]
content = base64.b64decode(base64_content).decode("utf-8")

headers = {
"Accept": "application/vnd.github+json",
"Authorization": f"Bearer {token}",
"X-GitHub-Api-Version": "2022-11-28",
"Content-Type": "application/x-www-form-urlencoded",
}

res = http.post(
"https://api.github.com/markdown", headers=headers, json={"text": content}
)
return res


def find_appconfig_files(repo_full_name):
params = urlencode(
{"q": f"repo:{repo_full_name} AppConfig in:file AppConfig language:python"}
Expand Down

0 comments on commit 1d4d008

Please sign in to comment.