Compare commits
6 Commits
d46329527b
...
e9f1d2b00d
Author | SHA1 | Date | |
---|---|---|---|
e9f1d2b00d | |||
4804488943 | |||
6e8a193f8f | |||
486d0565d4 | |||
16cc41a5bc | |||
7bbc6ae562 |
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"
|
||||
}
|
303
bridge/__init__.py
Normal file
303
bridge/__init__.py
Normal file
@ -0,0 +1,303 @@
|
||||
from flask import Flask
|
||||
from flask import request
|
||||
from flask import redirect
|
||||
from flask import abort
|
||||
|
||||
import requests
|
||||
|
||||
from .webgit import Gitea, Github
|
||||
from .utils import issue_sentinel, generate_sentinel
|
||||
|
||||
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():
|
||||
"""
|
||||
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
|
||||
"""
|
||||
|
||||
gitea = Gitea(app.config["GITEA_ACCESS_TOKEN"])
|
||||
github = Github(app.config["GITHUB_ACCESS_TOKEN"])
|
||||
|
||||
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
|
||||
|
||||
if not repo_action == "created":
|
||||
return ''
|
||||
|
||||
github_created_repo_result = github.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,
|
||||
),
|
||||
},
|
||||
)
|
||||
|
||||
new_github_repo_url = github_created_repo_result.json()["html_url"]
|
||||
|
||||
gitea_add_github_repo_url_result = gitea.patch(
|
||||
"https://{}/api/v1/repos/{}/{}".format(
|
||||
app.config["GITEA_INSTANCE_DOMAIN"],
|
||||
repo_owner,
|
||||
repo_name,
|
||||
),
|
||||
json={
|
||||
"website": new_github_repo_url,
|
||||
},
|
||||
)
|
||||
|
||||
gitea_push_target_result = gitea.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,
|
||||
},
|
||||
)
|
||||
|
||||
gitea_force_target_push = gitea.post(
|
||||
"https://{}/api/v1/repos/{}/{}/push_mirrors-sync".format(
|
||||
app.config["GITEA_INSTANCE_DOMAIN"],
|
||||
repo_owner,
|
||||
repo_name
|
||||
),
|
||||
)
|
||||
|
||||
github_create_webhook_result = github.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",
|
||||
],
|
||||
},
|
||||
)
|
||||
|
||||
gitea_create_webhook_result = gitea.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",
|
||||
],
|
||||
},
|
||||
)
|
||||
|
||||
return ''
|
||||
|
||||
@app.route("/bridge/endpoints/gitea/issue", methods=["POST"])
|
||||
def gitea_handle_issue_action():
|
||||
"""
|
||||
firstly, check if the sentinal is in the issue body
|
||||
- if it is, then stop processing the event
|
||||
(we don't want infinite loops)
|
||||
if we've opened an issue:
|
||||
- create a new one on the Github side
|
||||
- make it relate to the Gitea one
|
||||
- make the Gitea one related to the Github one
|
||||
|
||||
if we've commented:
|
||||
- add a comment to the cooresponding Github issue
|
||||
|
||||
if we've closed:
|
||||
- add a cooresponding comment and close the Github issue
|
||||
"""
|
||||
|
||||
gitea = Gitea(app.config["GITEA_ACCESS_TOKEN"])
|
||||
github = Github(app.config["GITHUB_ACCESS_TOKEN"])
|
||||
|
||||
data = request.json
|
||||
|
||||
try:
|
||||
event_type = data["action"]
|
||||
|
||||
repo_owner = data["repository"]["owner"]["login"]
|
||||
repo_name = data["repository"]["name"]
|
||||
issue_user = data["issue"]["user"]["login"]
|
||||
issue_user_url = "https://{}/{}".format(
|
||||
app.config["GITEA_INSTANCE_DOMAIN"],
|
||||
issue_user,
|
||||
)
|
||||
issue_number = data["issue"]["number"]
|
||||
|
||||
if event_type == "opened": # new issue created
|
||||
event_title = data["issue"]["title"]
|
||||
event_body = data["issue"]["body"]
|
||||
elif event_type == "created": # new comment on that issue
|
||||
event_title = None
|
||||
event_body = data["comment"]["body"]
|
||||
elif event_type == "closed": # issue closed
|
||||
event_title = None
|
||||
event_body = data["issue"]["body"]
|
||||
|
||||
event_url = data["issue"]["url"]
|
||||
|
||||
except KeyError as e:
|
||||
print(e, type(e))
|
||||
abort(400) # the data isn't formatted correctly
|
||||
|
||||
if issue_sentinel in event_body:
|
||||
return ''
|
||||
|
||||
if event_type == "opened":
|
||||
issue_header = "*This issue has automatically been created by [`gitea-github-sync`](https://{}/bridge/about) on behalf of [{}]({}).*".format(
|
||||
app.config["GITEA_INSTANCE_DOMAIN"],
|
||||
issue_user,
|
||||
issue_user_url,
|
||||
)
|
||||
|
||||
issue_footer = """
|
||||
<details>
|
||||
<summary>Internal issue metadata</summary>
|
||||
|
||||
{}
|
||||
</details>
|
||||
""".format(generate_sentinel(event_url))
|
||||
|
||||
issue_body = "\n\n".join([
|
||||
issue_header,
|
||||
event_body,
|
||||
issue_footer
|
||||
])
|
||||
|
||||
github_create_issue_result = github.post(
|
||||
"https://api.github.com/repos/{}/{}/issues".format(
|
||||
repo_owner,
|
||||
repo_name,
|
||||
),
|
||||
json={
|
||||
"title": event_title,
|
||||
"body": issue_body,
|
||||
},
|
||||
)
|
||||
|
||||
returned_data = github_create_issue_result.json()
|
||||
issue_comment_body = """
|
||||
*This issue is being mirrored on Github [here]({}).*
|
||||
|
||||
<details>
|
||||
<summary>Internal issue metadata</summary>
|
||||
|
||||
{}
|
||||
</details>
|
||||
""".format(
|
||||
returned_data["html_url"],
|
||||
generate_sentinel(returned_data["url"])
|
||||
)
|
||||
|
||||
gitea_issue_comment_result = gitea.post(
|
||||
"https://{}/api/v1/repos/{}/{}/issues/{}/comments".format(
|
||||
app.config["GITEA_INSTANCE_DOMAIN"],
|
||||
repo_owner,
|
||||
repo_name,
|
||||
issue_number,
|
||||
),
|
||||
json={
|
||||
"body": issue_comment_body,
|
||||
},
|
||||
)
|
||||
|
||||
elif event_type == "created":
|
||||
comment_user = data["comment"]["user"]["login"]
|
||||
comment_user_url = "https://{}/{}".format(
|
||||
app.config["GITEA_INSTANCE_DOMAIN"],
|
||||
comment_user,
|
||||
)
|
||||
comment_header = "*This comment has automatically been created by [`gitea-github-sync`](https://{}/bridge/about) on behalf of [{}]({}).*".format(
|
||||
app.config["GITEA_INSTANCE_DOMAIN"],
|
||||
comment_user,
|
||||
comment_user_url,
|
||||
)
|
||||
|
||||
comment_footer = """
|
||||
<details>
|
||||
<summary>Internal issue metadata</summary>
|
||||
|
||||
{}
|
||||
</details>
|
||||
""".format(generate_sentinel(event_url))
|
||||
|
||||
comment_body = "\n\n".join([
|
||||
comment_header,
|
||||
event_body,
|
||||
comment_footer,
|
||||
])
|
||||
|
||||
github_comment_post_result = github.post(
|
||||
"https://api.github.com/repos/{}/{}/issues/{}/comment".format(
|
||||
repo_owner,
|
||||
repo_name,
|
||||
issue_number,
|
||||
),
|
||||
json={
|
||||
"body": comment_body,
|
||||
},
|
||||
)
|
||||
|
||||
elif event_type == "closed":
|
||||
github_close_issue_result = github.patch(
|
||||
"https://api.github.com/repos/{}/{}/issues/{}".format(
|
||||
repo_owner,
|
||||
repo_name,
|
||||
issue_number,
|
||||
),
|
||||
json={
|
||||
"state": "closed",
|
||||
},
|
||||
)
|
||||
|
||||
return ''
|
16
bridge/utils.py
Normal file
16
bridge/utils.py
Normal file
@ -0,0 +1,16 @@
|
||||
import base64
|
||||
|
||||
def to_base64(s: str) -> str:
|
||||
return base64.b64encode(
|
||||
s.encode("utf-8")
|
||||
).decode("utf-8")
|
||||
|
||||
def from_base64(s: str) -> str:
|
||||
return base64.b64decode(
|
||||
s.encode("utf-8")
|
||||
).decode("utf-8")
|
||||
|
||||
issue_sentinel = "GITEA_GITHUB_ISSUE_SYNC_SENTINEL"
|
||||
|
||||
def generate_sentinel(url: str) -> str:
|
||||
return ' '.join([sentinel, to_base64(url)])
|
65
bridge/webgit.py
Normal file
65
bridge/webgit.py
Normal file
@ -0,0 +1,65 @@
|
||||
from typing import Any
|
||||
from dataclasses import dataclass, field
|
||||
|
||||
import requests
|
||||
from requests import Request, Session
|
||||
from requests.exceptions import HTTPError
|
||||
|
||||
from flask import abort
|
||||
|
||||
@dataclass
|
||||
class WebgitClient:
|
||||
"""
|
||||
A quite thin wrapper around various code forges' REST APIs.
|
||||
Designed to be subclassed.
|
||||
"""
|
||||
api_token: str
|
||||
headers: Any = field(init=False)
|
||||
|
||||
def _post_request(self, request_obj):
|
||||
try:
|
||||
request_obj.raise_for_status()
|
||||
except HTTPError as e:
|
||||
print("An exception occured: {}({})".format(
|
||||
type(e).__name__, e
|
||||
))
|
||||
abort(500)
|
||||
|
||||
def _request_wrapper(self, method, *args, **kwargs):
|
||||
s = Session()
|
||||
r = Request(method, *args, **kwargs, headers=self.headers)
|
||||
prepped = s.prepare_request(r)
|
||||
settings = s.merge_environment_settings(prepped.url, {}, None, None, None)
|
||||
r = s.send(prepped, **settings)
|
||||
|
||||
self._post_request(r)
|
||||
return r
|
||||
|
||||
|
||||
def post(self, *args, **kwargs):
|
||||
return self._request_wrapper("POST", *args, **kwargs)
|
||||
|
||||
def patch(self, *args, **kwargs):
|
||||
return self._request_wrapper("PATCH", *args, **kwargs)
|
||||
|
||||
@dataclass
|
||||
class Github(WebgitClient):
|
||||
"""
|
||||
A quite thin wrapper around Github's REST API.
|
||||
"""
|
||||
def __post_init__(self):
|
||||
self.headers = {
|
||||
"Accept": "application/vnd.github+json",
|
||||
"Authorization": "token " + self.api_token,
|
||||
"X-GitHub-Api-Version": "2022-11-28",
|
||||
}
|
||||
|
||||
@dataclass
|
||||
class Gitea(WebgitClient):
|
||||
"""
|
||||
A quite thin wrapper around Gitea's REST API.
|
||||
"""
|
||||
def __post_init__(self):
|
||||
self.headers = {
|
||||
"Authorization": "token " + self.api_token,
|
||||
}
|
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.gitea-github-bridge;
|
||||
appEnv = pkgs.python3.withPackages (p: with p; [ waitress (callPackage ./bridge/default.nix {}) ]);
|
||||
in {
|
||||
options.services.gitea-github-bridge = {
|
||||
enable = lib.mkEnableOption "Enable the Gitea-Github bridge";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
systemd.services.gitea-github-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