-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
2,558 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
backend/.env | ||
*/target/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import os | ||
import sys | ||
import json | ||
import git | ||
import re | ||
import requests | ||
|
||
if __name__ == "__main__": | ||
repo = git.Repo(os.getcwd(), search_parent_directories=True) | ||
os.chdir(repo.git.rev_parse("--show-toplevel")) | ||
|
||
origin = repo.remotes.origin.url[:-4] | ||
|
||
try: | ||
with open("open-source.fern", "r") as f: | ||
fern = json.load(f) | ||
except FileNotFoundError: | ||
technologies = list(set(map(lambda x: x.strip(), input("Input technologies separated by a comma (','):").split(",")))) | ||
difficulty = -1 | ||
try: | ||
difficulty = int(input("How difficult is your project to contribute to (1-5)? ")) | ||
if not 0 < difficulty < 6: | ||
raise ValueError() | ||
except ValueError as e: | ||
raise ValueError("Error: difficulty should be a number from 1-5") | ||
|
||
desc = input("Enter a brief description of your project: ") | ||
|
||
recommended_issue_labels = list(set(map(lambda x: x.strip(), input("Input any tag/label that would be a good first issue separated by a comma (','):").split(",")))) | ||
|
||
fern = {"name": re.search(r"/([^/]*/[^/]*)$","https://github.com/g00gol/frieren").group(1), "technologies": technologies, "difficulty": difficulty, "description": desc, "recommended_issue_labels": recommended_issue_labels} | ||
|
||
fern['repo_origin'] = origin | ||
|
||
# Make api call | ||
r = requests.post("http://127.0.0.1:8080/repos", json=fern) | ||
if not 200 <= r.status_code < 300: | ||
print("Error registering project") | ||
else: | ||
with open("open-source.fern", "w+") as f: | ||
del fern['repo_origin'] | ||
json.dump(fern, f) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
certifi==2023.7.22 | ||
charset-normalizer==3.3.0 | ||
gitdb==4.0.10 | ||
GitPython==3.1.37 | ||
idna==3.4 | ||
requests==2.31.0 | ||
smmap==5.0.1 | ||
urllib3==2.0.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"name": "g00gol/frieren", "technologies": ["MongoDB", "Rust", "Go", "Python", "JavaScript"], "difficulty": 3, "description": "Open source project finder", "recommended_issue_labels": ["easy", "start-here", "Good First Issue"]} |
Oops, something went wrong.