Skip to content

Commit

Permalink
Fix GitHub organization dependency, now works for user webhooks too (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
eXistenZNL authored Nov 5, 2023
1 parent aa1f43f commit 572abf9
Show file tree
Hide file tree
Showing 71 changed files with 6,381 additions and 121 deletions.
4 changes: 2 additions & 2 deletions backend/parser/github/pull-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class GitHubPullRequestParser {
if (!status) {
status = {
id,
project: `${pullRequest.organization.login} / ${pullRequest.repository.name}`,
project: `${pullRequest.repository.owner.login} / ${pullRequest.repository.name}`,
state: 'info',
source: 'github',
time: new Date().toUTCString(),
Expand All @@ -23,7 +23,7 @@ class GitHubPullRequestParser {
username: pullRequest.sender.login,
userUrl: pullRequest.sender.html_url,
userImage: pullRequest.sender.avatar_url,
projectImage: pullRequest.organization.avatar_url,
projectImage: pullRequest.repository.owner.avatar_url,
sourceUrl: pullRequest.repository.html_url,
mergeTitle: pullRequest.pull_request.title,
mergeUrl: pullRequest.pull_request.html_url,
Expand Down
4 changes: 2 additions & 2 deletions backend/parser/github/push.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class GitHubPushParser {
if (!status) {
status = {
id,
project: `${push.organization.login} / ${push.repository.name}`,
project: `${push.repository.owner.name} / ${push.repository.name}`,
state: 'info',
source: 'github',
time: new Date().toUTCString(),
Expand All @@ -34,7 +34,7 @@ class GitHubPushParser {
username: push.sender.login,
userUrl: push.sender.html_url,
userImage: push.sender.avatar_url,
projectImage: push.organization.avatar_url,
projectImage: push.repository.owner.avatar_url,
sourceUrl: push.repository.html_url,
time: new Date().toUTCString(),
};
Expand Down
4 changes: 2 additions & 2 deletions backend/parser/github/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class GitHubRunParser {
if (!status) {
status = {
id,
project: `${run.organization.login} / ${run.repository.name}`,
project: `${run.repository.owner.login} / ${run.repository.name}`,
state: 'info',
source: 'github',
branch: run.workflow_run.head_branch,
Expand Down Expand Up @@ -55,7 +55,7 @@ class GitHubRunParser {
username: run.sender.login,
userUrl: run.sender.html_url,
userImage: run.sender.avatar_url,
projectImage: run.organization.avatar_url,
projectImage: run.repository.owner.avatar_url,
sourceUrl: run.repository.html_url,
processes,
time: new Date().toUTCString(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,7 @@
},
"added": [],
"removed": [],
"modified": [
".editorconfig",
"docs/run/locally.md",
"docs/run/raspberry-arm.md"
]
"modified": [".editorconfig", "docs/run/locally.md", "docs/run/raspberry-arm.md"]
}
],
"head_commit": {
Expand All @@ -227,11 +223,7 @@
},
"added": [],
"removed": [],
"modified": [
".editorconfig",
"docs/run/locally.md",
"docs/run/raspberry-arm.md"
]
"modified": [".editorconfig", "docs/run/locally.md", "docs/run/raspberry-arm.md"]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@
}
],
"check_run_url": "https://api.github.com/repos/FuturePortal/CIMonitor/check-runs/18367967224",
"labels": [
"ubuntu-22.04"
],
"labels": ["ubuntu-22.04"],
"runner_id": 3,
"runner_name": "GitHub Actions 3",
"runner_group_id": 2,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@
}
],
"check_run_url": "https://api.github.com/repos/FuturePortal/CIMonitor/check-runs/18367967136",
"labels": [
"ubuntu-22.04"
],
"labels": ["ubuntu-22.04"],
"runner_id": 2,
"runner_name": "GitHub Actions 2",
"runner_group_id": 2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,7 @@
}
],
"check_run_url": "https://api.github.com/repos/FuturePortal/CIMonitor/check-runs/18367967326",
"labels": [
"ubuntu-22.04"
],
"labels": ["ubuntu-22.04"],
"runner_id": 4,
"runner_name": "GitHub Actions 4",
"runner_group_id": 2,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,7 @@
}
],
"check_run_url": "https://api.github.com/repos/FuturePortal/CIMonitor/check-runs/18367967224",
"labels": [
"ubuntu-22.04"
],
"labels": ["ubuntu-22.04"],
"runner_id": 3,
"runner_name": "GitHub Actions 3",
"runner_group_id": 2,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,7 @@
}
],
"check_run_url": "https://api.github.com/repos/FuturePortal/CIMonitor/check-runs/18367967136",
"labels": [
"ubuntu-22.04"
],
"labels": ["ubuntu-22.04"],
"runner_id": 2,
"runner_name": "GitHub Actions 2",
"runner_group_id": 2,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@
"name": "Build / Module client / Build & Tag",
"steps": [],
"check_run_url": "https://api.github.com/repos/FuturePortal/CIMonitor/check-runs/18367979549",
"labels": [
"ubuntu-22.04"
],
"labels": ["ubuntu-22.04"],
"runner_id": null,
"runner_name": null,
"runner_group_id": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@
"name": "Build / Module client ARM / Build & Tag",
"steps": [],
"check_run_url": "https://api.github.com/repos/FuturePortal/CIMonitor/check-runs/18367979605",
"labels": [
"ubuntu-22.04"
],
"labels": ["ubuntu-22.04"],
"runner_id": null,
"runner_name": null,
"runner_group_id": null,
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@
"name": "Build / Server / Build & Tag",
"steps": [],
"check_run_url": "https://api.github.com/repos/FuturePortal/CIMonitor/check-runs/18367979664",
"labels": [
"ubuntu-22.04"
],
"labels": ["ubuntu-22.04"],
"runner_id": null,
"runner_name": null,
"runner_group_id": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@
"name": "Build / Server ARM / Build & Tag",
"steps": [],
"check_run_url": "https://api.github.com/repos/FuturePortal/CIMonitor/check-runs/18367979711",
"labels": [
"ubuntu-22.04"
],
"labels": ["ubuntu-22.04"],
"runner_id": null,
"runner_name": null,
"runner_group_id": null,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,7 @@
}
],
"check_run_url": "https://api.github.com/repos/FuturePortal/CIMonitor/check-runs/18367979549",
"labels": [
"ubuntu-22.04"
],
"labels": ["ubuntu-22.04"],
"runner_id": 3,
"runner_name": "GitHub Actions 3",
"runner_group_id": 2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,7 @@
}
],
"check_run_url": "https://api.github.com/repos/FuturePortal/CIMonitor/check-runs/18367979711",
"labels": [
"ubuntu-22.04"
],
"labels": ["ubuntu-22.04"],
"runner_id": 5,
"runner_name": "GitHub Actions 5",
"runner_group_id": 2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,7 @@
}
],
"check_run_url": "https://api.github.com/repos/FuturePortal/CIMonitor/check-runs/18367979664",
"labels": [
"ubuntu-22.04"
],
"labels": ["ubuntu-22.04"],
"runner_id": 4,
"runner_name": "GitHub Actions 4",
"runner_group_id": 2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@
"name": "Test / ESLint",
"steps": [],
"check_run_url": "https://api.github.com/repos/FuturePortal/CIMonitor/check-runs/18367967136",
"labels": [
"ubuntu-22.04"
],
"labels": ["ubuntu-22.04"],
"runner_id": null,
"runner_name": null,
"runner_group_id": null,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,7 @@
}
],
"check_run_url": "https://api.github.com/repos/FuturePortal/CIMonitor/check-runs/18367979605",
"labels": [
"ubuntu-22.04"
],
"labels": ["ubuntu-22.04"],
"runner_id": 2,
"runner_name": "GitHub Actions 2",
"runner_group_id": 2,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,7 @@
}
],
"check_run_url": "https://api.github.com/repos/FuturePortal/CIMonitor/check-runs/18367979549",
"labels": [
"ubuntu-22.04"
],
"labels": ["ubuntu-22.04"],
"runner_id": 3,
"runner_name": "GitHub Actions 3",
"runner_group_id": 2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,7 @@
}
],
"check_run_url": "https://api.github.com/repos/FuturePortal/CIMonitor/check-runs/18367979664",
"labels": [
"ubuntu-22.04"
],
"labels": ["ubuntu-22.04"],
"runner_id": 4,
"runner_name": "GitHub Actions 4",
"runner_group_id": 2,
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,7 @@
}
],
"check_run_url": "https://api.github.com/repos/FuturePortal/CIMonitor/check-runs/18367979711",
"labels": [
"ubuntu-22.04"
],
"labels": ["ubuntu-22.04"],
"runner_id": 5,
"runner_name": "GitHub Actions 5",
"runner_group_id": 2,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,7 @@
}
],
"check_run_url": "https://api.github.com/repos/FuturePortal/CIMonitor/check-runs/18367979605",
"labels": [
"ubuntu-22.04"
],
"labels": ["ubuntu-22.04"],
"runner_id": 2,
"runner_name": "GitHub Actions 2",
"runner_group_id": 2,
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@
"name": "Test / Frontend typescript",
"steps": [],
"check_run_url": "https://api.github.com/repos/FuturePortal/CIMonitor/check-runs/18367967224",
"labels": [
"ubuntu-22.04"
],
"labels": ["ubuntu-22.04"],
"runner_id": null,
"runner_name": null,
"runner_group_id": null,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@
"name": "Test / Backend typescript",
"steps": [],
"check_run_url": "https://api.github.com/repos/FuturePortal/CIMonitor/check-runs/18367967326",
"labels": [
"ubuntu-22.04"
],
"labels": ["ubuntu-22.04"],
"runner_id": null,
"runner_name": null,
"runner_group_id": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,7 @@
}
],
"check_run_url": "https://api.github.com/repos/FuturePortal/CIMonitor/check-runs/18367967326",
"labels": [
"ubuntu-22.04"
],
"labels": ["ubuntu-22.04"],
"runner_id": 4,
"runner_name": "GitHub Actions 4",
"runner_group_id": 2,
Expand Down
Loading

0 comments on commit 572abf9

Please sign in to comment.