Compare commits
166 Commits
8b22a7d9f1
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6bffff0135 | ||
|
|
98dd49ca4c | ||
|
|
1a4b276aea | ||
|
|
e514b1dedb | ||
|
|
06b7cc1e26 | ||
|
|
84a5bae75d | ||
|
|
fd03e950b2 | ||
|
|
9b06b91230 | ||
|
|
8b37091e6f | ||
|
|
1936211bb7 | ||
|
|
f10dae243a | ||
|
|
81c899609a | ||
|
|
ab310968a6 | ||
|
|
f25c4c324f | ||
|
|
ef7ae3d289 | ||
|
|
4aba5079cf | ||
|
|
ee576c5594 | ||
|
|
9d25d90893 | ||
|
|
09ed909c1c | ||
|
|
0f299f7f71 | ||
|
|
fdf42fc68d | ||
|
|
b7b82a8736 | ||
|
|
cb5ae0ef3f | ||
|
|
4a3987e5d0 | ||
|
|
403ae7fcbc | ||
|
|
5284712005 | ||
|
|
f27f717249 | ||
|
|
cec0a6cb95 | ||
|
|
035b7e52ee | ||
|
|
6c790d78f2 | ||
|
|
331acf4d8f | ||
|
|
fa10e7fc52 | ||
|
|
3fb8a54fbb | ||
|
|
c4450d7990 | ||
|
|
0a1708c6f4 | ||
|
|
f0be06e303 | ||
|
|
b70c35475e | ||
|
|
e3afcc53c2 | ||
| d2b9e66c10 | |||
|
|
e94a65726a | ||
|
|
1367b24436 | ||
|
|
af88cc4305 | ||
|
|
d829ecb79c | ||
|
|
9afdf504d6 | ||
|
|
b517797b10 | ||
| 7f88e080cc | |||
|
|
d681e06239 | ||
|
|
f26e3adc4c | ||
|
|
758879ba87 | ||
|
|
4a70d27f8b | ||
|
|
e8c3606295 | ||
|
|
3ac2246a7d | ||
|
|
100d4b6dd1 | ||
|
|
839984d5c8 | ||
|
|
34830c406f | ||
|
|
801b73ef29 | ||
|
|
8cca9bc1ae | ||
|
|
a5e30ba57c | ||
|
|
1f50a52519 | ||
|
|
f261436efe | ||
|
|
8f64fa003a | ||
|
|
3c10363e22 | ||
|
|
e463247b08 | ||
|
|
47a5d53408 | ||
|
|
6a5d1ea61b | ||
|
|
0a7f38c71f | ||
|
|
a963c17669 | ||
|
|
2fb69a4aec | ||
|
|
ffa5177cc5 | ||
|
|
8f8d187bde | ||
|
|
fa3c40e493 | ||
|
|
c35f8ddd8a | ||
|
|
c504943f84 | ||
|
|
a821dbfccf | ||
|
|
67480298f8 | ||
|
|
d71561563b | ||
|
|
c5d80fe762 | ||
|
|
c4b80f9c2b | ||
|
|
135c35c7b8 | ||
|
|
99f1f1fc37 | ||
|
|
68d9fe4e9a | ||
|
|
23217107ac | ||
|
|
9789defce1 | ||
|
|
fe3526ad09 | ||
|
|
c1d3bceb2a | ||
|
|
d485837b42 | ||
|
|
70359cba80 | ||
|
|
bcc08a5213 | ||
|
|
b0c69a129a | ||
|
|
0f3a03a88c | ||
|
|
f0627b3c0b | ||
|
|
12e42cbfe3 | ||
|
|
7ebb379b14 | ||
|
|
a01d72085e | ||
|
|
e246710c70 | ||
|
|
2b8184d926 | ||
|
|
fc48d86767 | ||
|
|
2b3f4548d8 | ||
|
|
4a3a37699d | ||
|
|
d45aa0e391 | ||
|
|
d23fdc3f17 | ||
|
|
09e949986a | ||
|
|
f9eab05189 | ||
|
|
171fb8de7c | ||
|
|
4e4c735876 | ||
|
|
c4d0199349 | ||
|
|
13561392ae | ||
|
|
fcbee2e07e | ||
|
|
258d4288d9 | ||
|
|
8992eb706d | ||
|
|
2fcd32ff41 | ||
|
|
fe3044ab1f | ||
|
|
6de4a8e899 | ||
|
|
b3f0f91f9e | ||
|
|
33ff18f3ce | ||
|
|
55dee7772c | ||
|
|
64367a916d | ||
|
|
e3db71cb05 | ||
|
|
62539824a3 | ||
|
|
823aa6c319 | ||
|
|
d10103e1ce | ||
|
|
0dc439e5d4 | ||
|
|
c7d4a9c96f | ||
|
|
37926d5c2f | ||
|
|
2c90c19c83 | ||
|
|
6bab05409a | ||
|
|
889695a592 | ||
|
|
52af2611cc | ||
|
|
01d3f7da4f | ||
|
|
aba04dc511 | ||
|
|
b22da4d8cc | ||
|
|
44d0e08996 | ||
|
|
6899f3ccb9 | ||
|
|
e57c72f385 | ||
|
|
949ae2effb | ||
|
|
29d46969de | ||
|
|
8713d0a303 | ||
|
|
f340adff05 | ||
|
|
315b48683f | ||
|
|
49548b5192 | ||
|
|
b26b6c9fc7 | ||
|
|
7686aa430c | ||
|
|
08a7cd86b4 | ||
|
|
0200997f00 | ||
|
|
d77fc6476d | ||
|
|
96c1cb5cf1 | ||
|
|
aed0193c04 | ||
|
|
8f9d1dea3f | ||
|
|
a50b46b47e | ||
|
|
73417aa86a | ||
|
|
d2a50dd914 | ||
|
|
8a58ec3d7d | ||
|
|
96210f0c41 | ||
|
|
3f015ba8c6 | ||
|
|
d34043d332 | ||
|
|
7064ce5329 | ||
|
|
54a871bde6 | ||
|
|
8af023068a | ||
|
|
67d4776efc | ||
|
|
4037d8040b | ||
|
|
b9f16b611d | ||
|
|
bf92f5e477 | ||
|
|
f74521533a | ||
| f89ed9bcda | |||
| 25fb1a3604 | |||
| a620be202e |
@@ -23,5 +23,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git config --local user.email "action@gitea.com"
|
git config --local user.email "action@gitea.com"
|
||||||
git config --local user.name "Gitea Action"
|
git config --local user.name "Gitea Action"
|
||||||
|
git pull
|
||||||
git add README.md
|
git add README.md
|
||||||
git diff --quiet && git diff --staged --quiet || (git commit -m "Update profile stats" && git push)
|
git diff --quiet && git diff --staged --quiet || (git commit -m "Update profile stats" && git push)
|
||||||
17
README.md
17
README.md
@@ -4,22 +4,25 @@
|
|||||||
|
|
||||||
### 📂 Repository Breakdown
|
### 📂 Repository Breakdown
|
||||||
|
|
||||||
| Name | Language | Size | Releases | Private | Archived |
|
| Name | Language | Size | Releases | Private | Archived | Access Link | Last Commit |
|
||||||
|:---------|:-----------|:--------|-----------:|:----------|:-----------|
|
|:--------------------------------|:-----------|:---------|:-----------|:----------|:-----------|:---------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| .profile | Python | 76.00 B | 0 | No | No |
|
| .profile | Python | 271.00 B | None | No | No | [View](https://gitea.nathan-falvey.synology.me/nathan/.profile) |  |
|
||||||
|
| custom-portainer-configurations | N/A | 55.00 B | None | No | No | [View](https://gitea.nathan-falvey.synology.me/nathan/custom-portainer-configurations) |  |
|
||||||
|
|
||||||
## 📊 Stats Summary
|
## 📊 Stats Summary
|
||||||
|
|
||||||
**Total Repositories:** 1
|
**Total Repositories:** 2
|
||||||
|
|
||||||
**Total Storage Used:** 76.00 B
|
**Total Storage Used:** 326.00 B
|
||||||
|
|
||||||
### **Languages Used:**
|
### **Languages Used:**
|
||||||
|
|
||||||
|
```
|
||||||
- **Python**
|
- **Python**
|
||||||
|
```
|
||||||
|
|
||||||
### System Information
|
### System Information
|
||||||
|
|
||||||
**Gitea Version:** 1.25.4
|
**Gitea Version:** 1.25.5
|
||||||
|
|
||||||
**System Uptime:** 12 days, 22:08:11
|
**System Uptime:** 3:07:37
|
||||||
@@ -42,6 +42,7 @@ def collect_gitea_data():
|
|||||||
version_info = do_request(f"{GITEA_URL}/api/v1/version", headers=headers)
|
version_info = do_request(f"{GITEA_URL}/api/v1/version", headers=headers)
|
||||||
version_string = version_info.get("version", "Unknown") if version_info else "Unknown"
|
version_string = version_info.get("version", "Unknown") if version_info else "Unknown"
|
||||||
repos_info = do_request(f"{GITEA_URL}/api/v1/users/{USERNAME}/repos?type=owner", headers=headers)
|
repos_info = do_request(f"{GITEA_URL}/api/v1/users/{USERNAME}/repos?type=owner", headers=headers)
|
||||||
|
organisations_info = do_request(f"{GITEA_URL}/api/v1/users/{USERNAME}/orgs", headers=headers)
|
||||||
repos = []
|
repos = []
|
||||||
if repos_info is not None:
|
if repos_info is not None:
|
||||||
for repo in repos_info:
|
for repo in repos_info:
|
||||||
@@ -56,34 +57,50 @@ def collect_gitea_data():
|
|||||||
"release_count": repo.get("release_count", 0),
|
"release_count": repo.get("release_count", 0),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
organisations = []
|
||||||
|
if organisations_info is not None:
|
||||||
|
for org in organisations_info:
|
||||||
|
organisations.append({
|
||||||
|
"name": org.get("name", "N/A"),
|
||||||
|
"id": org.get("id", "N/A"),
|
||||||
|
"private": org.get("private", False),
|
||||||
|
"description": org.get("description", "N/A"),
|
||||||
|
"full_name": org.get("full_name", "N/A"),
|
||||||
|
})
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"username": USERNAME,
|
"username": USERNAME,
|
||||||
"version": version_string,
|
"version": version_string,
|
||||||
"uptime": get_uptime(),
|
"uptime": get_uptime(),
|
||||||
"repos": repos or []
|
"repos": repos or [],
|
||||||
|
"organisations": organisations or [],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def do_readme_parse():
|
def do_readme_parse():
|
||||||
data = collect_gitea_data() # does all the API calls and collects the data into a structured format, collected once to avoid multiple API calls during the README build process, this data will be used to populate the README template with the relevant information about the Gitea instance and the user's repositories.
|
data = collect_gitea_data() # does all the API calls and collects the data into a structured format, collected once to avoid multiple API calls during the README build process, this data will be used to populate the README template with the relevant information about the Gitea instance and the user's repositories.
|
||||||
storage_used = sum(repo["size"] for repo in data["repos"])
|
storage_used = sum(repo["size"] for repo in data["repos"])
|
||||||
languages_used = set(repo["language"] for repo in data["repos"] if repo["language"] != "N/A")
|
languages_used = set(repo["language"] for repo in data["repos"] if repo["language"] != "N/A")
|
||||||
username = data["username"].capitalize() if data["username"] else "Unknown User"
|
username = data["username"].capitalize() if data["username"] else "Unknown User"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
md = f"# {username}'s Developer Hub\n\n"
|
md = f"# {username}'s Developer Hub\n\n"
|
||||||
md += f"## Welcome to {username}'s Gitea Developer Hub! This is a collection of repositories and projects that I have created and maintained on my Gitea instance. Here you can find various projects that I have worked on, ranging from personal projects to open-source contributions.\n\n"
|
md += f"## Welcome to {username}'s Gitea Developer Hub! This is a collection of repositories and projects that I have created and maintained on my Gitea instance. Here you can find various projects that I have worked on, ranging from personal projects to open-source contributions.\n\n"
|
||||||
if data["repos"]:
|
if data["repos"]:
|
||||||
md += f"### 📂 Repository Breakdown\n\n"
|
md += f"### 📂 Repository Breakdown\n\n"
|
||||||
tab_headers = ["Name", "Language", "Size", "Releases", "Private", "Archived"]
|
tab_headers = ["Name", "Language", "Size", "Releases", "Private", "Archived", "Access Link", "Last Commit"]
|
||||||
tab_rows = []
|
tab_rows = []
|
||||||
for repo in data["repos"]:
|
for repo in data["repos"]:
|
||||||
tab_rows.append([
|
tab_rows.append([
|
||||||
repo["name"],
|
repo["name"],
|
||||||
repo["language"],
|
repo["language"] if len(repo["language"]) > 1 else "N/A",
|
||||||
format_bytes(repo["size"]),
|
format_bytes(repo["size"]),
|
||||||
repo["release_count"],
|
repo["release_count"]if repo["release_count"] > 0 else "None",
|
||||||
"Yes" if repo["private"] else "No",
|
"Yes" if repo["private"] else "No",
|
||||||
"Yes" if repo["archived"] else "No"
|
"Yes" if repo["archived"] else "No",
|
||||||
|
f"[View]({GITEA_URL}/{USERNAME}/{repo['name']})",
|
||||||
|
f""
|
||||||
])
|
])
|
||||||
md += tabulate.tabulate(tab_rows, headers=tab_headers, tablefmt="pipe")
|
md += tabulate.tabulate(tab_rows, headers=tab_headers, tablefmt="pipe")
|
||||||
md += "\n\n"
|
md += "\n\n"
|
||||||
@@ -93,8 +110,29 @@ def do_readme_parse():
|
|||||||
md += f"**Total Storage Used:** {format_bytes(storage_used)}\n\n"
|
md += f"**Total Storage Used:** {format_bytes(storage_used)}\n\n"
|
||||||
if languages_used:
|
if languages_used:
|
||||||
md += f"### **Languages Used:**\n\n"
|
md += f"### **Languages Used:**\n\n"
|
||||||
|
md += "```\n"
|
||||||
for lang in languages_used:
|
for lang in languages_used:
|
||||||
md += f"- **{lang}**\n"
|
if len(lang) > 1: # Filter out empty or invalid language entries
|
||||||
|
md += f"- **{lang}**\n"
|
||||||
|
|
||||||
|
md += "```"
|
||||||
|
|
||||||
|
md += "\n"
|
||||||
|
|
||||||
|
if data["organisations"]:
|
||||||
|
md += f"### 🏢 Owned Organisation Breakdown\n\n"
|
||||||
|
tab_headers = ["Name", "Description", "Private", "Access Link"]
|
||||||
|
tab_rows = []
|
||||||
|
for org in data["organisations"]:
|
||||||
|
tab_rows.append([
|
||||||
|
org["name"],
|
||||||
|
org["description"] if len(org["description"]) > 1 else "N/A",
|
||||||
|
"Yes" if org["private"] else "No",
|
||||||
|
f"[View]({GITEA_URL}/{org['name']})"
|
||||||
|
])
|
||||||
|
md += tabulate.tabulate(tab_rows, headers=tab_headers, tablefmt="pipe")
|
||||||
|
md += "\n\n"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -125,6 +163,8 @@ def do_readme_build():
|
|||||||
def debug_request():
|
def debug_request():
|
||||||
headers = {"Authorization": f"token {GITEA_TOKEN}"}
|
headers = {"Authorization": f"token {GITEA_TOKEN}"}
|
||||||
version_info = do_request(f"{GITEA_URL}/api/v1/version", headers=headers)
|
version_info = do_request(f"{GITEA_URL}/api/v1/version", headers=headers)
|
||||||
|
users_heatmap = do_request(f"{GITEA_URL}/api/v1/users/{USERNAME}/heatmap", headers=headers)
|
||||||
|
print(f"User Heatmap: {users_heatmap}")
|
||||||
version_string = version_info.get("version", "Unknown") if version_info else "Unknown"
|
version_string = version_info.get("version", "Unknown") if version_info else "Unknown"
|
||||||
if version_info:
|
if version_info:
|
||||||
print(f"Gitea Version: {version_string}")
|
print(f"Gitea Version: {version_string}")
|
||||||
|
|||||||
Reference in New Issue
Block a user