Compare commits
3 Commits
bdf00e6324
...
6ceccbadd0
Author | SHA1 | Date | |
---|---|---|---|
6ceccbadd0 | |||
aab15866ee | |||
3e62ce8b08 |
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
__pycache__/
|
||||
testing_configuration.cfg
|
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"nixEnvSelector.nixFile": "${workspaceFolder}/shell.nix"
|
||||
}
|
186
bridge/__init__.py
Normal file
186
bridge/__init__.py
Normal file
@ -0,0 +1,186 @@
|
||||
from flask import Flask
|
||||
from flask import request
|
||||
from flask import redirect
|
||||
from flask import abort
|
||||
|
||||
import requests
|
||||
|
||||
app = Flask(__name__)
|
||||
app.config.from_envvar('GIT_BRIDGE_SETTINGS')
|
||||
|
||||
@app.route("/bridge")
|
||||
def index():
|
||||
return "you've reached the main page for an internal service. congrats!"
|
||||
|
||||
@app.route("/bridge/endpoints/gitea/repo", methods=["POST"])
|
||||
def gitea_handle_repo_action():
|
||||
data = request.json
|
||||
|
||||
try:
|
||||
repository = data["repository"]
|
||||
|
||||
repo_action = data["action"]
|
||||
repo_id = repository["id"]
|
||||
repo_owner = repository["owner"]["login"]
|
||||
repo_name = repository["name"]
|
||||
repo_description = repository["description"]
|
||||
|
||||
except KeyError:
|
||||
abort(400) # the data isn't formatted correctly
|
||||
|
||||
"""
|
||||
Our plan of action for handling these events:
|
||||
- ignore deleting repositories -- this is a potentially destructive operation
|
||||
that *only* *the* *user* *should* *do*
|
||||
- create a cooresponding repo on github
|
||||
- create a push mirror to github so pushes to gitea get to github
|
||||
- create webhooks for issues (and in the future, pull requests) on both
|
||||
Gitea and Github ends
|
||||
"""
|
||||
|
||||
if not repo_action == "created":
|
||||
return ''
|
||||
|
||||
github_created_repo_result = requests.post(
|
||||
"https://api.github.com/user/repos",
|
||||
json={
|
||||
"name": repo_name,
|
||||
"description": repo_description,
|
||||
"homepage": "https://{}/{}/{}".format(
|
||||
app.config["GITEA_INSTANCE_DOMAIN"],
|
||||
repo_owner,
|
||||
repo_name,
|
||||
),
|
||||
},
|
||||
headers={
|
||||
"Accept": "application/vnd.github+json",
|
||||
"Authorization": "token " + app.config["GITHUB_ACCESS_TOKEN"],
|
||||
"X-GitHub-Api-Version": "2022-11-28",
|
||||
},
|
||||
)
|
||||
|
||||
try:
|
||||
github_created_repo_result.raise_for_status()
|
||||
except requests.exceptions.HTTPError:
|
||||
abort(500)
|
||||
|
||||
new_github_repo_url = github_created_repo_result.json()["html_url"]
|
||||
|
||||
gitea_add_github_repo_url_result = requests.patch(
|
||||
"https://{}/api/v1/repos/{}/{}".format(
|
||||
app.config["GITEA_INSTANCE_DOMAIN"],
|
||||
repo_owner,
|
||||
repo_name,
|
||||
),
|
||||
json={
|
||||
"website": new_github_repo_url,
|
||||
},
|
||||
headers={
|
||||
"Authorization": "token " + app.config["GITEA_ACCESS_TOKEN"],
|
||||
},
|
||||
)
|
||||
|
||||
try:
|
||||
gitea_add_github_repo_url_result.raise_for_status()
|
||||
except requests.exceptions.HTTPError:
|
||||
abort(500)
|
||||
|
||||
gitea_push_target_result = requests.post(
|
||||
"https://{}/api/v1/repos/{}/{}/push_mirrors".format(
|
||||
app.config["GITEA_INSTANCE_DOMAIN"],
|
||||
repo_owner,
|
||||
repo_name
|
||||
),
|
||||
json={
|
||||
"interval": "8h0m0s",
|
||||
"remote_address": new_github_repo_url,
|
||||
"remote_password": app.config["GITHUB_ACCESS_TOKEN"],
|
||||
"remote_username": repo_owner,
|
||||
"sync_on_commit": True,
|
||||
},
|
||||
headers={
|
||||
"Authorization": "token " + app.config["GITEA_ACCESS_TOKEN"],
|
||||
},
|
||||
)
|
||||
|
||||
try:
|
||||
gitea_push_target_result.raise_for_status()
|
||||
except requests.exceptions.HTTPError:
|
||||
abort(500)
|
||||
|
||||
gitea_force_target_push = requests.post(
|
||||
"https://{}/api/v1/repos/{}/{}/push_mirrors-sync".format(
|
||||
app.config["GITEA_INSTANCE_DOMAIN"],
|
||||
repo_owner,
|
||||
repo_name
|
||||
),
|
||||
headers={
|
||||
"Authorization": "token " + app.config["GITEA_ACCESS_TOKEN"],
|
||||
},
|
||||
)
|
||||
|
||||
try:
|
||||
gitea_force_target_push.raise_for_status()
|
||||
except requests.exceptions.HTTPError:
|
||||
abort(500)
|
||||
|
||||
github_create_webhook_result = requests.post(
|
||||
"https://api.github.com/repos/{}/{}/hooks".format(
|
||||
repo_owner,
|
||||
repo_name,
|
||||
),
|
||||
json={
|
||||
"name": "web",
|
||||
"config": {
|
||||
"url": "https://{}/bridge/endpoints/github/issue".format(
|
||||
app.config["GITEA_INSTANCE_DOMAIN"]
|
||||
),
|
||||
"content_type": "json",
|
||||
},
|
||||
"events": [
|
||||
"issues", "issue_comment",
|
||||
],
|
||||
},
|
||||
headers={
|
||||
"Accept": "application/vnd.github+json",
|
||||
"Authorization": "token " + app.config["GITHUB_ACCESS_TOKEN"],
|
||||
"X-GitHub-Api-Version": "2022-11-28",
|
||||
},
|
||||
)
|
||||
|
||||
try:
|
||||
github_create_webhook_result.raise_for_status()
|
||||
except requests.exceptions.HTTPError:
|
||||
abort(500)
|
||||
|
||||
gitea_create_webhook_result = requests.post(
|
||||
"https://{}/api/v1/repos/{}/{}/hooks".format(
|
||||
app.config["GITEA_INSTANCE_DOMAIN"],
|
||||
repo_owner,
|
||||
repo_name,
|
||||
),
|
||||
json={
|
||||
"active": True,
|
||||
"type": "gitea",
|
||||
"config": {
|
||||
"content_type": "json",
|
||||
"url": "https://{}/bridge/endpoints/gitea/issue".format(
|
||||
app.config["GITEA_INSTANCE_DOMAIN"],
|
||||
),
|
||||
"http_method": "post",
|
||||
},
|
||||
"events": [
|
||||
"issues", "issue_comment",
|
||||
],
|
||||
},
|
||||
headers={
|
||||
"Authorization": "token " + app.config["GITEA_ACCESS_TOKEN"],
|
||||
},
|
||||
)
|
||||
|
||||
try:
|
||||
gitea_create_webhook_result.raise_for_status()
|
||||
except requests.exceptions.HTTPError:
|
||||
abort(500)
|
||||
|
||||
return ''
|
4
contrib/sample.cfg
Normal file
4
contrib/sample.cfg
Normal file
@ -0,0 +1,4 @@
|
||||
SECRET_KEY="replace_me"
|
||||
GITHUB_ACCESS_TOKEN="replace_me"
|
||||
GITEA_ACCESS_TOKEN="replace_me"
|
||||
GITEA_INSTANCE_DOMAIN="git.beepboop.systems"
|
19
contrib/service.nix
Normal file
19
contrib/service.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{ lib, pkgs, config, ... }:
|
||||
let
|
||||
cfg = config.services.gmail_mail_bridge;
|
||||
appEnv = pkgs.python3.withPackages (p: with p; [ waitress (callPackage ./bridge/default.nix {}) ]);
|
||||
in {
|
||||
options.services.gmail_mail_bridge = {
|
||||
enable = lib.mkEnableOption "Enable the Gitea-Github bridge";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
systemd.services.gmail_mail_bridge = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${appEnv}/bin/waitress-serve --port=8041 bridge:app";
|
||||
StandardOutput = "journal";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
20
default.nix
Normal file
20
default.nix
Normal file
@ -0,0 +1,20 @@
|
||||
{ pkgs, pythonPackages ? (import <nixpkgs> {}).python3Packages }:
|
||||
pythonPackages.buildPythonPackage {
|
||||
name = "gitea-github-bridge";
|
||||
src = ./bridge;
|
||||
|
||||
propagatedBuildInputs = [ pythonPackages.flask pythonPackages.requests ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/${pythonPackages.python.sitePackages}
|
||||
cp -r . $out/${pythonPackages.python.sitePackages}/bridge
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
shellHook = "export FLASK_APP=bridge";
|
||||
|
||||
format = "other";
|
||||
}
|
13
shell.nix
Normal file
13
shell.nix
Normal file
@ -0,0 +1,13 @@
|
||||
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-24.05") {} }:
|
||||
|
||||
pkgs.mkShell {
|
||||
packages = [
|
||||
(pkgs.python3.withPackages (ps: [
|
||||
ps.flask
|
||||
ps.requests
|
||||
]))
|
||||
|
||||
pkgs.curl
|
||||
pkgs.jq
|
||||
];
|
||||
}
|
3
tests/README.md
Normal file
3
tests/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
# a ""test"" ""suite"", if it could be called that
|
||||
|
||||
This directory contains a bunch of programs for auditing the behavior of the Flask app under different requests from different services. It contains some captured verbatim websockets callbacks so I can develop on them.
|
169
tests/data/gitea-issue-closed.json
Normal file
169
tests/data/gitea-issue-closed.json
Normal file
@ -0,0 +1,169 @@
|
||||
{
|
||||
"action": "closed",
|
||||
"number": 1,
|
||||
"issue": {
|
||||
"id": 42,
|
||||
"url": "https://git.beepboop.systems/api/v1/repos/stupidcomputer/sadkfjasdf/issues/1",
|
||||
"html_url": "https://git.beepboop.systems/stupidcomputer/sadkfjasdf/issues/1",
|
||||
"number": 1,
|
||||
"user": {
|
||||
"id": 1,
|
||||
"login": "stupidcomputer",
|
||||
"login_name": "",
|
||||
"full_name": "stupidcomputer",
|
||||
"email": "stupidcomputer@noreply.git.beepboop.systems",
|
||||
"avatar_url": "https://secure.gravatar.com/avatar/b642b4217b34b1e8d3bd915fc65c4452?d=identicon",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "0001-01-01T00:00:00Z",
|
||||
"created": "2023-06-23T22:23:01-05:00",
|
||||
"restricted": false,
|
||||
"active": false,
|
||||
"prohibit_login": false,
|
||||
"location": "",
|
||||
"website": "https://beepboop.systems",
|
||||
"description": "High schooler interested in computers, security, and reproducible systems.\r\n",
|
||||
"visibility": "public",
|
||||
"followers_count": 0,
|
||||
"following_count": 0,
|
||||
"starred_repos_count": 0,
|
||||
"username": "stupidcomputer"
|
||||
},
|
||||
"original_author": "",
|
||||
"original_author_id": 0,
|
||||
"title": "another testing issue",
|
||||
"body": "",
|
||||
"ref": "",
|
||||
"assets": [],
|
||||
"labels": [],
|
||||
"milestone": null,
|
||||
"assignee": null,
|
||||
"assignees": null,
|
||||
"state": "closed",
|
||||
"is_locked": false,
|
||||
"comments": 1,
|
||||
"created_at": "2024-10-09T01:07:19-05:00",
|
||||
"updated_at": "2024-10-09T01:27:16-05:00",
|
||||
"closed_at": "2024-10-09T01:27:16-05:00",
|
||||
"due_date": null,
|
||||
"pull_request": null,
|
||||
"repository": {
|
||||
"id": 73,
|
||||
"name": "sadkfjasdf",
|
||||
"owner": "stupidcomputer",
|
||||
"full_name": "stupidcomputer/sadkfjasdf"
|
||||
},
|
||||
"pin_order": 0
|
||||
},
|
||||
"repository": {
|
||||
"id": 73,
|
||||
"owner": {
|
||||
"id": 1,
|
||||
"login": "stupidcomputer",
|
||||
"login_name": "",
|
||||
"full_name": "stupidcomputer",
|
||||
"email": "stupidcomputer@noreply.git.beepboop.systems",
|
||||
"avatar_url": "https://secure.gravatar.com/avatar/b642b4217b34b1e8d3bd915fc65c4452?d=identicon",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "0001-01-01T00:00:00Z",
|
||||
"created": "2023-06-23T22:23:01-05:00",
|
||||
"restricted": false,
|
||||
"active": false,
|
||||
"prohibit_login": false,
|
||||
"location": "",
|
||||
"website": "https://beepboop.systems",
|
||||
"description": "High schooler interested in computers, security, and reproducible systems.\r\n",
|
||||
"visibility": "public",
|
||||
"followers_count": 0,
|
||||
"following_count": 0,
|
||||
"starred_repos_count": 0,
|
||||
"username": "stupidcomputer"
|
||||
},
|
||||
"name": "sadkfjasdf",
|
||||
"full_name": "stupidcomputer/sadkfjasdf",
|
||||
"description": "",
|
||||
"empty": true,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"parent": null,
|
||||
"mirror": false,
|
||||
"size": 28,
|
||||
"language": "",
|
||||
"languages_url": "https://git.beepboop.systems/api/v1/repos/stupidcomputer/sadkfjasdf/languages",
|
||||
"html_url": "https://git.beepboop.systems/stupidcomputer/sadkfjasdf",
|
||||
"url": "https://git.beepboop.systems/api/v1/repos/stupidcomputer/sadkfjasdf",
|
||||
"link": "",
|
||||
"ssh_url": "gitea@git.beepboop.systems:stupidcomputer/sadkfjasdf.git",
|
||||
"clone_url": "https://git.beepboop.systems/stupidcomputer/sadkfjasdf.git",
|
||||
"original_url": "",
|
||||
"website": "https://github.com/stupidcomputer/sadkfjasdf",
|
||||
"stars_count": 0,
|
||||
"forks_count": 0,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 1,
|
||||
"open_pr_counter": 0,
|
||||
"release_counter": 0,
|
||||
"default_branch": "main",
|
||||
"archived": false,
|
||||
"created_at": "2024-10-08T22:47:49-05:00",
|
||||
"updated_at": "2024-10-09T01:05:10-05:00",
|
||||
"archived_at": "1969-12-31T18:00:00-06:00",
|
||||
"permissions": {
|
||||
"admin": true,
|
||||
"push": true,
|
||||
"pull": true
|
||||
},
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"has_projects": true,
|
||||
"has_releases": true,
|
||||
"has_packages": true,
|
||||
"has_actions": false,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"allow_rebase_update": true,
|
||||
"default_delete_branch_after_merge": false,
|
||||
"default_merge_style": "merge",
|
||||
"default_allow_maintainer_edit": false,
|
||||
"avatar_url": "",
|
||||
"internal": false,
|
||||
"mirror_interval": "",
|
||||
"mirror_updated": "0001-01-01T00:00:00Z",
|
||||
"repo_transfer": null
|
||||
},
|
||||
"sender": {
|
||||
"id": 1,
|
||||
"login": "stupidcomputer",
|
||||
"login_name": "",
|
||||
"full_name": "stupidcomputer",
|
||||
"email": "stupidcomputer@noreply.git.beepboop.systems",
|
||||
"avatar_url": "https://secure.gravatar.com/avatar/b642b4217b34b1e8d3bd915fc65c4452?d=identicon",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "0001-01-01T00:00:00Z",
|
||||
"created": "2023-06-23T22:23:01-05:00",
|
||||
"restricted": false,
|
||||
"active": false,
|
||||
"prohibit_login": false,
|
||||
"location": "",
|
||||
"website": "https://beepboop.systems",
|
||||
"description": "High schooler interested in computers, security, and reproducible systems.\r\n",
|
||||
"visibility": "public",
|
||||
"followers_count": 0,
|
||||
"following_count": 0,
|
||||
"starred_repos_count": 0,
|
||||
"username": "stupidcomputer"
|
||||
},
|
||||
"commit_id": ""
|
||||
}
|
203
tests/data/gitea-issue-comment-created.json
Normal file
203
tests/data/gitea-issue-comment-created.json
Normal file
@ -0,0 +1,203 @@
|
||||
{
|
||||
"action": "created",
|
||||
"issue": {
|
||||
"id": 42,
|
||||
"url": "https://git.beepboop.systems/api/v1/repos/stupidcomputer/sadkfjasdf/issues/1",
|
||||
"html_url": "https://git.beepboop.systems/stupidcomputer/sadkfjasdf/issues/1",
|
||||
"number": 1,
|
||||
"user": {
|
||||
"id": 1,
|
||||
"login": "stupidcomputer",
|
||||
"login_name": "",
|
||||
"full_name": "stupidcomputer",
|
||||
"email": "stupidcomputer@noreply.git.beepboop.systems",
|
||||
"avatar_url": "https://secure.gravatar.com/avatar/b642b4217b34b1e8d3bd915fc65c4452?d=identicon",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "0001-01-01T00:00:00Z",
|
||||
"created": "2023-06-23T22:23:01-05:00",
|
||||
"restricted": false,
|
||||
"active": false,
|
||||
"prohibit_login": false,
|
||||
"location": "",
|
||||
"website": "https://beepboop.systems",
|
||||
"description": "High schooler interested in computers, security, and reproducible systems.\r\n",
|
||||
"visibility": "public",
|
||||
"followers_count": 0,
|
||||
"following_count": 0,
|
||||
"starred_repos_count": 0,
|
||||
"username": "stupidcomputer"
|
||||
},
|
||||
"original_author": "",
|
||||
"original_author_id": 0,
|
||||
"title": "another testing issue",
|
||||
"body": "",
|
||||
"ref": "",
|
||||
"assets": [],
|
||||
"labels": [],
|
||||
"milestone": null,
|
||||
"assignee": null,
|
||||
"assignees": null,
|
||||
"state": "open",
|
||||
"is_locked": false,
|
||||
"comments": 0,
|
||||
"created_at": "2024-10-09T01:07:19-05:00",
|
||||
"updated_at": "2024-10-09T01:13:12-05:00",
|
||||
"closed_at": null,
|
||||
"due_date": null,
|
||||
"pull_request": null,
|
||||
"repository": {
|
||||
"id": 73,
|
||||
"name": "sadkfjasdf",
|
||||
"owner": "stupidcomputer",
|
||||
"full_name": "stupidcomputer/sadkfjasdf"
|
||||
},
|
||||
"pin_order": 0
|
||||
},
|
||||
"comment": {
|
||||
"id": 155,
|
||||
"html_url": "https://git.beepboop.systems/stupidcomputer/sadkfjasdf/issues/1#issuecomment-155",
|
||||
"pull_request_url": "",
|
||||
"issue_url": "https://git.beepboop.systems/stupidcomputer/sadkfjasdf/issues/1",
|
||||
"user": {
|
||||
"id": 1,
|
||||
"login": "stupidcomputer",
|
||||
"login_name": "",
|
||||
"full_name": "stupidcomputer",
|
||||
"email": "stupidcomputer@noreply.git.beepboop.systems",
|
||||
"avatar_url": "https://secure.gravatar.com/avatar/b642b4217b34b1e8d3bd915fc65c4452?d=identicon",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "0001-01-01T00:00:00Z",
|
||||
"created": "2023-06-23T22:23:01-05:00",
|
||||
"restricted": false,
|
||||
"active": false,
|
||||
"prohibit_login": false,
|
||||
"location": "",
|
||||
"website": "https://beepboop.systems",
|
||||
"description": "High schooler interested in computers, security, and reproducible systems.\r\n",
|
||||
"visibility": "public",
|
||||
"followers_count": 0,
|
||||
"following_count": 0,
|
||||
"starred_repos_count": 0,
|
||||
"username": "stupidcomputer"
|
||||
},
|
||||
"original_author": "",
|
||||
"original_author_id": 0,
|
||||
"body": "Here's another additional, helpful comment.",
|
||||
"assets": [],
|
||||
"created_at": "2024-10-09T01:13:12-05:00",
|
||||
"updated_at": "2024-10-09T01:13:12-05:00"
|
||||
},
|
||||
"repository": {
|
||||
"id": 73,
|
||||
"owner": {
|
||||
"id": 1,
|
||||
"login": "stupidcomputer",
|
||||
"login_name": "",
|
||||
"full_name": "stupidcomputer",
|
||||
"email": "stupidcomputer@noreply.git.beepboop.systems",
|
||||
"avatar_url": "https://secure.gravatar.com/avatar/b642b4217b34b1e8d3bd915fc65c4452?d=identicon",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "0001-01-01T00:00:00Z",
|
||||
"created": "2023-06-23T22:23:01-05:00",
|
||||
"restricted": false,
|
||||
"active": false,
|
||||
"prohibit_login": false,
|
||||
"location": "",
|
||||
"website": "https://beepboop.systems",
|
||||
"description": "High schooler interested in computers, security, and reproducible systems.\r\n",
|
||||
"visibility": "public",
|
||||
"followers_count": 0,
|
||||
"following_count": 0,
|
||||
"starred_repos_count": 0,
|
||||
"username": "stupidcomputer"
|
||||
},
|
||||
"name": "sadkfjasdf",
|
||||
"full_name": "stupidcomputer/sadkfjasdf",
|
||||
"description": "",
|
||||
"empty": true,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"parent": null,
|
||||
"mirror": false,
|
||||
"size": 28,
|
||||
"language": "",
|
||||
"languages_url": "https://git.beepboop.systems/api/v1/repos/stupidcomputer/sadkfjasdf/languages",
|
||||
"html_url": "https://git.beepboop.systems/stupidcomputer/sadkfjasdf",
|
||||
"url": "https://git.beepboop.systems/api/v1/repos/stupidcomputer/sadkfjasdf",
|
||||
"link": "",
|
||||
"ssh_url": "gitea@git.beepboop.systems:stupidcomputer/sadkfjasdf.git",
|
||||
"clone_url": "https://git.beepboop.systems/stupidcomputer/sadkfjasdf.git",
|
||||
"original_url": "",
|
||||
"website": "https://github.com/stupidcomputer/sadkfjasdf",
|
||||
"stars_count": 0,
|
||||
"forks_count": 0,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 1,
|
||||
"open_pr_counter": 0,
|
||||
"release_counter": 0,
|
||||
"default_branch": "main",
|
||||
"archived": false,
|
||||
"created_at": "2024-10-08T22:47:49-05:00",
|
||||
"updated_at": "2024-10-09T01:05:10-05:00",
|
||||
"archived_at": "1969-12-31T18:00:00-06:00",
|
||||
"permissions": {
|
||||
"admin": true,
|
||||
"push": true,
|
||||
"pull": true
|
||||
},
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"has_projects": true,
|
||||
"has_releases": true,
|
||||
"has_packages": true,
|
||||
"has_actions": false,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"allow_rebase_update": true,
|
||||
"default_delete_branch_after_merge": false,
|
||||
"default_merge_style": "merge",
|
||||
"default_allow_maintainer_edit": false,
|
||||
"avatar_url": "",
|
||||
"internal": false,
|
||||
"mirror_interval": "",
|
||||
"mirror_updated": "0001-01-01T00:00:00Z",
|
||||
"repo_transfer": null
|
||||
},
|
||||
"sender": {
|
||||
"id": 1,
|
||||
"login": "stupidcomputer",
|
||||
"login_name": "",
|
||||
"full_name": "stupidcomputer",
|
||||
"email": "stupidcomputer@noreply.git.beepboop.systems",
|
||||
"avatar_url": "https://secure.gravatar.com/avatar/b642b4217b34b1e8d3bd915fc65c4452?d=identicon",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "0001-01-01T00:00:00Z",
|
||||
"created": "2023-06-23T22:23:01-05:00",
|
||||
"restricted": false,
|
||||
"active": false,
|
||||
"prohibit_login": false,
|
||||
"location": "",
|
||||
"website": "https://beepboop.systems",
|
||||
"description": "High schooler interested in computers, security, and reproducible systems.\r\n",
|
||||
"visibility": "public",
|
||||
"followers_count": 0,
|
||||
"following_count": 0,
|
||||
"starred_repos_count": 0,
|
||||
"username": "stupidcomputer"
|
||||
},
|
||||
"is_pull": false
|
||||
}
|
169
tests/data/gitea-issue-created.json
Normal file
169
tests/data/gitea-issue-created.json
Normal file
@ -0,0 +1,169 @@
|
||||
{
|
||||
"action": "opened",
|
||||
"number": 1,
|
||||
"issue": {
|
||||
"id": 42,
|
||||
"url": "https://git.beepboop.systems/api/v1/repos/stupidcomputer/sadkfjasdf/issues/1",
|
||||
"html_url": "https://git.beepboop.systems/stupidcomputer/sadkfjasdf/issues/1",
|
||||
"number": 1,
|
||||
"user": {
|
||||
"id": 1,
|
||||
"login": "stupidcomputer",
|
||||
"login_name": "",
|
||||
"full_name": "stupidcomputer",
|
||||
"email": "stupidcomputer@noreply.git.beepboop.systems",
|
||||
"avatar_url": "https://secure.gravatar.com/avatar/b642b4217b34b1e8d3bd915fc65c4452?d=identicon",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "0001-01-01T00:00:00Z",
|
||||
"created": "2023-06-23T22:23:01-05:00",
|
||||
"restricted": false,
|
||||
"active": false,
|
||||
"prohibit_login": false,
|
||||
"location": "",
|
||||
"website": "https://beepboop.systems",
|
||||
"description": "High schooler interested in computers, security, and reproducible systems.\r\n",
|
||||
"visibility": "public",
|
||||
"followers_count": 0,
|
||||
"following_count": 0,
|
||||
"starred_repos_count": 0,
|
||||
"username": "stupidcomputer"
|
||||
},
|
||||
"original_author": "",
|
||||
"original_author_id": 0,
|
||||
"title": "another testing issue",
|
||||
"body": "",
|
||||
"ref": "",
|
||||
"assets": [],
|
||||
"labels": [],
|
||||
"milestone": null,
|
||||
"assignee": null,
|
||||
"assignees": null,
|
||||
"state": "open",
|
||||
"is_locked": false,
|
||||
"comments": 0,
|
||||
"created_at": "2024-10-09T01:07:19-05:00",
|
||||
"updated_at": "2024-10-09T01:07:19-05:00",
|
||||
"closed_at": null,
|
||||
"due_date": null,
|
||||
"pull_request": null,
|
||||
"repository": {
|
||||
"id": 73,
|
||||
"name": "sadkfjasdf",
|
||||
"owner": "stupidcomputer",
|
||||
"full_name": "stupidcomputer/sadkfjasdf"
|
||||
},
|
||||
"pin_order": 0
|
||||
},
|
||||
"repository": {
|
||||
"id": 73,
|
||||
"owner": {
|
||||
"id": 1,
|
||||
"login": "stupidcomputer",
|
||||
"login_name": "",
|
||||
"full_name": "stupidcomputer",
|
||||
"email": "stupidcomputer@noreply.git.beepboop.systems",
|
||||
"avatar_url": "https://secure.gravatar.com/avatar/b642b4217b34b1e8d3bd915fc65c4452?d=identicon",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "0001-01-01T00:00:00Z",
|
||||
"created": "2023-06-23T22:23:01-05:00",
|
||||
"restricted": false,
|
||||
"active": false,
|
||||
"prohibit_login": false,
|
||||
"location": "",
|
||||
"website": "https://beepboop.systems",
|
||||
"description": "High schooler interested in computers, security, and reproducible systems.\r\n",
|
||||
"visibility": "public",
|
||||
"followers_count": 0,
|
||||
"following_count": 0,
|
||||
"starred_repos_count": 0,
|
||||
"username": "stupidcomputer"
|
||||
},
|
||||
"name": "sadkfjasdf",
|
||||
"full_name": "stupidcomputer/sadkfjasdf",
|
||||
"description": "",
|
||||
"empty": true,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"parent": null,
|
||||
"mirror": false,
|
||||
"size": 28,
|
||||
"language": "",
|
||||
"languages_url": "https://git.beepboop.systems/api/v1/repos/stupidcomputer/sadkfjasdf/languages",
|
||||
"html_url": "https://git.beepboop.systems/stupidcomputer/sadkfjasdf",
|
||||
"url": "https://git.beepboop.systems/api/v1/repos/stupidcomputer/sadkfjasdf",
|
||||
"link": "",
|
||||
"ssh_url": "gitea@git.beepboop.systems:stupidcomputer/sadkfjasdf.git",
|
||||
"clone_url": "https://git.beepboop.systems/stupidcomputer/sadkfjasdf.git",
|
||||
"original_url": "",
|
||||
"website": "https://github.com/stupidcomputer/sadkfjasdf",
|
||||
"stars_count": 0,
|
||||
"forks_count": 0,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 0,
|
||||
"open_pr_counter": 0,
|
||||
"release_counter": 0,
|
||||
"default_branch": "main",
|
||||
"archived": false,
|
||||
"created_at": "2024-10-08T22:47:49-05:00",
|
||||
"updated_at": "2024-10-09T01:05:10-05:00",
|
||||
"archived_at": "1969-12-31T18:00:00-06:00",
|
||||
"permissions": {
|
||||
"admin": true,
|
||||
"push": true,
|
||||
"pull": true
|
||||
},
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"has_projects": true,
|
||||
"has_releases": true,
|
||||
"has_packages": true,
|
||||
"has_actions": false,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"allow_rebase_update": true,
|
||||
"default_delete_branch_after_merge": false,
|
||||
"default_merge_style": "merge",
|
||||
"default_allow_maintainer_edit": false,
|
||||
"avatar_url": "",
|
||||
"internal": false,
|
||||
"mirror_interval": "",
|
||||
"mirror_updated": "0001-01-01T00:00:00Z",
|
||||
"repo_transfer": null
|
||||
},
|
||||
"sender": {
|
||||
"id": 1,
|
||||
"login": "stupidcomputer",
|
||||
"login_name": "",
|
||||
"full_name": "stupidcomputer",
|
||||
"email": "stupidcomputer@noreply.git.beepboop.systems",
|
||||
"avatar_url": "https://secure.gravatar.com/avatar/b642b4217b34b1e8d3bd915fc65c4452?d=identicon",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "0001-01-01T00:00:00Z",
|
||||
"created": "2023-06-23T22:23:01-05:00",
|
||||
"restricted": false,
|
||||
"active": false,
|
||||
"prohibit_login": false,
|
||||
"location": "",
|
||||
"website": "https://beepboop.systems",
|
||||
"description": "High schooler interested in computers, security, and reproducible systems.\r\n",
|
||||
"visibility": "public",
|
||||
"followers_count": 0,
|
||||
"following_count": 0,
|
||||
"starred_repos_count": 0,
|
||||
"username": "stupidcomputer"
|
||||
},
|
||||
"commit_id": ""
|
||||
}
|
136
tests/data/gitea-repo-created.json
Normal file
136
tests/data/gitea-repo-created.json
Normal file
@ -0,0 +1,136 @@
|
||||
{
|
||||
"action": "created",
|
||||
"repository": {
|
||||
"id": 73,
|
||||
"owner": {
|
||||
"id": 1,
|
||||
"login": "stupidcomputer",
|
||||
"login_name": "",
|
||||
"full_name": "stupidcomputer",
|
||||
"email": "stupidcomputer@noreply.git.beepboop.systems",
|
||||
"avatar_url": "https://secure.gravatar.com/avatar/b642b4217b34b1e8d3bd915fc65c4452?d=identicon",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "0001-01-01T00:00:00Z",
|
||||
"created": "2023-06-23T22:23:01-05:00",
|
||||
"restricted": false,
|
||||
"active": false,
|
||||
"prohibit_login": false,
|
||||
"location": "",
|
||||
"website": "https://beepboop.systems",
|
||||
"description": "High schooler interested in computers, security, and reproducible systems.\r\n",
|
||||
"visibility": "public",
|
||||
"followers_count": 0,
|
||||
"following_count": 0,
|
||||
"starred_repos_count": 0,
|
||||
"username": "stupidcomputer"
|
||||
},
|
||||
"name": "sadkfjasdf",
|
||||
"full_name": "stupidcomputer/sadkfjasdf",
|
||||
"description": "",
|
||||
"empty": true,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"parent": null,
|
||||
"mirror": false,
|
||||
"size": 0,
|
||||
"language": "",
|
||||
"languages_url": "https://git.beepboop.systems/api/v1/repos/stupidcomputer/sadkfjasdf/languages",
|
||||
"html_url": "https://git.beepboop.systems/stupidcomputer/sadkfjasdf",
|
||||
"url": "https://git.beepboop.systems/api/v1/repos/stupidcomputer/sadkfjasdf",
|
||||
"link": "",
|
||||
"ssh_url": "gitea@git.beepboop.systems:stupidcomputer/sadkfjasdf.git",
|
||||
"clone_url": "https://git.beepboop.systems/stupidcomputer/sadkfjasdf.git",
|
||||
"original_url": "",
|
||||
"website": "",
|
||||
"stars_count": 0,
|
||||
"forks_count": 0,
|
||||
"watchers_count": 0,
|
||||
"open_issues_count": 0,
|
||||
"open_pr_counter": 0,
|
||||
"release_counter": 0,
|
||||
"default_branch": "main",
|
||||
"archived": false,
|
||||
"created_at": "2024-10-08T22:47:49-05:00",
|
||||
"updated_at": "2024-10-08T22:47:49-05:00",
|
||||
"archived_at": "1969-12-31T18:00:00-06:00",
|
||||
"permissions": {
|
||||
"admin": true,
|
||||
"push": true,
|
||||
"pull": true
|
||||
},
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"has_projects": true,
|
||||
"has_releases": true,
|
||||
"has_packages": true,
|
||||
"has_actions": false,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"allow_rebase_update": true,
|
||||
"default_delete_branch_after_merge": false,
|
||||
"default_merge_style": "merge",
|
||||
"default_allow_maintainer_edit": false,
|
||||
"avatar_url": "",
|
||||
"internal": false,
|
||||
"mirror_interval": "",
|
||||
"mirror_updated": "0001-01-01T00:00:00Z",
|
||||
"repo_transfer": null
|
||||
},
|
||||
"organization": {
|
||||
"id": 1,
|
||||
"login": "stupidcomputer",
|
||||
"login_name": "",
|
||||
"full_name": "stupidcomputer",
|
||||
"email": "stupidcomputer@noreply.git.beepboop.systems",
|
||||
"avatar_url": "https://secure.gravatar.com/avatar/b642b4217b34b1e8d3bd915fc65c4452?d=identicon",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "0001-01-01T00:00:00Z",
|
||||
"created": "2023-06-23T22:23:01-05:00",
|
||||
"restricted": false,
|
||||
"active": false,
|
||||
"prohibit_login": false,
|
||||
"location": "",
|
||||
"website": "https://beepboop.systems",
|
||||
"description": "High schooler interested in computers, security, and reproducible systems.\r\n",
|
||||
"visibility": "public",
|
||||
"followers_count": 0,
|
||||
"following_count": 0,
|
||||
"starred_repos_count": 0,
|
||||
"username": "stupidcomputer"
|
||||
},
|
||||
"sender": {
|
||||
"id": 1,
|
||||
"login": "stupidcomputer",
|
||||
"login_name": "",
|
||||
"full_name": "stupidcomputer",
|
||||
"email": "stupidcomputer@noreply.git.beepboop.systems",
|
||||
"avatar_url": "https://secure.gravatar.com/avatar/b642b4217b34b1e8d3bd915fc65c4452?d=identicon",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "0001-01-01T00:00:00Z",
|
||||
"created": "2023-06-23T22:23:01-05:00",
|
||||
"restricted": false,
|
||||
"active": false,
|
||||
"prohibit_login": false,
|
||||
"location": "",
|
||||
"website": "https://beepboop.systems",
|
||||
"description": "High schooler interested in computers, security, and reproducible systems.\r\n",
|
||||
"visibility": "public",
|
||||
"followers_count": 0,
|
||||
"following_count": 0,
|
||||
"starred_repos_count": 0,
|
||||
"username": "stupidcomputer"
|
||||
}
|
||||
}
|
189
tests/data/github-issue-closed.json
Normal file
189
tests/data/github-issue-closed.json
Normal file
@ -0,0 +1,189 @@
|
||||
{
|
||||
"action": "closed",
|
||||
"issue": {
|
||||
"url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/issues/1",
|
||||
"repository_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf",
|
||||
"labels_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/issues/1/labels{/name}",
|
||||
"comments_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/issues/1/comments",
|
||||
"events_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/issues/1/events",
|
||||
"html_url": "https://github.com/stupidcomputer/sadkfjasdf/issues/1",
|
||||
"id": 2574858486,
|
||||
"node_id": "I_kwDOM9nmTM6ZeTj2",
|
||||
"number": 1,
|
||||
"title": "this is a test",
|
||||
"user": {
|
||||
"login": "stupidcomputer",
|
||||
"id": 108326967,
|
||||
"node_id": "U_kgDOBnTwNw",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/108326967?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/stupidcomputer",
|
||||
"html_url": "https://github.com/stupidcomputer",
|
||||
"followers_url": "https://api.github.com/users/stupidcomputer/followers",
|
||||
"following_url": "https://api.github.com/users/stupidcomputer/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/stupidcomputer/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/stupidcomputer/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/stupidcomputer/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/stupidcomputer/orgs",
|
||||
"repos_url": "https://api.github.com/users/stupidcomputer/repos",
|
||||
"events_url": "https://api.github.com/users/stupidcomputer/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/stupidcomputer/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"labels": [
|
||||
|
||||
],
|
||||
"state": "closed",
|
||||
"locked": false,
|
||||
"assignee": null,
|
||||
"assignees": [
|
||||
|
||||
],
|
||||
"milestone": null,
|
||||
"comments": 1,
|
||||
"created_at": "2024-10-09T06:06:39Z",
|
||||
"updated_at": "2024-10-09T06:24:04Z",
|
||||
"closed_at": "2024-10-09T06:24:04Z",
|
||||
"author_association": "OWNER",
|
||||
"active_lock_reason": null,
|
||||
"body": null,
|
||||
"reactions": {
|
||||
"url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/issues/1/reactions",
|
||||
"total_count": 0,
|
||||
"+1": 0,
|
||||
"-1": 0,
|
||||
"laugh": 0,
|
||||
"hooray": 0,
|
||||
"confused": 0,
|
||||
"heart": 0,
|
||||
"rocket": 0,
|
||||
"eyes": 0
|
||||
},
|
||||
"timeline_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/issues/1/timeline",
|
||||
"performed_via_github_app": null,
|
||||
"state_reason": "completed"
|
||||
},
|
||||
"repository": {
|
||||
"id": 869918284,
|
||||
"node_id": "R_kgDOM9nmTA",
|
||||
"name": "sadkfjasdf",
|
||||
"full_name": "stupidcomputer/sadkfjasdf",
|
||||
"private": false,
|
||||
"owner": {
|
||||
"login": "stupidcomputer",
|
||||
"id": 108326967,
|
||||
"node_id": "U_kgDOBnTwNw",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/108326967?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/stupidcomputer",
|
||||
"html_url": "https://github.com/stupidcomputer",
|
||||
"followers_url": "https://api.github.com/users/stupidcomputer/followers",
|
||||
"following_url": "https://api.github.com/users/stupidcomputer/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/stupidcomputer/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/stupidcomputer/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/stupidcomputer/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/stupidcomputer/orgs",
|
||||
"repos_url": "https://api.github.com/users/stupidcomputer/repos",
|
||||
"events_url": "https://api.github.com/users/stupidcomputer/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/stupidcomputer/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"html_url": "https://github.com/stupidcomputer/sadkfjasdf",
|
||||
"description": null,
|
||||
"fork": false,
|
||||
"url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf",
|
||||
"forks_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/forks",
|
||||
"keys_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/keys{/key_id}",
|
||||
"collaborators_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/collaborators{/collaborator}",
|
||||
"teams_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/teams",
|
||||
"hooks_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/hooks",
|
||||
"issue_events_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/issues/events{/number}",
|
||||
"events_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/events",
|
||||
"assignees_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/assignees{/user}",
|
||||
"branches_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/branches{/branch}",
|
||||
"tags_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/tags",
|
||||
"blobs_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/git/blobs{/sha}",
|
||||
"git_tags_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/git/tags{/sha}",
|
||||
"git_refs_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/git/refs{/sha}",
|
||||
"trees_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/git/trees{/sha}",
|
||||
"statuses_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/statuses/{sha}",
|
||||
"languages_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/languages",
|
||||
"stargazers_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/stargazers",
|
||||
"contributors_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/contributors",
|
||||
"subscribers_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/subscribers",
|
||||
"subscription_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/subscription",
|
||||
"commits_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/commits{/sha}",
|
||||
"git_commits_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/git/commits{/sha}",
|
||||
"comments_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/comments{/number}",
|
||||
"issue_comment_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/issues/comments{/number}",
|
||||
"contents_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/contents/{+path}",
|
||||
"compare_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/compare/{base}...{head}",
|
||||
"merges_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/merges",
|
||||
"archive_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/{archive_format}{/ref}",
|
||||
"downloads_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/downloads",
|
||||
"issues_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/issues{/number}",
|
||||
"pulls_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/pulls{/number}",
|
||||
"milestones_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/milestones{/number}",
|
||||
"notifications_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/notifications{?since,all,participating}",
|
||||
"labels_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/labels{/name}",
|
||||
"releases_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/releases{/id}",
|
||||
"deployments_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/deployments",
|
||||
"created_at": "2024-10-09T06:05:09Z",
|
||||
"updated_at": "2024-10-09T06:05:09Z",
|
||||
"pushed_at": "2024-10-09T06:05:09Z",
|
||||
"git_url": "git://github.com/stupidcomputer/sadkfjasdf.git",
|
||||
"ssh_url": "git@github.com:stupidcomputer/sadkfjasdf.git",
|
||||
"clone_url": "https://github.com/stupidcomputer/sadkfjasdf.git",
|
||||
"svn_url": "https://github.com/stupidcomputer/sadkfjasdf",
|
||||
"homepage": "https://git.beepboop.systems/stupidcomputer/sadkfjasdf",
|
||||
"size": 0,
|
||||
"stargazers_count": 0,
|
||||
"watchers_count": 0,
|
||||
"language": null,
|
||||
"has_issues": true,
|
||||
"has_projects": true,
|
||||
"has_downloads": true,
|
||||
"has_wiki": true,
|
||||
"has_pages": false,
|
||||
"has_discussions": false,
|
||||
"forks_count": 0,
|
||||
"mirror_url": null,
|
||||
"archived": false,
|
||||
"disabled": false,
|
||||
"open_issues_count": 0,
|
||||
"license": null,
|
||||
"allow_forking": true,
|
||||
"is_template": false,
|
||||
"web_commit_signoff_required": false,
|
||||
"topics": [
|
||||
|
||||
],
|
||||
"visibility": "public",
|
||||
"forks": 0,
|
||||
"open_issues": 0,
|
||||
"watchers": 0,
|
||||
"default_branch": "main"
|
||||
},
|
||||
"sender": {
|
||||
"login": "stupidcomputer",
|
||||
"id": 108326967,
|
||||
"node_id": "U_kgDOBnTwNw",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/108326967?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/stupidcomputer",
|
||||
"html_url": "https://github.com/stupidcomputer",
|
||||
"followers_url": "https://api.github.com/users/stupidcomputer/followers",
|
||||
"following_url": "https://api.github.com/users/stupidcomputer/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/stupidcomputer/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/stupidcomputer/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/stupidcomputer/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/stupidcomputer/orgs",
|
||||
"repos_url": "https://api.github.com/users/stupidcomputer/repos",
|
||||
"events_url": "https://api.github.com/users/stupidcomputer/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/stupidcomputer/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
}
|
||||
}
|
233
tests/data/github-issue-comment-created.json
Normal file
233
tests/data/github-issue-comment-created.json
Normal file
@ -0,0 +1,233 @@
|
||||
{
|
||||
"action": "created",
|
||||
"issue": {
|
||||
"url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/issues/1",
|
||||
"repository_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf",
|
||||
"labels_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/issues/1/labels{/name}",
|
||||
"comments_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/issues/1/comments",
|
||||
"events_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/issues/1/events",
|
||||
"html_url": "https://github.com/stupidcomputer/sadkfjasdf/issues/1",
|
||||
"id": 2574858486,
|
||||
"node_id": "I_kwDOM9nmTM6ZeTj2",
|
||||
"number": 1,
|
||||
"title": "this is a test",
|
||||
"user": {
|
||||
"login": "stupidcomputer",
|
||||
"id": 108326967,
|
||||
"node_id": "U_kgDOBnTwNw",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/108326967?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/stupidcomputer",
|
||||
"html_url": "https://github.com/stupidcomputer",
|
||||
"followers_url": "https://api.github.com/users/stupidcomputer/followers",
|
||||
"following_url": "https://api.github.com/users/stupidcomputer/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/stupidcomputer/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/stupidcomputer/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/stupidcomputer/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/stupidcomputer/orgs",
|
||||
"repos_url": "https://api.github.com/users/stupidcomputer/repos",
|
||||
"events_url": "https://api.github.com/users/stupidcomputer/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/stupidcomputer/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"labels": [
|
||||
|
||||
],
|
||||
"state": "open",
|
||||
"locked": false,
|
||||
"assignee": null,
|
||||
"assignees": [
|
||||
|
||||
],
|
||||
"milestone": null,
|
||||
"comments": 1,
|
||||
"created_at": "2024-10-09T06:06:39Z",
|
||||
"updated_at": "2024-10-09T06:22:06Z",
|
||||
"closed_at": null,
|
||||
"author_association": "OWNER",
|
||||
"active_lock_reason": null,
|
||||
"body": null,
|
||||
"reactions": {
|
||||
"url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/issues/1/reactions",
|
||||
"total_count": 0,
|
||||
"+1": 0,
|
||||
"-1": 0,
|
||||
"laugh": 0,
|
||||
"hooray": 0,
|
||||
"confused": 0,
|
||||
"heart": 0,
|
||||
"rocket": 0,
|
||||
"eyes": 0
|
||||
},
|
||||
"timeline_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/issues/1/timeline",
|
||||
"performed_via_github_app": null,
|
||||
"state_reason": null
|
||||
},
|
||||
"comment": {
|
||||
"url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/issues/comments/2401413724",
|
||||
"html_url": "https://github.com/stupidcomputer/sadkfjasdf/issues/1#issuecomment-2401413724",
|
||||
"issue_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/issues/1",
|
||||
"id": 2401413724,
|
||||
"node_id": "IC_kwDOM9nmTM6PIqpc",
|
||||
"user": {
|
||||
"login": "stupidcomputer",
|
||||
"id": 108326967,
|
||||
"node_id": "U_kgDOBnTwNw",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/108326967?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/stupidcomputer",
|
||||
"html_url": "https://github.com/stupidcomputer",
|
||||
"followers_url": "https://api.github.com/users/stupidcomputer/followers",
|
||||
"following_url": "https://api.github.com/users/stupidcomputer/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/stupidcomputer/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/stupidcomputer/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/stupidcomputer/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/stupidcomputer/orgs",
|
||||
"repos_url": "https://api.github.com/users/stupidcomputer/repos",
|
||||
"events_url": "https://api.github.com/users/stupidcomputer/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/stupidcomputer/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"created_at": "2024-10-09T06:22:06Z",
|
||||
"updated_at": "2024-10-09T06:22:06Z",
|
||||
"author_association": "OWNER",
|
||||
"body": "here is a helpful, insightful comment",
|
||||
"reactions": {
|
||||
"url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/issues/comments/2401413724/reactions",
|
||||
"total_count": 0,
|
||||
"+1": 0,
|
||||
"-1": 0,
|
||||
"laugh": 0,
|
||||
"hooray": 0,
|
||||
"confused": 0,
|
||||
"heart": 0,
|
||||
"rocket": 0,
|
||||
"eyes": 0
|
||||
},
|
||||
"performed_via_github_app": null
|
||||
},
|
||||
"repository": {
|
||||
"id": 869918284,
|
||||
"node_id": "R_kgDOM9nmTA",
|
||||
"name": "sadkfjasdf",
|
||||
"full_name": "stupidcomputer/sadkfjasdf",
|
||||
"private": false,
|
||||
"owner": {
|
||||
"login": "stupidcomputer",
|
||||
"id": 108326967,
|
||||
"node_id": "U_kgDOBnTwNw",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/108326967?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/stupidcomputer",
|
||||
"html_url": "https://github.com/stupidcomputer",
|
||||
"followers_url": "https://api.github.com/users/stupidcomputer/followers",
|
||||
"following_url": "https://api.github.com/users/stupidcomputer/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/stupidcomputer/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/stupidcomputer/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/stupidcomputer/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/stupidcomputer/orgs",
|
||||
"repos_url": "https://api.github.com/users/stupidcomputer/repos",
|
||||
"events_url": "https://api.github.com/users/stupidcomputer/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/stupidcomputer/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"html_url": "https://github.com/stupidcomputer/sadkfjasdf",
|
||||
"description": null,
|
||||
"fork": false,
|
||||
"url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf",
|
||||
"forks_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/forks",
|
||||
"keys_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/keys{/key_id}",
|
||||
"collaborators_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/collaborators{/collaborator}",
|
||||
"teams_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/teams",
|
||||
"hooks_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/hooks",
|
||||
"issue_events_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/issues/events{/number}",
|
||||
"events_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/events",
|
||||
"assignees_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/assignees{/user}",
|
||||
"branches_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/branches{/branch}",
|
||||
"tags_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/tags",
|
||||
"blobs_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/git/blobs{/sha}",
|
||||
"git_tags_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/git/tags{/sha}",
|
||||
"git_refs_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/git/refs{/sha}",
|
||||
"trees_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/git/trees{/sha}",
|
||||
"statuses_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/statuses/{sha}",
|
||||
"languages_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/languages",
|
||||
"stargazers_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/stargazers",
|
||||
"contributors_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/contributors",
|
||||
"subscribers_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/subscribers",
|
||||
"subscription_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/subscription",
|
||||
"commits_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/commits{/sha}",
|
||||
"git_commits_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/git/commits{/sha}",
|
||||
"comments_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/comments{/number}",
|
||||
"issue_comment_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/issues/comments{/number}",
|
||||
"contents_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/contents/{+path}",
|
||||
"compare_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/compare/{base}...{head}",
|
||||
"merges_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/merges",
|
||||
"archive_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/{archive_format}{/ref}",
|
||||
"downloads_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/downloads",
|
||||
"issues_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/issues{/number}",
|
||||
"pulls_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/pulls{/number}",
|
||||
"milestones_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/milestones{/number}",
|
||||
"notifications_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/notifications{?since,all,participating}",
|
||||
"labels_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/labels{/name}",
|
||||
"releases_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/releases{/id}",
|
||||
"deployments_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/deployments",
|
||||
"created_at": "2024-10-09T06:05:09Z",
|
||||
"updated_at": "2024-10-09T06:05:09Z",
|
||||
"pushed_at": "2024-10-09T06:05:09Z",
|
||||
"git_url": "git://github.com/stupidcomputer/sadkfjasdf.git",
|
||||
"ssh_url": "git@github.com:stupidcomputer/sadkfjasdf.git",
|
||||
"clone_url": "https://github.com/stupidcomputer/sadkfjasdf.git",
|
||||
"svn_url": "https://github.com/stupidcomputer/sadkfjasdf",
|
||||
"homepage": "https://git.beepboop.systems/stupidcomputer/sadkfjasdf",
|
||||
"size": 0,
|
||||
"stargazers_count": 0,
|
||||
"watchers_count": 0,
|
||||
"language": null,
|
||||
"has_issues": true,
|
||||
"has_projects": true,
|
||||
"has_downloads": true,
|
||||
"has_wiki": true,
|
||||
"has_pages": false,
|
||||
"has_discussions": false,
|
||||
"forks_count": 0,
|
||||
"mirror_url": null,
|
||||
"archived": false,
|
||||
"disabled": false,
|
||||
"open_issues_count": 1,
|
||||
"license": null,
|
||||
"allow_forking": true,
|
||||
"is_template": false,
|
||||
"web_commit_signoff_required": false,
|
||||
"topics": [
|
||||
|
||||
],
|
||||
"visibility": "public",
|
||||
"forks": 0,
|
||||
"open_issues": 1,
|
||||
"watchers": 0,
|
||||
"default_branch": "main"
|
||||
},
|
||||
"sender": {
|
||||
"login": "stupidcomputer",
|
||||
"id": 108326967,
|
||||
"node_id": "U_kgDOBnTwNw",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/108326967?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/stupidcomputer",
|
||||
"html_url": "https://github.com/stupidcomputer",
|
||||
"followers_url": "https://api.github.com/users/stupidcomputer/followers",
|
||||
"following_url": "https://api.github.com/users/stupidcomputer/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/stupidcomputer/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/stupidcomputer/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/stupidcomputer/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/stupidcomputer/orgs",
|
||||
"repos_url": "https://api.github.com/users/stupidcomputer/repos",
|
||||
"events_url": "https://api.github.com/users/stupidcomputer/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/stupidcomputer/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
}
|
||||
}
|
189
tests/data/github-issue-created.json
Normal file
189
tests/data/github-issue-created.json
Normal file
@ -0,0 +1,189 @@
|
||||
{
|
||||
"action": "opened",
|
||||
"issue": {
|
||||
"url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/issues/1",
|
||||
"repository_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf",
|
||||
"labels_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/issues/1/labels{/name}",
|
||||
"comments_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/issues/1/comments",
|
||||
"events_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/issues/1/events",
|
||||
"html_url": "https://github.com/stupidcomputer/sadkfjasdf/issues/1",
|
||||
"id": 2574858486,
|
||||
"node_id": "I_kwDOM9nmTM6ZeTj2",
|
||||
"number": 1,
|
||||
"title": "this is a test",
|
||||
"user": {
|
||||
"login": "stupidcomputer",
|
||||
"id": 108326967,
|
||||
"node_id": "U_kgDOBnTwNw",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/108326967?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/stupidcomputer",
|
||||
"html_url": "https://github.com/stupidcomputer",
|
||||
"followers_url": "https://api.github.com/users/stupidcomputer/followers",
|
||||
"following_url": "https://api.github.com/users/stupidcomputer/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/stupidcomputer/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/stupidcomputer/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/stupidcomputer/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/stupidcomputer/orgs",
|
||||
"repos_url": "https://api.github.com/users/stupidcomputer/repos",
|
||||
"events_url": "https://api.github.com/users/stupidcomputer/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/stupidcomputer/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"labels": [
|
||||
|
||||
],
|
||||
"state": "open",
|
||||
"locked": false,
|
||||
"assignee": null,
|
||||
"assignees": [
|
||||
|
||||
],
|
||||
"milestone": null,
|
||||
"comments": 0,
|
||||
"created_at": "2024-10-09T06:06:39Z",
|
||||
"updated_at": "2024-10-09T06:06:39Z",
|
||||
"closed_at": null,
|
||||
"author_association": "OWNER",
|
||||
"active_lock_reason": null,
|
||||
"body": null,
|
||||
"reactions": {
|
||||
"url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/issues/1/reactions",
|
||||
"total_count": 0,
|
||||
"+1": 0,
|
||||
"-1": 0,
|
||||
"laugh": 0,
|
||||
"hooray": 0,
|
||||
"confused": 0,
|
||||
"heart": 0,
|
||||
"rocket": 0,
|
||||
"eyes": 0
|
||||
},
|
||||
"timeline_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/issues/1/timeline",
|
||||
"performed_via_github_app": null,
|
||||
"state_reason": null
|
||||
},
|
||||
"repository": {
|
||||
"id": 869918284,
|
||||
"node_id": "R_kgDOM9nmTA",
|
||||
"name": "sadkfjasdf",
|
||||
"full_name": "stupidcomputer/sadkfjasdf",
|
||||
"private": false,
|
||||
"owner": {
|
||||
"login": "stupidcomputer",
|
||||
"id": 108326967,
|
||||
"node_id": "U_kgDOBnTwNw",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/108326967?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/stupidcomputer",
|
||||
"html_url": "https://github.com/stupidcomputer",
|
||||
"followers_url": "https://api.github.com/users/stupidcomputer/followers",
|
||||
"following_url": "https://api.github.com/users/stupidcomputer/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/stupidcomputer/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/stupidcomputer/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/stupidcomputer/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/stupidcomputer/orgs",
|
||||
"repos_url": "https://api.github.com/users/stupidcomputer/repos",
|
||||
"events_url": "https://api.github.com/users/stupidcomputer/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/stupidcomputer/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"html_url": "https://github.com/stupidcomputer/sadkfjasdf",
|
||||
"description": null,
|
||||
"fork": false,
|
||||
"url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf",
|
||||
"forks_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/forks",
|
||||
"keys_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/keys{/key_id}",
|
||||
"collaborators_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/collaborators{/collaborator}",
|
||||
"teams_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/teams",
|
||||
"hooks_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/hooks",
|
||||
"issue_events_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/issues/events{/number}",
|
||||
"events_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/events",
|
||||
"assignees_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/assignees{/user}",
|
||||
"branches_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/branches{/branch}",
|
||||
"tags_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/tags",
|
||||
"blobs_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/git/blobs{/sha}",
|
||||
"git_tags_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/git/tags{/sha}",
|
||||
"git_refs_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/git/refs{/sha}",
|
||||
"trees_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/git/trees{/sha}",
|
||||
"statuses_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/statuses/{sha}",
|
||||
"languages_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/languages",
|
||||
"stargazers_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/stargazers",
|
||||
"contributors_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/contributors",
|
||||
"subscribers_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/subscribers",
|
||||
"subscription_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/subscription",
|
||||
"commits_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/commits{/sha}",
|
||||
"git_commits_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/git/commits{/sha}",
|
||||
"comments_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/comments{/number}",
|
||||
"issue_comment_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/issues/comments{/number}",
|
||||
"contents_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/contents/{+path}",
|
||||
"compare_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/compare/{base}...{head}",
|
||||
"merges_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/merges",
|
||||
"archive_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/{archive_format}{/ref}",
|
||||
"downloads_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/downloads",
|
||||
"issues_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/issues{/number}",
|
||||
"pulls_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/pulls{/number}",
|
||||
"milestones_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/milestones{/number}",
|
||||
"notifications_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/notifications{?since,all,participating}",
|
||||
"labels_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/labels{/name}",
|
||||
"releases_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/releases{/id}",
|
||||
"deployments_url": "https://api.github.com/repos/stupidcomputer/sadkfjasdf/deployments",
|
||||
"created_at": "2024-10-09T06:05:09Z",
|
||||
"updated_at": "2024-10-09T06:05:09Z",
|
||||
"pushed_at": "2024-10-09T06:05:09Z",
|
||||
"git_url": "git://github.com/stupidcomputer/sadkfjasdf.git",
|
||||
"ssh_url": "git@github.com:stupidcomputer/sadkfjasdf.git",
|
||||
"clone_url": "https://github.com/stupidcomputer/sadkfjasdf.git",
|
||||
"svn_url": "https://github.com/stupidcomputer/sadkfjasdf",
|
||||
"homepage": "https://git.beepboop.systems/stupidcomputer/sadkfjasdf",
|
||||
"size": 0,
|
||||
"stargazers_count": 0,
|
||||
"watchers_count": 0,
|
||||
"language": null,
|
||||
"has_issues": true,
|
||||
"has_projects": true,
|
||||
"has_downloads": true,
|
||||
"has_wiki": true,
|
||||
"has_pages": false,
|
||||
"has_discussions": false,
|
||||
"forks_count": 0,
|
||||
"mirror_url": null,
|
||||
"archived": false,
|
||||
"disabled": false,
|
||||
"open_issues_count": 1,
|
||||
"license": null,
|
||||
"allow_forking": true,
|
||||
"is_template": false,
|
||||
"web_commit_signoff_required": false,
|
||||
"topics": [
|
||||
|
||||
],
|
||||
"visibility": "public",
|
||||
"forks": 0,
|
||||
"open_issues": 1,
|
||||
"watchers": 0,
|
||||
"default_branch": "main"
|
||||
},
|
||||
"sender": {
|
||||
"login": "stupidcomputer",
|
||||
"id": 108326967,
|
||||
"node_id": "U_kgDOBnTwNw",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/108326967?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/stupidcomputer",
|
||||
"html_url": "https://github.com/stupidcomputer",
|
||||
"followers_url": "https://api.github.com/users/stupidcomputer/followers",
|
||||
"following_url": "https://api.github.com/users/stupidcomputer/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/stupidcomputer/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/stupidcomputer/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/stupidcomputer/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/stupidcomputer/orgs",
|
||||
"repos_url": "https://api.github.com/users/stupidcomputer/repos",
|
||||
"events_url": "https://api.github.com/users/stupidcomputer/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/stupidcomputer/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
}
|
||||
}
|
8
tests/gitea-issue-closed.py
Normal file
8
tests/gitea-issue-closed.py
Normal file
@ -0,0 +1,8 @@
|
||||
import requests
|
||||
import json
|
||||
|
||||
with open("data/gitea-issue-closed.json", "r") as file:
|
||||
data = json.loads(file.read())
|
||||
|
||||
r = requests.post("http://127.0.0.1:5000/bridge/endpoints/gitea/issue", json=data)
|
||||
print(r.text)
|
8
tests/gitea-issue-comment-created.py
Normal file
8
tests/gitea-issue-comment-created.py
Normal file
@ -0,0 +1,8 @@
|
||||
import requests
|
||||
import json
|
||||
|
||||
with open("data/gitea-issue-comment-created.json", "r") as file:
|
||||
data = json.loads(file.read())
|
||||
|
||||
r = requests.post("http://127.0.0.1:5000/bridge/endpoints/gitea/issue", json=data)
|
||||
print(r.text)
|
8
tests/gitea-issue-created.py
Normal file
8
tests/gitea-issue-created.py
Normal file
@ -0,0 +1,8 @@
|
||||
import requests
|
||||
import json
|
||||
|
||||
with open("data/gitea-issue-created.json", "r") as file:
|
||||
data = json.loads(file.read())
|
||||
|
||||
r = requests.post("http://127.0.0.1:5000/bridge/endpoints/gitea/issue", json=data)
|
||||
print(r.text)
|
8
tests/gitea-repo-created.py
Normal file
8
tests/gitea-repo-created.py
Normal file
@ -0,0 +1,8 @@
|
||||
import requests
|
||||
import json
|
||||
|
||||
with open("data/gitea-repo-created.json", "r") as file:
|
||||
data = json.loads(file.read())
|
||||
|
||||
r = requests.post("http://127.0.0.1:5000/bridge/endpoints/gitea/repo", json=data)
|
||||
print(r.text)
|
8
tests/github-issue-closed.py
Normal file
8
tests/github-issue-closed.py
Normal file
@ -0,0 +1,8 @@
|
||||
import requests
|
||||
import json
|
||||
|
||||
with open("data/github-issue-closed.json", "r") as file:
|
||||
data = json.loads(file.read())
|
||||
|
||||
r = requests.post("http://127.0.0.1:5000/bridge/endpoints/github/issue", json=data)
|
||||
print(r.text)
|
8
tests/github-issue-comment-created.py
Normal file
8
tests/github-issue-comment-created.py
Normal file
@ -0,0 +1,8 @@
|
||||
import requests
|
||||
import json
|
||||
|
||||
with open("data/github-issue-comment-created.json", "r") as file:
|
||||
data = json.loads(file.read())
|
||||
|
||||
r = requests.post("http://127.0.0.1:5000/bridge/endpoints/github/issue", json=data)
|
||||
print(r.text)
|
8
tests/github-issue-created.py
Normal file
8
tests/github-issue-created.py
Normal file
@ -0,0 +1,8 @@
|
||||
import requests
|
||||
import json
|
||||
|
||||
with open("data/github-issue-created.json", "r") as file:
|
||||
data = json.loads(file.read())
|
||||
|
||||
r = requests.post("http://127.0.0.1:5000/bridge/endpoints/github/issue", json=data)
|
||||
print(r.text)
|
Loading…
Reference in New Issue
Block a user