diff --git a/README.md b/README.md
index ed000971a7555..f0d05170950c8 100644
--- a/README.md
+++ b/README.md
@@ -211,3 +211,12 @@ for the full license text.

+
+
+### How does `gitea` work?
+
+Check out this interactive walkthrough of the `gitea` codebase on CodeCanvas [here](https://www.code-canvas.com/?session=unauthenticatedGithub&repo=gitea&owner=go-gitea&branch=main&OnboardingTutorial=true).
+
+To update the diagram, follow the quick tutorial [here](https://docs.code-canvas.com/updating-diagram).
+
+
\ No newline at end of file
diff --git a/gitea.CodeCanvas b/gitea.CodeCanvas
new file mode 100644
index 0000000000000..eda87c126673a
--- /dev/null
+++ b/gitea.CodeCanvas
@@ -0,0 +1,7736 @@
+{
+ "drawioXML": "\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n",
+ "fileName": "",
+ "fileURL": "github",
+ "repoData": {
+ "models": {
+ "path": "models",
+ "fileName": "models",
+ "cellName": "models",
+ "cellId": "9c37213c-3c3a-45d9-acff-87fc3ab9c825",
+ "visible": true,
+ "children": [
+ "models/issues",
+ "models/actions",
+ "models/organization",
+ "models/perm",
+ "models/webhook"
+ ]
+ },
+ "models/actions": {
+ "path": "models/actions",
+ "fileName": "actions",
+ "cellName": "actions",
+ "cellId": "2877baa9-2dbd-44c3-98e0-684becf46b08",
+ "visible": true,
+ "parentCellId": "9c37213c-3c3a-45d9-acff-87fc3ab9c825",
+ "children": [
+ "models/actions/run.go"
+ ]
+ },
+ "models/actions/run.go": {
+ "path": "models/actions/run.go",
+ "fileName": "run.go",
+ "cellName": "run.go",
+ "cellId": "0a3a4f48-3de3-4279-a764-3905209adebb",
+ "visible": true,
+ "parentCellId": "2877baa9-2dbd-44c3-98e0-684becf46b08",
+ "children": [
+ "models/actions/run.go-simstep-c96bb1be-02e4-4023-bc30-19d4ba081da8"
+ ]
+ },
+ "models/issues": {
+ "path": "models/issues",
+ "fileName": "issues",
+ "cellName": "issues",
+ "cellId": "92701556-5fde-4ec1-b80b-12ec36212aad",
+ "visible": true,
+ "parentCellId": "9c37213c-3c3a-45d9-acff-87fc3ab9c825",
+ "children": [
+ "models/issues/pull.go",
+ "models/issues/issue.go"
+ ]
+ },
+ "models/issues/issue.go": {
+ "path": "models/issues/issue.go",
+ "fileName": "issue.go",
+ "cellName": "issue.go",
+ "cellId": "aa6e7784-13b0-4fc8-a253-363ad293bcb0",
+ "visible": true,
+ "parentCellId": "92701556-5fde-4ec1-b80b-12ec36212aad",
+ "children": [
+ "models/issues/issue.go-simstep-77c253a8-80a6-4e84-965f-c37320babc81"
+ ]
+ },
+ "models/issues/pull.go": {
+ "path": "models/issues/pull.go",
+ "fileName": "pull.go",
+ "cellName": "pull.go",
+ "cellId": "ae4355d1-5b08-4720-b048-73c948697625",
+ "visible": true,
+ "parentCellId": "92701556-5fde-4ec1-b80b-12ec36212aad",
+ "children": [
+ "models/issues/pull.go-simstep-5092d84c-c9ea-4367-8615-a4824895029c"
+ ]
+ },
+ "models/organization": {
+ "path": "models/organization",
+ "fileName": "organization",
+ "cellName": "organization",
+ "cellId": "a63a77af-acb7-48f5-9179-64bc26b1d1a6",
+ "visible": true,
+ "parentCellId": "9c37213c-3c3a-45d9-acff-87fc3ab9c825",
+ "children": [
+ "models/organization/org.go"
+ ]
+ },
+ "models/organization/org.go": {
+ "path": "models/organization/org.go",
+ "fileName": "org.go",
+ "cellName": "org.go",
+ "cellId": "9fe58423-820e-4df6-80f1-17d2c56c3577",
+ "visible": true,
+ "parentCellId": "a63a77af-acb7-48f5-9179-64bc26b1d1a6",
+ "children": [
+ "models/organization/org.go-simstep-c87a4f37-7192-4dd9-a921-65701d2514da"
+ ]
+ },
+ "models/perm": {
+ "path": "models/perm",
+ "fileName": "perm",
+ "cellName": "perm",
+ "cellId": "cfcc20ae-59cf-47b3-a7a3-96ba0ad1abd6",
+ "visible": true,
+ "parentCellId": "9c37213c-3c3a-45d9-acff-87fc3ab9c825",
+ "children": [
+ "models/perm/access"
+ ]
+ },
+ "models/perm/access": {
+ "path": "models/perm/access",
+ "fileName": "access",
+ "cellName": "access",
+ "cellId": "76a94391-d82b-481f-b6c0-261acdb9ac38",
+ "visible": true,
+ "parentCellId": "cfcc20ae-59cf-47b3-a7a3-96ba0ad1abd6",
+ "children": [
+ "models/perm/access/access.go"
+ ]
+ },
+ "models/perm/access/access.go": {
+ "path": "models/perm/access/access.go",
+ "fileName": "access.go",
+ "cellName": "access.go",
+ "cellId": "0bd8f3b7-c2b4-456f-9d12-4f70d1f09126",
+ "visible": true,
+ "parentCellId": "76a94391-d82b-481f-b6c0-261acdb9ac38",
+ "children": [
+ "models/perm/access/access.go-simstep-bf4d9374-88f2-4882-8c74-b393fe42964f"
+ ]
+ },
+ "models/webhook": {
+ "path": "models/webhook",
+ "fileName": "webhook",
+ "cellName": "webhook",
+ "cellId": "d3647ed6-309d-4bbb-83e1-8ac8c769d74a",
+ "visible": true,
+ "parentCellId": "9c37213c-3c3a-45d9-acff-87fc3ab9c825",
+ "children": [
+ "models/webhook/webhook.go"
+ ]
+ },
+ "models/webhook/webhook.go": {
+ "path": "models/webhook/webhook.go",
+ "fileName": "webhook.go",
+ "cellName": "webhook.go",
+ "cellId": "d8fcd25d-fb86-46b3-9277-197d7750b1dd",
+ "visible": true,
+ "parentCellId": "d3647ed6-309d-4bbb-83e1-8ac8c769d74a",
+ "children": [
+ "models/webhook/webhook.go-simstep-6cb0b191-90e3-4ddc-93d3-61a18c507e1a"
+ ]
+ },
+ "modules": {
+ "path": "modules",
+ "fileName": "modules",
+ "cellName": "modules",
+ "cellId": "c9e2608a-433c-4d04-9c8c-03984aa24fcc",
+ "visible": true,
+ "children": [
+ "modules/actions"
+ ]
+ },
+ "modules/actions": {
+ "path": "modules/actions",
+ "fileName": "actions",
+ "cellName": "actions",
+ "cellId": "4c93880a-1d09-4b55-ac7b-89233950cc5c",
+ "visible": true,
+ "parentCellId": "c9e2608a-433c-4d04-9c8c-03984aa24fcc",
+ "children": [
+ "modules/actions/workflows.go"
+ ]
+ },
+ "modules/actions/workflows.go": {
+ "path": "modules/actions/workflows.go",
+ "fileName": "workflows.go",
+ "cellName": "workflows.go",
+ "cellId": "4b8c137f-4ebc-4ff7-9fa6-32c4ea0a4124",
+ "visible": true,
+ "parentCellId": "4c93880a-1d09-4b55-ac7b-89233950cc5c"
+ },
+ "routers": {
+ "path": "routers",
+ "fileName": "routers",
+ "cellName": "routers",
+ "cellId": "f88f08c3-0e93-4de5-b142-4ff1a55f4c7b",
+ "visible": true,
+ "children": [
+ "routers/web",
+ "routers/api"
+ ]
+ },
+ "routers/api": {
+ "path": "routers/api",
+ "fileName": "api",
+ "cellName": "api",
+ "cellId": "807c2016-8e41-4357-b295-11ccb53c3eae",
+ "visible": true,
+ "parentCellId": "f88f08c3-0e93-4de5-b142-4ff1a55f4c7b",
+ "children": [
+ "routers/api/actions",
+ "routers/api/v1",
+ "routers/api/packages"
+ ]
+ },
+ "routers/api/actions": {
+ "path": "routers/api/actions",
+ "fileName": "actions",
+ "cellName": "actions",
+ "cellId": "6d3c2152-7875-4098-ab7b-890f6113e98f",
+ "visible": true,
+ "parentCellId": "807c2016-8e41-4357-b295-11ccb53c3eae",
+ "children": [
+ "routers/api/actions/runner"
+ ]
+ },
+ "routers/api/actions/runner": {
+ "path": "routers/api/actions/runner",
+ "fileName": "runner",
+ "cellName": "runner",
+ "cellId": "be32ba0f-1fd7-4703-b379-f22b27c2147f",
+ "visible": true,
+ "parentCellId": "6d3c2152-7875-4098-ab7b-890f6113e98f",
+ "children": [
+ "routers/api/actions/runner/runner.go"
+ ]
+ },
+ "routers/api/actions/runner/runner.go": {
+ "path": "routers/api/actions/runner/runner.go",
+ "fileName": "runner.go",
+ "cellName": "runner.go",
+ "cellId": "11629953-2d33-4973-82aa-1587607afd89",
+ "visible": true,
+ "parentCellId": "be32ba0f-1fd7-4703-b379-f22b27c2147f",
+ "children": [
+ "routers/api/actions/runner/runner.go-simstep-a9a8aad6-c51e-4d1d-83bd-1a716cc18de1"
+ ]
+ },
+ "routers/api/packages": {
+ "path": "routers/api/packages",
+ "fileName": "packages",
+ "cellName": "packages",
+ "cellId": "7f767bed-ae0a-4dc2-a810-058a34d7415c",
+ "visible": true,
+ "parentCellId": "807c2016-8e41-4357-b295-11ccb53c3eae",
+ "children": [
+ "routers/api/packages/api.go",
+ "routers/api/packages/generic"
+ ]
+ },
+ "routers/api/packages/api.go": {
+ "path": "routers/api/packages/api.go",
+ "fileName": "api.go",
+ "cellName": "api.go",
+ "cellId": "c90b0788-272b-4a3f-8419-c1e7c5f78ab9",
+ "visible": true,
+ "parentCellId": "7f767bed-ae0a-4dc2-a810-058a34d7415c",
+ "children": [
+ "routers/api/packages/api.go-simstep-80bd7665-22f0-4298-a595-441e3ac30519"
+ ]
+ },
+ "routers/api/packages/generic": {
+ "path": "routers/api/packages/generic",
+ "fileName": "generic",
+ "cellName": "generic",
+ "cellId": "23320a3b-e866-4326-aa0a-fab89f250a87",
+ "visible": true,
+ "parentCellId": "7f767bed-ae0a-4dc2-a810-058a34d7415c",
+ "children": [
+ "routers/api/packages/generic/generic.go"
+ ]
+ },
+ "routers/api/packages/generic/generic.go": {
+ "path": "routers/api/packages/generic/generic.go",
+ "fileName": "generic.go",
+ "cellName": "generic.go",
+ "cellId": "47388450-891e-4383-b54a-1c28df16469c",
+ "visible": true,
+ "parentCellId": "23320a3b-e866-4326-aa0a-fab89f250a87",
+ "children": [
+ "routers/api/packages/generic/generic.go-simstep-9e90ffc2-07f4-4084-b09e-bee9d373e5d7",
+ "routers/api/packages/generic/generic.go-simstep-1c045caa-8810-492e-97be-a8471a7605b2"
+ ]
+ },
+ "routers/api/v1": {
+ "path": "routers/api/v1",
+ "fileName": "v1",
+ "cellName": "v1",
+ "cellId": "547773bf-f623-4285-bcf3-bc7352e83727",
+ "visible": true,
+ "parentCellId": "807c2016-8e41-4357-b295-11ccb53c3eae",
+ "children": [
+ "routers/api/v1/org",
+ "routers/api/v1/repo",
+ "routers/api/v1/utils"
+ ]
+ },
+ "routers/api/v1/org": {
+ "path": "routers/api/v1/org",
+ "fileName": "org",
+ "cellName": "org",
+ "cellId": "f3d903ba-37ed-4ff5-bcab-2598ac719c9d",
+ "visible": true,
+ "parentCellId": "547773bf-f623-4285-bcf3-bc7352e83727",
+ "children": [
+ "routers/api/v1/org/org.go",
+ "routers/api/v1/org/team.go"
+ ]
+ },
+ "routers/api/v1/org/org.go": {
+ "path": "routers/api/v1/org/org.go",
+ "fileName": "org.go",
+ "cellName": "org.go",
+ "cellId": "b76765f5-65e3-41ee-97a6-c3db05b1a331",
+ "visible": true,
+ "parentCellId": "f3d903ba-37ed-4ff5-bcab-2598ac719c9d",
+ "children": [
+ "routers/api/v1/org/org.go-simstep-d3d50f13-d8b4-42b7-9c03-f5aecdd107c3"
+ ]
+ },
+ "routers/api/v1/org/team.go": {
+ "path": "routers/api/v1/org/team.go",
+ "fileName": "team.go",
+ "cellName": "team.go",
+ "cellId": "95504365-53f2-4430-a256-918e72715e2f",
+ "visible": true,
+ "parentCellId": "f3d903ba-37ed-4ff5-bcab-2598ac719c9d",
+ "children": [
+ "routers/api/v1/org/team.go-simstep-27159163-bec3-4784-814c-39fbbabbe5c0",
+ "routers/api/v1/org/team.go-simstep-3ffb9dab-a06e-447e-ac05-83e821f4e38f",
+ "routers/api/v1/org/team.go-simstep-63bb7359-8e00-459a-9be7-a4cb596a2ac4"
+ ]
+ },
+ "routers/api/v1/repo": {
+ "path": "routers/api/v1/repo",
+ "fileName": "repo",
+ "cellName": "repo",
+ "cellId": "e0bd77b2-9399-46af-ada1-62c5c4852b6f",
+ "visible": true,
+ "parentCellId": "547773bf-f623-4285-bcf3-bc7352e83727",
+ "children": [
+ "routers/api/v1/repo/hook.go",
+ "routers/api/v1/repo/fork.go"
+ ]
+ },
+ "routers/api/v1/repo/fork.go": {
+ "path": "routers/api/v1/repo/fork.go",
+ "fileName": "fork.go",
+ "cellName": "fork.go",
+ "cellId": "d86b1308-1a5b-4a28-8842-a0e4d633ad62",
+ "visible": true,
+ "parentCellId": "e0bd77b2-9399-46af-ada1-62c5c4852b6f",
+ "children": [
+ "routers/api/v1/repo/fork.go-simstep-db85ab4c-6720-4017-bf0f-aaba20353724"
+ ]
+ },
+ "routers/api/v1/repo/hook.go": {
+ "path": "routers/api/v1/repo/hook.go",
+ "fileName": "hook.go",
+ "cellName": "hook.go",
+ "cellId": "4e2643dd-9d0b-4335-ad1e-7afdc33bd158",
+ "visible": true,
+ "parentCellId": "e0bd77b2-9399-46af-ada1-62c5c4852b6f",
+ "children": [
+ "routers/api/v1/repo/hook.go-simstep-76ada736-60f1-4b60-ac04-2a06ce0f08eb",
+ "routers/api/v1/repo/hook.go-simstep-907040df-6d7e-4c66-b65e-97fd1e1fb7f7"
+ ]
+ },
+ "routers/api/v1/utils": {
+ "path": "routers/api/v1/utils",
+ "fileName": "utils",
+ "cellName": "utils",
+ "cellId": "415fef8e-57f9-453a-9052-8cb5fb6ca6f9",
+ "visible": true,
+ "parentCellId": "547773bf-f623-4285-bcf3-bc7352e83727",
+ "children": [
+ "routers/api/v1/utils/hook.go"
+ ]
+ },
+ "routers/api/v1/utils/hook.go": {
+ "path": "routers/api/v1/utils/hook.go",
+ "fileName": "hook.go",
+ "cellName": "hook.go",
+ "cellId": "295b44d5-48fa-4bdb-aec3-8c84ddf9b86c",
+ "visible": true,
+ "parentCellId": "415fef8e-57f9-453a-9052-8cb5fb6ca6f9",
+ "children": [
+ "routers/api/v1/utils/hook.go-simstep-7d095ef9-2d9a-46ea-bd33-04da751e319f"
+ ]
+ },
+ "routers/web": {
+ "path": "routers/web",
+ "fileName": "web",
+ "cellName": "web",
+ "cellId": "4c5d55c2-d60f-4c4c-b674-bfed63fdd138",
+ "visible": true,
+ "parentCellId": "f88f08c3-0e93-4de5-b142-4ff1a55f4c7b",
+ "children": [
+ "routers/web/repo",
+ "routers/web/auth"
+ ]
+ },
+ "routers/web/auth": {
+ "path": "routers/web/auth",
+ "fileName": "auth",
+ "cellName": "auth",
+ "cellId": "a6632228-3a8d-444a-9e04-e306ee1682a0",
+ "visible": true,
+ "parentCellId": "4c5d55c2-d60f-4c4c-b674-bfed63fdd138",
+ "children": [
+ "routers/web/auth/auth.go"
+ ]
+ },
+ "routers/web/auth/auth.go": {
+ "path": "routers/web/auth/auth.go",
+ "fileName": "auth.go",
+ "cellName": "auth.go",
+ "cellId": "2ad9e5d7-3a54-4e5a-b6a4-3c1ad81907c1",
+ "visible": true,
+ "parentCellId": "a6632228-3a8d-444a-9e04-e306ee1682a0",
+ "children": [
+ "routers/web/auth/auth.go-simstep-de460200-3fc3-4ce4-85dd-55f7a1a902e0",
+ "routers/web/auth/auth.go-simstep-0af9a86b-2996-4b9e-8e2b-1904f42e63ac"
+ ]
+ },
+ "routers/web/repo": {
+ "path": "routers/web/repo",
+ "fileName": "repo",
+ "cellName": "repo",
+ "cellId": "e784820c-8d2c-4480-8888-bf60f961f4b7",
+ "visible": true,
+ "parentCellId": "4c5d55c2-d60f-4c4c-b674-bfed63fdd138",
+ "children": [
+ "routers/web/repo/repo.go",
+ "routers/web/repo/view_home.go",
+ "routers/web/repo/view.go",
+ "routers/web/repo/view_file.go",
+ "routers/web/repo/pull.go",
+ "routers/web/repo/issue_new.go",
+ "routers/web/repo/wiki.go",
+ "routers/web/repo/release.go"
+ ]
+ },
+ "routers/web/repo/issue_new.go": {
+ "path": "routers/web/repo/issue_new.go",
+ "fileName": "issue_new.go",
+ "cellName": "issue_new.go",
+ "cellId": "e2b305da-d0ea-47ad-aac6-67d3497ccb15",
+ "visible": true,
+ "parentCellId": "e784820c-8d2c-4480-8888-bf60f961f4b7",
+ "children": [
+ "routers/web/repo/issue_new.go-simstep-ffce7d78-1ab1-49b1-b495-1416b1eadfc9",
+ "routers/web/repo/issue_new.go-simstep-97731684-60e8-4305-9098-6027b64190bd"
+ ]
+ },
+ "routers/web/repo/pull.go": {
+ "path": "routers/web/repo/pull.go",
+ "fileName": "pull.go",
+ "cellName": "pull.go",
+ "cellId": "82a6e105-ada7-413b-987f-f44109b7b3cc",
+ "visible": true,
+ "parentCellId": "e784820c-8d2c-4480-8888-bf60f961f4b7",
+ "children": [
+ "routers/web/repo/pull.go-simstep-ad391192-a9ab-42f5-8966-f6628aeded05",
+ "routers/web/repo/pull.go-simstep-7f11138f-6ee9-4918-b3ca-78da3871caea"
+ ]
+ },
+ "routers/web/repo/release.go": {
+ "path": "routers/web/repo/release.go",
+ "fileName": "release.go",
+ "cellName": "release.go",
+ "cellId": "50fc0867-77a6-428d-9687-0377657129cf",
+ "visible": true,
+ "parentCellId": "e784820c-8d2c-4480-8888-bf60f961f4b7",
+ "children": [
+ "routers/web/repo/release.go-simstep-b0a7c3ca-22a2-4429-9878-dee03f0f4bfd",
+ "routers/web/repo/release.go-simstep-c0e8827d-f756-4a38-b12b-9c6efca47dc5"
+ ]
+ },
+ "routers/web/repo/repo.go": {
+ "path": "routers/web/repo/repo.go",
+ "fileName": "repo.go",
+ "cellName": "repo.go",
+ "cellId": "11af5701-f89e-44a7-b761-7715c533f507",
+ "visible": true,
+ "parentCellId": "e784820c-8d2c-4480-8888-bf60f961f4b7",
+ "children": [
+ "routers/web/repo/repo.go-simstep-53901967-77be-42fa-9b62-2bc14def484f"
+ ]
+ },
+ "routers/web/repo/view.go": {
+ "path": "routers/web/repo/view.go",
+ "fileName": "view.go",
+ "cellName": "view.go",
+ "cellId": "c04c4632-5922-4925-8ed7-ecfa9b7b84dd",
+ "visible": true,
+ "parentCellId": "e784820c-8d2c-4480-8888-bf60f961f4b7"
+ },
+ "routers/web/repo/view_file.go": {
+ "path": "routers/web/repo/view_file.go",
+ "fileName": "view_file.go",
+ "cellName": "view_file.go",
+ "cellId": "d69d1137-0bba-4cb4-9a26-22202f61c767",
+ "visible": true,
+ "parentCellId": "e784820c-8d2c-4480-8888-bf60f961f4b7",
+ "children": [
+ "routers/web/repo/view_file.go-simstep-a8a09c64-d962-40f3-b4d1-9b0941533a46"
+ ]
+ },
+ "routers/web/repo/view_home.go": {
+ "path": "routers/web/repo/view_home.go",
+ "fileName": "view_home.go",
+ "cellName": "view_home.go",
+ "cellId": "8cd4bf6c-df0a-445a-9a69-301a3a69b223",
+ "visible": true,
+ "parentCellId": "e784820c-8d2c-4480-8888-bf60f961f4b7",
+ "children": [
+ "routers/web/repo/view_home.go-simstep-b66ab550-b9d6-47a9-8c00-f8db35d2110b"
+ ]
+ },
+ "routers/web/repo/wiki.go": {
+ "path": "routers/web/repo/wiki.go",
+ "fileName": "wiki.go",
+ "cellName": "wiki.go",
+ "cellId": "5c010790-dade-4ba3-a3dd-bb0cd571fcc6",
+ "visible": true,
+ "parentCellId": "e784820c-8d2c-4480-8888-bf60f961f4b7",
+ "children": [
+ "routers/web/repo/wiki.go-simstep-90a80659-4a4f-4034-aab4-d0bfbc1febb4",
+ "routers/web/repo/wiki.go-simstep-c33becb1-0fbc-4f7b-8985-6b66630e84de"
+ ]
+ },
+ "services": {
+ "path": "services",
+ "fileName": "services",
+ "cellName": "services",
+ "cellId": "2095457c-08fa-4087-baae-dd962ebe60d3",
+ "visible": true,
+ "children": [
+ "services/repository",
+ "services/webhook",
+ "services/context",
+ "services/pull",
+ "services/notify",
+ "services/issue",
+ "services/actions",
+ "services/org",
+ "services/packages",
+ "services/auth",
+ "services/cron",
+ "services/mirror",
+ "services/wiki",
+ "services/release"
+ ]
+ },
+ "services/actions": {
+ "path": "services/actions",
+ "fileName": "actions",
+ "cellName": "actions",
+ "cellId": "0f64dd37-6573-4d47-a06a-435f9ac9acac",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3",
+ "children": [
+ "services/actions/notifier_helper.go",
+ "services/actions/job_emitter.go",
+ "services/actions/task.go",
+ "services/actions/commit_status.go"
+ ]
+ },
+ "services/actions/commit_status.go": {
+ "path": "services/actions/commit_status.go",
+ "fileName": "commit_status.go",
+ "cellName": "commit_status.go",
+ "cellId": "55410235-e25a-43f1-9e9e-0c4d56846a85",
+ "visible": true,
+ "parentCellId": "0f64dd37-6573-4d47-a06a-435f9ac9acac",
+ "children": [
+ "services/actions/commit_status.go-simstep-1850ee33-6937-4414-8809-657c49ab8c24"
+ ]
+ },
+ "services/actions/job_emitter.go": {
+ "path": "services/actions/job_emitter.go",
+ "fileName": "job_emitter.go",
+ "cellName": "job_emitter.go",
+ "cellId": "01eacf2c-6451-40c4-b950-52dfbd738a90",
+ "visible": true,
+ "parentCellId": "0f64dd37-6573-4d47-a06a-435f9ac9acac",
+ "children": [
+ "services/actions/job_emitter.go-simstep-b2c4908e-d37d-4606-a880-31babd962d71"
+ ]
+ },
+ "services/actions/notifier_helper.go": {
+ "path": "services/actions/notifier_helper.go",
+ "fileName": "notifier_helper.go",
+ "cellName": "notifier_helper.go",
+ "cellId": "083eae6c-89fc-462f-a945-a15d57a9cc9e",
+ "visible": true,
+ "parentCellId": "0f64dd37-6573-4d47-a06a-435f9ac9acac",
+ "children": [
+ "services/actions/notifier_helper.go-simstep-54c475cd-aa1c-4381-9d38-a54792886af9"
+ ]
+ },
+ "services/actions/task.go": {
+ "path": "services/actions/task.go",
+ "fileName": "task.go",
+ "cellName": "task.go",
+ "cellId": "0779d0ad-6911-459b-9a90-9a60522f1037",
+ "visible": true,
+ "parentCellId": "0f64dd37-6573-4d47-a06a-435f9ac9acac",
+ "children": [
+ "services/actions/task.go-simstep-01f6079d-0a18-402a-9778-a571b661a3e6"
+ ]
+ },
+ "services/auth": {
+ "path": "services/auth",
+ "fileName": "auth",
+ "cellName": "auth",
+ "cellId": "ae1da22a-a9d0-458e-89ab-2a63d212de9b",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3",
+ "children": [
+ "services/auth/signin.go",
+ "services/auth/source"
+ ]
+ },
+ "services/auth/signin.go": {
+ "path": "services/auth/signin.go",
+ "fileName": "signin.go",
+ "cellName": "signin.go",
+ "cellId": "bd39a2a8-6696-4331-818b-3de73d784b19",
+ "visible": true,
+ "parentCellId": "ae1da22a-a9d0-458e-89ab-2a63d212de9b",
+ "children": [
+ "services/auth/signin.go-simstep-660ca44b-c08d-42e4-a28a-58caf0b6d6ab"
+ ]
+ },
+ "services/auth/source": {
+ "path": "services/auth/source",
+ "fileName": "source",
+ "cellName": "source",
+ "cellId": "c9434e1d-28b1-4380-907c-8288b392b07b",
+ "visible": true,
+ "parentCellId": "ae1da22a-a9d0-458e-89ab-2a63d212de9b",
+ "children": [
+ "services/auth/source/ldap"
+ ]
+ },
+ "services/auth/source/ldap": {
+ "path": "services/auth/source/ldap",
+ "fileName": "ldap",
+ "cellName": "ldap",
+ "cellId": "de24489c-6df1-4c57-9419-5443e9986d88",
+ "visible": true,
+ "parentCellId": "c9434e1d-28b1-4380-907c-8288b392b07b",
+ "children": [
+ "services/auth/source/ldap/source_authenticate.go",
+ "services/auth/source/ldap/source_search.go"
+ ]
+ },
+ "services/auth/source/ldap/source_authenticate.go": {
+ "path": "services/auth/source/ldap/source_authenticate.go",
+ "fileName": "source_authenticate.go",
+ "cellName": "source_authenticate.go",
+ "cellId": "a0a0b2ce-286f-49a7-bd9a-9418bdfd6b48",
+ "visible": true,
+ "parentCellId": "de24489c-6df1-4c57-9419-5443e9986d88",
+ "children": [
+ "services/auth/source/ldap/source_authenticate.go-simstep-a3a212e6-29d1-423c-aec2-e2bf5dc80756",
+ "services/auth/source/ldap/source_authenticate.go-simstep-afbb7d9a-0643-4796-8ca2-8fe72357bc0e"
+ ]
+ },
+ "services/auth/source/ldap/source_search.go": {
+ "path": "services/auth/source/ldap/source_search.go",
+ "fileName": "source_search.go",
+ "cellName": "source_search.go",
+ "cellId": "90ae1a9d-b4b6-42df-b7e9-fa206e89fbb8",
+ "visible": true,
+ "parentCellId": "de24489c-6df1-4c57-9419-5443e9986d88",
+ "children": [
+ "services/auth/source/ldap/source_search.go-simstep-ce938895-5d2d-4137-8207-18ec5a5454e6",
+ "services/auth/source/ldap/source_search.go-simstep-76cd35ae-8050-4987-9381-32c9fde784e4",
+ "services/auth/source/ldap/source_search.go-simstep-2baf8794-62c5-44b8-a564-f3193c532ccd"
+ ]
+ },
+ "services/context": {
+ "path": "services/context",
+ "fileName": "context",
+ "cellName": "context",
+ "cellId": "b953507d-dd9b-4799-9fea-5d2f89cf46d0",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3",
+ "children": [
+ "services/context/repo.go"
+ ]
+ },
+ "services/context/repo.go": {
+ "path": "services/context/repo.go",
+ "fileName": "repo.go",
+ "cellName": "repo.go",
+ "cellId": "4c269f1e-5c02-469c-be7f-cd7b3fba6139",
+ "visible": true,
+ "parentCellId": "b953507d-dd9b-4799-9fea-5d2f89cf46d0",
+ "children": [
+ "services/context/repo.go-simstep-1601b44c-14d8-4513-8c48-ca8155f37053"
+ ]
+ },
+ "services/cron": {
+ "path": "services/cron",
+ "fileName": "cron",
+ "cellName": "cron",
+ "cellId": "f303d583-ee5b-4623-943e-60565b1e9631",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3",
+ "children": [
+ "services/cron/tasks_basic.go"
+ ]
+ },
+ "services/cron/tasks_basic.go": {
+ "path": "services/cron/tasks_basic.go",
+ "fileName": "tasks_basic.go",
+ "cellName": "tasks_basic.go",
+ "cellId": "d32cb5cb-563a-45af-8d4c-9abf1317a647",
+ "visible": true,
+ "parentCellId": "f303d583-ee5b-4623-943e-60565b1e9631",
+ "children": [
+ "services/cron/tasks_basic.go-simstep-e70de2fd-29c5-4cb6-813c-264a2a622b2d"
+ ]
+ },
+ "services/issue": {
+ "path": "services/issue",
+ "fileName": "issue",
+ "cellName": "issue",
+ "cellId": "c66d3460-05f8-48fe-aae7-80531064bdd7",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3",
+ "children": [
+ "services/issue/issue.go"
+ ]
+ },
+ "services/issue/issue.go": {
+ "path": "services/issue/issue.go",
+ "fileName": "issue.go",
+ "cellName": "issue.go",
+ "cellId": "1d625953-5a4b-4e1d-9f8a-a3dbc41bae6b",
+ "visible": true,
+ "parentCellId": "c66d3460-05f8-48fe-aae7-80531064bdd7",
+ "children": [
+ "services/issue/issue.go-simstep-23e3c1d3-be55-497a-ab55-03195d821e10"
+ ]
+ },
+ "services/mirror": {
+ "path": "services/mirror",
+ "fileName": "mirror",
+ "cellName": "mirror",
+ "cellId": "be189c27-22c4-488a-95ee-4106d357a6a1",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3",
+ "children": [
+ "services/mirror/mirror.go",
+ "services/mirror/queue.go",
+ "services/mirror/mirror_pull.go"
+ ]
+ },
+ "services/mirror/mirror.go": {
+ "path": "services/mirror/mirror.go",
+ "fileName": "mirror.go",
+ "cellName": "mirror.go",
+ "cellId": "6b12a694-4b0c-4f03-a4f0-100770e8e8db",
+ "visible": true,
+ "parentCellId": "be189c27-22c4-488a-95ee-4106d357a6a1",
+ "children": [
+ "services/mirror/mirror.go-simstep-f00d42da-34d8-4564-a701-73b37241bc1e"
+ ]
+ },
+ "services/mirror/mirror_pull.go": {
+ "path": "services/mirror/mirror_pull.go",
+ "fileName": "mirror_pull.go",
+ "cellName": "mirror_pull.go",
+ "cellId": "81c9d8c9-e4be-49a9-b19a-3274140914b3",
+ "visible": true,
+ "parentCellId": "be189c27-22c4-488a-95ee-4106d357a6a1",
+ "children": [
+ "services/mirror/mirror_pull.go-simstep-1d09c452-183e-4857-aef6-9f0e66f0224a"
+ ]
+ },
+ "services/mirror/queue.go": {
+ "path": "services/mirror/queue.go",
+ "fileName": "queue.go",
+ "cellName": "queue.go",
+ "cellId": "4d118f1a-fbc0-48e8-ac1c-1d9d6a6f9175",
+ "visible": true,
+ "parentCellId": "be189c27-22c4-488a-95ee-4106d357a6a1"
+ },
+ "services/notify": {
+ "path": "services/notify",
+ "fileName": "notify",
+ "cellName": "notify",
+ "cellId": "639a1c59-e4ad-4a00-9e7a-97365883a988",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3",
+ "children": [
+ "services/notify/notify.go"
+ ]
+ },
+ "services/notify/notify.go": {
+ "path": "services/notify/notify.go",
+ "fileName": "notify.go",
+ "cellName": "notify.go",
+ "cellId": "4ab5206e-2bb5-411c-ab1f-17a126f951b3",
+ "visible": true,
+ "parentCellId": "639a1c59-e4ad-4a00-9e7a-97365883a988",
+ "children": [
+ "services/notify/notify.go-simstep-56fda301-e5b4-440a-8db2-4c4ed2bd649a",
+ "services/notify/notify.go-simstep-0a08a7a7-4813-4700-9b6b-0787163e9fd9",
+ "services/notify/notify.go-simstep-ddb168e8-da57-418a-82f2-28b2b22dae09"
+ ]
+ },
+ "services/org": {
+ "path": "services/org",
+ "fileName": "org",
+ "cellName": "org",
+ "cellId": "6bd2ddd2-7126-44ef-81a0-f5a723fed41d",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3",
+ "children": [
+ "services/org/team.go"
+ ]
+ },
+ "services/org/team.go": {
+ "path": "services/org/team.go",
+ "fileName": "team.go",
+ "cellName": "team.go",
+ "cellId": "dbbfae18-dda1-45cb-af47-2cc6201794a4",
+ "visible": true,
+ "parentCellId": "6bd2ddd2-7126-44ef-81a0-f5a723fed41d",
+ "children": [
+ "services/org/team.go-simstep-c7a4932f-39c4-440f-bfb2-6e0f08961f03",
+ "services/org/team.go-simstep-62554420-2e08-4eb8-ae5c-8664c95a27b2"
+ ]
+ },
+ "services/packages": {
+ "path": "services/packages",
+ "fileName": "packages",
+ "cellName": "packages",
+ "cellId": "9395aa4c-73a4-4c2a-b21d-7ba8961158c1",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3",
+ "children": [
+ "services/packages/packages.go"
+ ]
+ },
+ "services/packages/packages.go": {
+ "path": "services/packages/packages.go",
+ "fileName": "packages.go",
+ "cellName": "packages.go",
+ "cellId": "61a15f31-b7b2-430b-acb7-c7558d4720cb",
+ "visible": true,
+ "parentCellId": "9395aa4c-73a4-4c2a-b21d-7ba8961158c1",
+ "children": [
+ "services/packages/packages.go-simstep-3a18acb5-55a0-428f-9bb5-2cade38c753e"
+ ]
+ },
+ "services/pull": {
+ "path": "services/pull",
+ "fileName": "pull",
+ "cellName": "pull",
+ "cellId": "71a69fd9-d4ac-400e-9b3d-37bfddf5357c",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3",
+ "children": [
+ "services/pull/pull.go",
+ "services/pull/check.go",
+ "services/pull/merge.go"
+ ]
+ },
+ "services/pull/check.go": {
+ "path": "services/pull/check.go",
+ "fileName": "check.go",
+ "cellName": "check.go",
+ "cellId": "760215a8-c752-4619-ab66-274b59be1ec3",
+ "visible": true,
+ "parentCellId": "71a69fd9-d4ac-400e-9b3d-37bfddf5357c",
+ "children": [
+ "services/pull/check.go-simstep-b7c0578c-e1e5-47e4-978c-cc79753235f0"
+ ]
+ },
+ "services/pull/merge.go": {
+ "path": "services/pull/merge.go",
+ "fileName": "merge.go",
+ "cellName": "merge.go",
+ "cellId": "8c9ebe99-1c96-46af-b937-545322eb5328",
+ "visible": true,
+ "parentCellId": "71a69fd9-d4ac-400e-9b3d-37bfddf5357c",
+ "children": [
+ "services/pull/merge.go-simstep-1551889d-7fcd-4b22-9962-d4174a18ddd6",
+ "services/pull/merge.go-simstep-1b760baa-c919-4660-9e0c-b6137e1c2721"
+ ]
+ },
+ "services/pull/pull.go": {
+ "path": "services/pull/pull.go",
+ "fileName": "pull.go",
+ "cellName": "pull.go",
+ "cellId": "b0197d77-0606-4d64-af96-ce992f9de7a5",
+ "visible": true,
+ "parentCellId": "71a69fd9-d4ac-400e-9b3d-37bfddf5357c",
+ "children": [
+ "services/pull/pull.go-simstep-e5ba05df-a66c-4931-9faa-926f5a23d6ae"
+ ]
+ },
+ "services/release": {
+ "path": "services/release",
+ "fileName": "release",
+ "cellName": "release",
+ "cellId": "709e822a-a82a-4608-9a45-af356bc74660",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3",
+ "children": [
+ "services/release/release.go"
+ ]
+ },
+ "services/release/release.go": {
+ "path": "services/release/release.go",
+ "fileName": "release.go",
+ "cellName": "release.go",
+ "cellId": "c150bfc9-bce2-4250-b468-2b5a81f74e87",
+ "visible": true,
+ "parentCellId": "709e822a-a82a-4608-9a45-af356bc74660",
+ "children": [
+ "services/release/release.go-simstep-5873640f-cd1c-4bc5-9bc2-9e9df60bd7a9"
+ ]
+ },
+ "services/repository": {
+ "path": "services/repository",
+ "fileName": "repository",
+ "cellName": "repository",
+ "cellId": "825b9e8b-b738-4712-bd94-10d08696cae1",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3",
+ "children": [
+ "services/repository/create.go",
+ "services/repository/repo_team.go",
+ "services/repository/fork.go"
+ ]
+ },
+ "services/repository/create.go": {
+ "path": "services/repository/create.go",
+ "fileName": "create.go",
+ "cellName": "create.go",
+ "cellId": "cb8c6486-62bb-4348-a03b-2e66dd0fcb09",
+ "visible": true,
+ "parentCellId": "825b9e8b-b738-4712-bd94-10d08696cae1",
+ "children": [
+ "services/repository/create.go-simstep-e53953bb-173b-4a7c-8798-7a292ed34210"
+ ]
+ },
+ "services/repository/fork.go": {
+ "path": "services/repository/fork.go",
+ "fileName": "fork.go",
+ "cellName": "fork.go",
+ "cellId": "107d36b9-9cb1-45ca-8663-314abeddd662",
+ "visible": true,
+ "parentCellId": "825b9e8b-b738-4712-bd94-10d08696cae1",
+ "children": [
+ "services/repository/fork.go-simstep-11f9bf8c-700e-46aa-864c-c8d401074487"
+ ]
+ },
+ "services/repository/repo_team.go": {
+ "path": "services/repository/repo_team.go",
+ "fileName": "repo_team.go",
+ "cellName": "repo_team.go",
+ "cellId": "4c9979e0-7716-4c7a-ab18-d6cfe683964b",
+ "visible": true,
+ "parentCellId": "825b9e8b-b738-4712-bd94-10d08696cae1",
+ "children": [
+ "services/repository/repo_team.go-simstep-b6cf2f5e-8a56-4e3a-84f0-5259abcb93a0"
+ ]
+ },
+ "services/webhook": {
+ "path": "services/webhook",
+ "fileName": "webhook",
+ "cellName": "webhook",
+ "cellId": "2ebce87f-f247-403e-950a-4f695d05ac6e",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3",
+ "children": [
+ "services/webhook/notifier.go",
+ "services/webhook/webhook.go",
+ "services/webhook/deliver.go"
+ ]
+ },
+ "services/webhook/deliver.go": {
+ "path": "services/webhook/deliver.go",
+ "fileName": "deliver.go",
+ "cellName": "deliver.go",
+ "cellId": "e4e5f63d-e96f-4d9f-bbba-9a25dccf1be4",
+ "visible": true,
+ "parentCellId": "2ebce87f-f247-403e-950a-4f695d05ac6e",
+ "children": [
+ "services/webhook/deliver.go-simstep-e8051428-7f7d-484f-a54d-402fad522be8",
+ "services/webhook/deliver.go-simstep-93f1ca06-955c-441a-9f4d-7d515d95aeba"
+ ]
+ },
+ "services/webhook/notifier.go": {
+ "path": "services/webhook/notifier.go",
+ "fileName": "notifier.go",
+ "cellName": "notifier.go",
+ "cellId": "ee3c4395-ec52-49ae-b5f6-c0564e51e17f",
+ "visible": true,
+ "parentCellId": "2ebce87f-f247-403e-950a-4f695d05ac6e",
+ "children": [
+ "services/webhook/notifier.go-simstep-f1b0adeb-8b7e-43c5-8f1c-2f57935563f1",
+ "services/webhook/notifier.go-simstep-756e8552-8547-4936-982a-f6adb7aefd97",
+ "services/webhook/notifier.go-simstep-819644f6-a9d1-489c-a1e9-8a7f607d8db6",
+ "services/webhook/notifier.go-simstep-aa2b12e0-ced0-40fd-9afe-d2dafe836790",
+ "services/webhook/notifier.go-simstep-24889f3c-0f56-4418-9dce-63d75388b45d"
+ ]
+ },
+ "services/webhook/webhook.go": {
+ "path": "services/webhook/webhook.go",
+ "fileName": "webhook.go",
+ "cellName": "webhook.go",
+ "cellId": "324ebb2a-8eb7-4418-9d46-e6c6862f79f2",
+ "visible": true,
+ "parentCellId": "2ebce87f-f247-403e-950a-4f695d05ac6e",
+ "children": [
+ "services/webhook/webhook.go-simstep-f12258ba-b683-4b8e-ae55-f9e9cb830e91",
+ "services/webhook/webhook.go-simstep-ca8b0022-2b6d-47f3-b750-132b50943f97",
+ "services/webhook/webhook.go-simstep-3da3ce55-4f26-4df2-b476-405ce84c47c6"
+ ]
+ },
+ "services/wiki": {
+ "path": "services/wiki",
+ "fileName": "wiki",
+ "cellName": "wiki",
+ "cellId": "47c57001-a9f1-4b7e-9db5-d6a23bb48f72",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3",
+ "children": [
+ "services/wiki/wiki.go"
+ ]
+ },
+ "services/wiki/wiki.go": {
+ "path": "services/wiki/wiki.go",
+ "fileName": "wiki.go",
+ "cellName": "wiki.go",
+ "cellId": "79b6908f-15a8-4264-a79f-e311b37d277d",
+ "visible": true,
+ "parentCellId": "47c57001-a9f1-4b7e-9db5-d6a23bb48f72",
+ "children": [
+ "services/wiki/wiki.go-simstep-c97445dd-e5af-4fda-88f8-5239054437b7"
+ ]
+ },
+ "templates": {
+ "path": "templates",
+ "fileName": "templates",
+ "cellName": "templates",
+ "cellId": "b540e2b9-4a85-4f1f-a957-30cd67684a66",
+ "visible": true,
+ "children": [
+ "templates/repo"
+ ]
+ },
+ "templates/repo": {
+ "path": "templates/repo",
+ "fileName": "repo",
+ "cellName": "repo",
+ "cellId": "b76f2e2b-7e6a-4474-8670-e456541f5ec2",
+ "visible": true,
+ "parentCellId": "b540e2b9-4a85-4f1f-a957-30cd67684a66",
+ "children": [
+ "templates/repo/home.tmpl",
+ "templates/repo/view_file_list.tmpl",
+ "templates/repo/view_file.tmpl"
+ ]
+ },
+ "templates/repo/home.tmpl": {
+ "path": "templates/repo/home.tmpl",
+ "fileName": "home.tmpl",
+ "cellName": "home.tmpl",
+ "cellId": "0e5b8ab7-2e08-437d-88a9-77262cad0b3e",
+ "visible": true,
+ "parentCellId": "b76f2e2b-7e6a-4474-8670-e456541f5ec2",
+ "children": [
+ "templates/repo/home.tmpl-simstep-a9744f20-8855-44e8-b85d-8967be3baadf"
+ ]
+ },
+ "templates/repo/view_file.tmpl": {
+ "path": "templates/repo/view_file.tmpl",
+ "fileName": "view_file.tmpl",
+ "cellName": "view_file.tmpl",
+ "cellId": "0ead94e8-298a-47d5-a682-ac5239b7056c",
+ "visible": true,
+ "parentCellId": "b76f2e2b-7e6a-4474-8670-e456541f5ec2",
+ "children": [
+ "templates/repo/view_file.tmpl-simstep-5ccb6703-b546-4b9b-9647-cb9dc611fd3c"
+ ]
+ },
+ "web_src": {
+ "path": "web_src",
+ "fileName": "web_src",
+ "cellName": "web_src",
+ "cellId": "68fb5e48-185f-459b-9b78-6be6102821eb",
+ "visible": true,
+ "children": [
+ "web_src/js"
+ ]
+ },
+ "web_src/js": {
+ "path": "web_src/js",
+ "fileName": "js",
+ "cellName": "js",
+ "cellId": "5a137c49-78e8-43a4-83c8-5b911d974a04",
+ "visible": true,
+ "parentCellId": "68fb5e48-185f-459b-9b78-6be6102821eb",
+ "children": [
+ "web_src/js/components"
+ ]
+ },
+ "web_src/js/components": {
+ "path": "web_src/js/components",
+ "fileName": "components",
+ "cellName": "components",
+ "cellId": "16ef1cae-4978-45f7-aae1-08a44fc79543",
+ "visible": true,
+ "parentCellId": "5a137c49-78e8-43a4-83c8-5b911d974a04",
+ "children": [
+ "web_src/js/components/PullRequestMergeForm.vue"
+ ]
+ },
+ "web_src/js/components/PullRequestMergeForm.vue": {
+ "path": "web_src/js/components/PullRequestMergeForm.vue",
+ "fileName": "PullRequestMergeForm.vue",
+ "cellName": "PullRequestMergeForm.vue",
+ "cellId": "bdb71908-9b32-4778-8a35-d17a9e5661bc",
+ "visible": true,
+ "parentCellId": "16ef1cae-4978-45f7-aae1-08a44fc79543"
+ },
+ "f88f08c3-0e93-4de5-b142-4ff1a55f4c7b": {
+ "path": "f88f08c3-0e93-4de5-b142-4ff1a55f4c7b",
+ "cellName": "routers",
+ "cellId": "f88f08c3-0e93-4de5-b142-4ff1a55f4c7b",
+ "visible": true
+ },
+ "2095457c-08fa-4087-baae-dd962ebe60d3": {
+ "path": "2095457c-08fa-4087-baae-dd962ebe60d3",
+ "cellName": "services",
+ "cellId": "2095457c-08fa-4087-baae-dd962ebe60d3",
+ "visible": true
+ },
+ "b540e2b9-4a85-4f1f-a957-30cd67684a66": {
+ "path": "b540e2b9-4a85-4f1f-a957-30cd67684a66",
+ "cellName": "templates",
+ "cellId": "b540e2b9-4a85-4f1f-a957-30cd67684a66",
+ "visible": true
+ },
+ "4c5d55c2-d60f-4c4c-b674-bfed63fdd138": {
+ "path": "4c5d55c2-d60f-4c4c-b674-bfed63fdd138",
+ "cellName": "web",
+ "cellId": "4c5d55c2-d60f-4c4c-b674-bfed63fdd138",
+ "visible": true,
+ "parentCellId": "f88f08c3-0e93-4de5-b142-4ff1a55f4c7b"
+ },
+ "825b9e8b-b738-4712-bd94-10d08696cae1": {
+ "path": "825b9e8b-b738-4712-bd94-10d08696cae1",
+ "cellName": "repository",
+ "cellId": "825b9e8b-b738-4712-bd94-10d08696cae1",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3"
+ },
+ "2ebce87f-f247-403e-950a-4f695d05ac6e": {
+ "path": "2ebce87f-f247-403e-950a-4f695d05ac6e",
+ "cellName": "webhook",
+ "cellId": "2ebce87f-f247-403e-950a-4f695d05ac6e",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3"
+ },
+ "b953507d-dd9b-4799-9fea-5d2f89cf46d0": {
+ "path": "b953507d-dd9b-4799-9fea-5d2f89cf46d0",
+ "cellName": "context",
+ "cellId": "b953507d-dd9b-4799-9fea-5d2f89cf46d0",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3"
+ },
+ "b76f2e2b-7e6a-4474-8670-e456541f5ec2": {
+ "path": "b76f2e2b-7e6a-4474-8670-e456541f5ec2",
+ "cellName": "repo",
+ "cellId": "b76f2e2b-7e6a-4474-8670-e456541f5ec2",
+ "visible": true,
+ "parentCellId": "b540e2b9-4a85-4f1f-a957-30cd67684a66"
+ },
+ "e784820c-8d2c-4480-8888-bf60f961f4b7": {
+ "path": "e784820c-8d2c-4480-8888-bf60f961f4b7",
+ "cellName": "repo",
+ "cellId": "e784820c-8d2c-4480-8888-bf60f961f4b7",
+ "visible": true,
+ "parentCellId": "4c5d55c2-d60f-4c4c-b674-bfed63fdd138"
+ },
+ "cb8c6486-62bb-4348-a03b-2e66dd0fcb09": {
+ "path": "cb8c6486-62bb-4348-a03b-2e66dd0fcb09",
+ "cellName": "create.go",
+ "cellId": "cb8c6486-62bb-4348-a03b-2e66dd0fcb09",
+ "visible": true,
+ "parentCellId": "825b9e8b-b738-4712-bd94-10d08696cae1"
+ },
+ "ee3c4395-ec52-49ae-b5f6-c0564e51e17f": {
+ "path": "ee3c4395-ec52-49ae-b5f6-c0564e51e17f",
+ "cellName": "notifier.go",
+ "cellId": "ee3c4395-ec52-49ae-b5f6-c0564e51e17f",
+ "visible": true,
+ "parentCellId": "2ebce87f-f247-403e-950a-4f695d05ac6e"
+ },
+ "4c269f1e-5c02-469c-be7f-cd7b3fba6139": {
+ "path": "4c269f1e-5c02-469c-be7f-cd7b3fba6139",
+ "cellName": "repo.go",
+ "cellId": "4c269f1e-5c02-469c-be7f-cd7b3fba6139",
+ "visible": true,
+ "parentCellId": "b953507d-dd9b-4799-9fea-5d2f89cf46d0"
+ },
+ "0e5b8ab7-2e08-437d-88a9-77262cad0b3e": {
+ "path": "0e5b8ab7-2e08-437d-88a9-77262cad0b3e",
+ "cellName": "home.tmpl",
+ "cellId": "0e5b8ab7-2e08-437d-88a9-77262cad0b3e",
+ "visible": true,
+ "parentCellId": "b76f2e2b-7e6a-4474-8670-e456541f5ec2"
+ },
+ "daa5766d-eb59-4ec3-a602-312c90bd1b8c": {
+ "path": "daa5766d-eb59-4ec3-a602-312c90bd1b8c",
+ "cellName": "view_file_list.tmpl",
+ "cellId": "daa5766d-eb59-4ec3-a602-312c90bd1b8c",
+ "visible": true,
+ "parentCellId": "b76f2e2b-7e6a-4474-8670-e456541f5ec2"
+ },
+ "templates/repo/view_file_list.tmpl": {
+ "path": "templates/repo/view_file_list.tmpl",
+ "fileName": "view_file_list.tmpl",
+ "cellName": "view_file_list.tmpl",
+ "cellId": "daa5766d-eb59-4ec3-a602-312c90bd1b8c",
+ "visible": true,
+ "parentCellId": "b76f2e2b-7e6a-4474-8670-e456541f5ec2"
+ },
+ "0ead94e8-298a-47d5-a682-ac5239b7056c": {
+ "path": "0ead94e8-298a-47d5-a682-ac5239b7056c",
+ "cellName": "view_file.tmpl",
+ "cellId": "0ead94e8-298a-47d5-a682-ac5239b7056c",
+ "visible": true,
+ "parentCellId": "b76f2e2b-7e6a-4474-8670-e456541f5ec2"
+ },
+ "11af5701-f89e-44a7-b761-7715c533f507": {
+ "path": "11af5701-f89e-44a7-b761-7715c533f507",
+ "cellName": "repo.go",
+ "cellId": "11af5701-f89e-44a7-b761-7715c533f507",
+ "visible": true,
+ "parentCellId": "e784820c-8d2c-4480-8888-bf60f961f4b7"
+ },
+ "8cd4bf6c-df0a-445a-9a69-301a3a69b223": {
+ "path": "8cd4bf6c-df0a-445a-9a69-301a3a69b223",
+ "cellName": "view_home.go",
+ "cellId": "8cd4bf6c-df0a-445a-9a69-301a3a69b223",
+ "visible": true,
+ "parentCellId": "e784820c-8d2c-4480-8888-bf60f961f4b7"
+ },
+ "c04c4632-5922-4925-8ed7-ecfa9b7b84dd": {
+ "path": "c04c4632-5922-4925-8ed7-ecfa9b7b84dd",
+ "cellName": "view.go",
+ "cellId": "c04c4632-5922-4925-8ed7-ecfa9b7b84dd",
+ "visible": true,
+ "parentCellId": "e784820c-8d2c-4480-8888-bf60f961f4b7"
+ },
+ "d69d1137-0bba-4cb4-9a26-22202f61c767": {
+ "path": "d69d1137-0bba-4cb4-9a26-22202f61c767",
+ "cellName": "view_file.go",
+ "cellId": "d69d1137-0bba-4cb4-9a26-22202f61c767",
+ "visible": true,
+ "parentCellId": "e784820c-8d2c-4480-8888-bf60f961f4b7"
+ },
+ "5dc7c5cf-cab6-4053-a804-59d4140be48c": {
+ "path": "5dc7c5cf-cab6-4053-a804-59d4140be48c",
+ "cellName": "[Create Repo Flow] UI: User Submits 'Create Repository' Form - repo.go:L216-277",
+ "cellId": "5dc7c5cf-cab6-4053-a804-59d4140be48c",
+ "visible": true,
+ "parentCellId": "11af5701-f89e-44a7-b761-7715c533f507"
+ },
+ "routers/web/repo/repo.go-simstep-53901967-77be-42fa-9b62-2bc14def484f": {
+ "path": "routers/web/repo/repo.go-simstep-53901967-77be-42fa-9b62-2bc14def484f",
+ "fileName": "repo.go",
+ "wiki": "The user fills out the 'Create a new repository' form and submits it. The POST request is handled by the `CreatePost` function, which validates the form data and prepares options for repository creation.",
+ "cellName": "[Create Repo Flow] UI: User Submits 'Create Repository' Form - repo.go:L216-277",
+ "cellId": "5dc7c5cf-cab6-4053-a804-59d4140be48c",
+ "visible": true,
+ "startLine": 216,
+ "endLine": 277,
+ "parentCellId": "11af5701-f89e-44a7-b761-7715c533f507",
+ "parentPath": "routers/web/repo/repo.go"
+ },
+ "66b8e539-a8c1-431b-80bd-1f01703d3d0d": {
+ "path": "66b8e539-a8c1-431b-80bd-1f01703d3d0d",
+ "cellName": "[Create Repo Flow] Service: Core Repository Creation Logic - create.go:L207-334",
+ "cellId": "66b8e539-a8c1-431b-80bd-1f01703d3d0d",
+ "visible": true,
+ "parentCellId": "cb8c6486-62bb-4348-a03b-2e66dd0fcb09"
+ },
+ "services/repository/create.go-simstep-e53953bb-173b-4a7c-8798-7a292ed34210": {
+ "path": "services/repository/create.go-simstep-e53953bb-173b-4a7c-8798-7a292ed34210",
+ "fileName": "create.go",
+ "wiki": "The `CreateRepositoryDirectly` function orchestrates the repository creation. It creates a database record for the new repository and initializes a bare Git repository on the filesystem.",
+ "cellName": "[Create Repo Flow] Service: Core Repository Creation Logic - create.go:L207-334",
+ "cellId": "66b8e539-a8c1-431b-80bd-1f01703d3d0d",
+ "visible": true,
+ "startLine": 207,
+ "endLine": 334,
+ "parentCellId": "cb8c6486-62bb-4348-a03b-2e66dd0fcb09",
+ "parentPath": "services/repository/create.go"
+ },
+ "c62a8467-c20f-48bf-baad-83a65c177225": {
+ "path": "c62a8467-c20f-48bf-baad-83a65c177225",
+ "cellName": "[Create Repo Flow] Webhook: Handle Webhook Notification - notifier.go:L113-123",
+ "cellId": "c62a8467-c20f-48bf-baad-83a65c177225",
+ "visible": true,
+ "parentCellId": "ee3c4395-ec52-49ae-b5f6-c0564e51e17f"
+ },
+ "services/webhook/notifier.go-simstep-f1b0adeb-8b7e-43c5-8f1c-2f57935563f1": {
+ "path": "services/webhook/notifier.go-simstep-f1b0adeb-8b7e-43c5-8f1c-2f57935563f1",
+ "fileName": "notifier.go",
+ "wiki": "The webhook notifier receives the creation event, constructs a payload with details about the new repository, and sends it to any configured webhook endpoints.",
+ "cellName": "[Create Repo Flow] Webhook: Handle Webhook Notification - notifier.go:L113-123",
+ "cellId": "c62a8467-c20f-48bf-baad-83a65c177225",
+ "visible": true,
+ "startLine": 113,
+ "endLine": 123,
+ "parentCellId": "ee3c4395-ec52-49ae-b5f6-c0564e51e17f",
+ "parentPath": "services/webhook/notifier.go"
+ },
+ "f4ecbce4-0dad-48e1-92fc-373392e18d72": {
+ "path": "f4ecbce4-0dad-48e1-92fc-373392e18d72",
+ "cellName": "[Browse Repo Flow] Middleware: Request and Permission Check - repo.go:L416-601",
+ "cellId": "f4ecbce4-0dad-48e1-92fc-373392e18d72",
+ "visible": true,
+ "parentCellId": "4c269f1e-5c02-469c-be7f-cd7b3fba6139"
+ },
+ "services/context/repo.go-simstep-1601b44c-14d8-4513-8c48-ca8155f37053": {
+ "path": "services/context/repo.go-simstep-1601b44c-14d8-4513-8c48-ca8155f37053",
+ "fileName": "repo.go",
+ "wiki": "A request to a repository URL (e.g., '/owner/repo') is first handled by the `RepoAssignment` middleware. This function loads the repository from the database, checks if the user has permission to view it, and populates the request context with repository information.",
+ "cellName": "[Browse Repo Flow] Middleware: Request and Permission Check - repo.go:L416-601",
+ "cellId": "f4ecbce4-0dad-48e1-92fc-373392e18d72",
+ "visible": true,
+ "startLine": 416,
+ "endLine": 601,
+ "parentCellId": "4c269f1e-5c02-469c-be7f-cd7b3fba6139",
+ "parentPath": "services/context/repo.go"
+ },
+ "19fbded3-6ebb-428a-8e42-e44a7099340b": {
+ "path": "19fbded3-6ebb-428a-8e42-e44a7099340b",
+ "cellName": "[Browse Repo Flow] Handler: Fetch Repository Contents - view_home.go:L359-408",
+ "cellId": "19fbded3-6ebb-428a-8e42-e44a7099340b",
+ "visible": true,
+ "parentCellId": "8cd4bf6c-df0a-445a-9a69-301a3a69b223"
+ },
+ "routers/web/repo/view_home.go-simstep-b66ab550-b9d6-47a9-8c00-f8db35d2110b": {
+ "path": "routers/web/repo/view_home.go-simstep-b66ab550-b9d6-47a9-8c00-f8db35d2110b",
+ "fileName": "view_home.go",
+ "wiki": "The `Home` handler uses the populated context to open the physical Git repository. It then fetches the file and directory listing (the Git tree) for the root of the default branch and looks for a README file to display.",
+ "cellName": "[Browse Repo Flow] Handler: Fetch Repository Contents - view_home.go:L359-408",
+ "cellId": "19fbded3-6ebb-428a-8e42-e44a7099340b",
+ "visible": true,
+ "startLine": 359,
+ "endLine": 408,
+ "parentCellId": "8cd4bf6c-df0a-445a-9a69-301a3a69b223",
+ "parentPath": "routers/web/repo/view_home.go"
+ },
+ "7c9a6d94-f600-42db-ac03-72fc3cff7bc9": {
+ "path": "7c9a6d94-f600-42db-ac03-72fc3cff7bc9",
+ "cellName": "[Browse Repo Flow] UI: Render Repository Home Page - home.tmpl:L1-180",
+ "cellId": "7c9a6d94-f600-42db-ac03-72fc3cff7bc9",
+ "visible": true,
+ "parentCellId": "0e5b8ab7-2e08-437d-88a9-77262cad0b3e"
+ },
+ "templates/repo/home.tmpl-simstep-a9744f20-8855-44e8-b85d-8967be3baadf": {
+ "path": "templates/repo/home.tmpl-simstep-a9744f20-8855-44e8-b85d-8967be3baadf",
+ "fileName": "home.tmpl",
+ "wiki": "The `repo/home.tmpl` template uses the provided data to generate the final HTML page, displaying the file browser, the rendered README, and repository metadata.",
+ "cellName": "[Browse Repo Flow] UI: Render Repository Home Page - home.tmpl:L1-180",
+ "cellId": "7c9a6d94-f600-42db-ac03-72fc3cff7bc9",
+ "visible": true,
+ "startLine": 1,
+ "endLine": 180,
+ "parentCellId": "0e5b8ab7-2e08-437d-88a9-77262cad0b3e",
+ "parentPath": "templates/repo/home.tmpl"
+ },
+ "7e1917b3-8473-4278-8995-4680d9464618": {
+ "path": "7e1917b3-8473-4278-8995-4680d9464618",
+ "cellName": "[Browse Repo Flow] Handler: Get File Content - view_file.go:L29-216",
+ "cellId": "7e1917b3-8473-4278-8995-4680d9464618",
+ "visible": true,
+ "parentCellId": "d69d1137-0bba-4cb4-9a26-22202f61c767"
+ },
+ "routers/web/repo/view_file.go-simstep-a8a09c64-d962-40f3-b4d1-9b0941533a46": {
+ "path": "routers/web/repo/view_file.go-simstep-a8a09c64-d962-40f3-b4d1-9b0941533a46",
+ "fileName": "view_file.go",
+ "wiki": "The `renderFile` function handles the request to view a file. It retrieves the Git blob for the requested file path from the specified commit/branch, reads its content, and determines how to render it (e.g., plain text, markup, image).",
+ "cellName": "[Browse Repo Flow] Handler: Get File Content - view_file.go:L29-216",
+ "cellId": "7e1917b3-8473-4278-8995-4680d9464618",
+ "visible": true,
+ "startLine": 29,
+ "endLine": 216,
+ "parentCellId": "d69d1137-0bba-4cb4-9a26-22202f61c767",
+ "parentPath": "routers/web/repo/view_file.go"
+ },
+ "5f394888-0458-458e-bc71-350516b1a8fd": {
+ "path": "5f394888-0458-458e-bc71-350516b1a8fd",
+ "cellName": "[Browse Repo Flow] UI: Render File View Page - view_file.tmpl:L1-60",
+ "cellId": "5f394888-0458-458e-bc71-350516b1a8fd",
+ "visible": true,
+ "parentCellId": "0ead94e8-298a-47d5-a682-ac5239b7056c"
+ },
+ "templates/repo/view_file.tmpl-simstep-5ccb6703-b546-4b9b-9647-cb9dc611fd3c": {
+ "path": "templates/repo/view_file.tmpl-simstep-5ccb6703-b546-4b9b-9647-cb9dc611fd3c",
+ "fileName": "view_file.tmpl",
+ "wiki": "The `repo/view_file.tmpl` template renders the final HTML page, displaying the file's content with syntax highlighting or as rendered markup.",
+ "cellName": "[Browse Repo Flow] UI: Render File View Page - view_file.tmpl:L1-60",
+ "cellId": "5f394888-0458-458e-bc71-350516b1a8fd",
+ "visible": true,
+ "startLine": 1,
+ "endLine": 60,
+ "parentCellId": "0ead94e8-298a-47d5-a682-ac5239b7056c",
+ "parentPath": "templates/repo/view_file.tmpl"
+ },
+ "3c173167-a47f-4e9d-9269-210cd7056b61": {
+ "path": "3c173167-a47f-4e9d-9269-210cd7056b61",
+ "cellName": "[Create Repo\nFlow] Data\nFlow: Pass\nOptions to\nCreation Service",
+ "cellId": "3c173167-a47f-4e9d-9269-210cd7056b61",
+ "visible": true
+ },
+ "generated-edge-simstep-2cec9676-4fa2-4880-ae98-8499dfe5d73d-3c173167-a47f-4e9d-9269-210cd7056b61": {
+ "path": "generated-edge-simstep-2cec9676-4fa2-4880-ae98-8499dfe5d73d-3c173167-a47f-4e9d-9269-210cd7056b61",
+ "fileName": "repo.go",
+ "cellName": "[Create Repo Flow] Data Flow: Pass Options to Creation Service",
+ "cellId": "3c173167-a47f-4e9d-9269-210cd7056b61",
+ "visible": true,
+ "startLine": 278,
+ "endLine": 294,
+ "parentPath": "routers/web/repo/repo.go"
+ },
+ "4ff771e1-09e3-477f-97f1-032198e031d1": {
+ "path": "4ff771e1-09e3-477f-97f1-032198e031d1",
+ "cellName": "[Create Repo\nFlow] Event\nDispatch: Dispatch\nCreation Notification",
+ "cellId": "4ff771e1-09e3-477f-97f1-032198e031d1",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3"
+ },
+ "generated-edge-simstep-4bb58ff9-5969-4ea1-9d90-6af267c88852-4ff771e1-09e3-477f-97f1-032198e031d1": {
+ "path": "generated-edge-simstep-4bb58ff9-5969-4ea1-9d90-6af267c88852-4ff771e1-09e3-477f-97f1-032198e031d1",
+ "fileName": "create.go",
+ "cellName": "[Create Repo Flow] Event Dispatch: Dispatch Creation Notification",
+ "cellId": "4ff771e1-09e3-477f-97f1-032198e031d1",
+ "visible": true,
+ "startLine": 57,
+ "endLine": 57,
+ "parentPath": "services/repository/create.go"
+ },
+ "c853623e-b02f-4551-9b5b-aed279344787": {
+ "path": "c853623e-b02f-4551-9b5b-aed279344787",
+ "cellName": "[Create Repo\nFlow] UI:\nRedirect User\nto New\nRepository",
+ "cellId": "c853623e-b02f-4551-9b5b-aed279344787",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3"
+ },
+ "generated-edge-simstep-fc752333-bd0d-4bcb-bec9-bd07b7a0e201-c853623e-b02f-4551-9b5b-aed279344787": {
+ "path": "generated-edge-simstep-fc752333-bd0d-4bcb-bec9-bd07b7a0e201-c853623e-b02f-4551-9b5b-aed279344787",
+ "fileName": "notifier.go",
+ "cellName": "[Create Repo Flow] UI: Redirect User to New Repository",
+ "cellId": "c853623e-b02f-4551-9b5b-aed279344787",
+ "visible": true,
+ "startLine": 312,
+ "endLine": 312,
+ "parentPath": "services/webhook/notifier.go"
+ },
+ "fe63164b-9973-42fc-8544-b192110a4fca": {
+ "path": "fe63164b-9973-42fc-8544-b192110a4fca",
+ "cellName": "[Browse Repo\nFlow] Data\nFlow: Populated\nContext to\nHandler",
+ "cellId": "fe63164b-9973-42fc-8544-b192110a4fca",
+ "visible": true
+ },
+ "generated-edge-simstep-bf9ec22b-a6f7-4797-93bb-4ff38f4cf426-fe63164b-9973-42fc-8544-b192110a4fca": {
+ "path": "generated-edge-simstep-bf9ec22b-a6f7-4797-93bb-4ff38f4cf426-fe63164b-9973-42fc-8544-b192110a4fca",
+ "fileName": "repo.go",
+ "cellName": "[Browse Repo Flow] Data Flow: Populated Context to Handler",
+ "cellId": "fe63164b-9973-42fc-8544-b192110a4fca",
+ "visible": true,
+ "startLine": 600,
+ "endLine": 600,
+ "parentPath": "services/context/repo.go"
+ },
+ "c552696a-6be4-4a4f-b24c-ca7eb3ff16b4": {
+ "path": "c552696a-6be4-4a4f-b24c-ca7eb3ff16b4",
+ "cellName": "[Browse Repo\nFlow] Data\nFlow: Data\nto Template\nEngine",
+ "cellId": "c552696a-6be4-4a4f-b24c-ca7eb3ff16b4",
+ "visible": true
+ },
+ "generated-edge-simstep-990ceda7-8e8c-42e5-98bb-ffbc7a54a017-c552696a-6be4-4a4f-b24c-ca7eb3ff16b4": {
+ "path": "generated-edge-simstep-990ceda7-8e8c-42e5-98bb-ffbc7a54a017-c552696a-6be4-4a4f-b24c-ca7eb3ff16b4",
+ "fileName": "view_home.go",
+ "cellName": "[Browse Repo Flow] Data Flow: Data to Template Engine",
+ "cellId": "c552696a-6be4-4a4f-b24c-ca7eb3ff16b4",
+ "visible": true,
+ "startLine": 154,
+ "endLine": 154,
+ "parentPath": "routers/web/repo/view_home.go"
+ },
+ "67900620-14d5-41f7-b198-19e134376df0": {
+ "path": "67900620-14d5-41f7-b198-19e134376df0",
+ "cellName": "[Browse Repo\nFlow] User\nAction: Click\non a\nFile",
+ "cellId": "67900620-14d5-41f7-b198-19e134376df0",
+ "visible": true
+ },
+ "generated-edge-simstep-052a7d45-56b2-48f0-a56d-fb7d01d53c1d-67900620-14d5-41f7-b198-19e134376df0": {
+ "path": "generated-edge-simstep-052a7d45-56b2-48f0-a56d-fb7d01d53c1d-67900620-14d5-41f7-b198-19e134376df0",
+ "fileName": "home.tmpl",
+ "cellName": "[Browse Repo Flow] User Action: Click on a File",
+ "cellId": "67900620-14d5-41f7-b198-19e134376df0",
+ "visible": true,
+ "startLine": 23,
+ "endLine": 23,
+ "parentPath": "templates/repo/home.tmpl"
+ },
+ "08b077bf-97e7-4065-9d41-826b190a6d99": {
+ "path": "08b077bf-97e7-4065-9d41-826b190a6d99",
+ "cellName": "[Browse Repo\nFlow] Data\nFlow: File\nData to\nTemplate Engine",
+ "cellId": "08b077bf-97e7-4065-9d41-826b190a6d99",
+ "visible": true
+ },
+ "generated-edge-simstep-e404c283-c030-432c-ac08-f8adbbb9155f-08b077bf-97e7-4065-9d41-826b190a6d99": {
+ "path": "generated-edge-simstep-e404c283-c030-432c-ac08-f8adbbb9155f-08b077bf-97e7-4065-9d41-826b190a6d99",
+ "fileName": "view_file.go",
+ "cellName": "[Browse Repo Flow] Data Flow: File Data to Template Engine",
+ "cellId": "08b077bf-97e7-4065-9d41-826b190a6d99",
+ "visible": true,
+ "startLine": 215,
+ "endLine": 215,
+ "parentPath": "routers/web/repo/view_file.go"
+ },
+ "9c37213c-3c3a-45d9-acff-87fc3ab9c825": {
+ "path": "9c37213c-3c3a-45d9-acff-87fc3ab9c825",
+ "cellName": "models",
+ "cellId": "9c37213c-3c3a-45d9-acff-87fc3ab9c825",
+ "visible": true
+ },
+ "68fb5e48-185f-459b-9b78-6be6102821eb": {
+ "path": "68fb5e48-185f-459b-9b78-6be6102821eb",
+ "cellName": "web_src",
+ "cellId": "68fb5e48-185f-459b-9b78-6be6102821eb",
+ "visible": true
+ },
+ "71a69fd9-d4ac-400e-9b3d-37bfddf5357c": {
+ "path": "71a69fd9-d4ac-400e-9b3d-37bfddf5357c",
+ "cellName": "pull",
+ "cellId": "71a69fd9-d4ac-400e-9b3d-37bfddf5357c",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3"
+ },
+ "639a1c59-e4ad-4a00-9e7a-97365883a988": {
+ "path": "639a1c59-e4ad-4a00-9e7a-97365883a988",
+ "cellName": "notify",
+ "cellId": "639a1c59-e4ad-4a00-9e7a-97365883a988",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3"
+ },
+ "92701556-5fde-4ec1-b80b-12ec36212aad": {
+ "path": "92701556-5fde-4ec1-b80b-12ec36212aad",
+ "cellName": "issues",
+ "cellId": "92701556-5fde-4ec1-b80b-12ec36212aad",
+ "visible": true,
+ "parentCellId": "9c37213c-3c3a-45d9-acff-87fc3ab9c825"
+ },
+ "5a137c49-78e8-43a4-83c8-5b911d974a04": {
+ "path": "5a137c49-78e8-43a4-83c8-5b911d974a04",
+ "cellName": "js",
+ "cellId": "5a137c49-78e8-43a4-83c8-5b911d974a04",
+ "visible": true,
+ "parentCellId": "68fb5e48-185f-459b-9b78-6be6102821eb"
+ },
+ "b0197d77-0606-4d64-af96-ce992f9de7a5": {
+ "path": "b0197d77-0606-4d64-af96-ce992f9de7a5",
+ "cellName": "pull.go",
+ "cellId": "b0197d77-0606-4d64-af96-ce992f9de7a5",
+ "visible": true,
+ "parentCellId": "71a69fd9-d4ac-400e-9b3d-37bfddf5357c"
+ },
+ "760215a8-c752-4619-ab66-274b59be1ec3": {
+ "path": "760215a8-c752-4619-ab66-274b59be1ec3",
+ "cellName": "check.go",
+ "cellId": "760215a8-c752-4619-ab66-274b59be1ec3",
+ "visible": true,
+ "parentCellId": "71a69fd9-d4ac-400e-9b3d-37bfddf5357c"
+ },
+ "8c9ebe99-1c96-46af-b937-545322eb5328": {
+ "path": "8c9ebe99-1c96-46af-b937-545322eb5328",
+ "cellName": "merge.go",
+ "cellId": "8c9ebe99-1c96-46af-b937-545322eb5328",
+ "visible": true,
+ "parentCellId": "71a69fd9-d4ac-400e-9b3d-37bfddf5357c"
+ },
+ "4ab5206e-2bb5-411c-ab1f-17a126f951b3": {
+ "path": "4ab5206e-2bb5-411c-ab1f-17a126f951b3",
+ "cellName": "notify.go",
+ "cellId": "4ab5206e-2bb5-411c-ab1f-17a126f951b3",
+ "visible": true,
+ "parentCellId": "639a1c59-e4ad-4a00-9e7a-97365883a988"
+ },
+ "ae4355d1-5b08-4720-b048-73c948697625": {
+ "path": "ae4355d1-5b08-4720-b048-73c948697625",
+ "cellName": "pull.go",
+ "cellId": "ae4355d1-5b08-4720-b048-73c948697625",
+ "visible": true,
+ "parentCellId": "92701556-5fde-4ec1-b80b-12ec36212aad"
+ },
+ "16ef1cae-4978-45f7-aae1-08a44fc79543": {
+ "path": "16ef1cae-4978-45f7-aae1-08a44fc79543",
+ "cellName": "components",
+ "cellId": "16ef1cae-4978-45f7-aae1-08a44fc79543",
+ "visible": true,
+ "parentCellId": "5a137c49-78e8-43a4-83c8-5b911d974a04"
+ },
+ "82a6e105-ada7-413b-987f-f44109b7b3cc": {
+ "path": "82a6e105-ada7-413b-987f-f44109b7b3cc",
+ "cellName": "pull.go",
+ "cellId": "82a6e105-ada7-413b-987f-f44109b7b3cc",
+ "visible": true,
+ "parentCellId": "e784820c-8d2c-4480-8888-bf60f961f4b7"
+ },
+ "bdb71908-9b32-4778-8a35-d17a9e5661bc": {
+ "path": "bdb71908-9b32-4778-8a35-d17a9e5661bc",
+ "cellName": "PullRequestMergeForm.vue",
+ "cellId": "bdb71908-9b32-4778-8a35-d17a9e5661bc",
+ "visible": true,
+ "parentCellId": "16ef1cae-4978-45f7-aae1-08a44fc79543"
+ },
+ "b5e61883-df8d-4f17-8f87-aa74d16df77b": {
+ "path": "b5e61883-df8d-4f17-8f87-aa74d16df77b",
+ "cellName": "Handle PR Creation Request - pull.go:L1314-1345",
+ "cellId": "b5e61883-df8d-4f17-8f87-aa74d16df77b",
+ "visible": true,
+ "parentCellId": "82a6e105-ada7-413b-987f-f44109b7b3cc"
+ },
+ "routers/web/repo/pull.go-simstep-ad391192-a9ab-42f5-8966-f6628aeded05": {
+ "path": "routers/web/repo/pull.go-simstep-ad391192-a9ab-42f5-8966-f6628aeded05",
+ "fileName": "pull.go",
+ "wiki": "The web server receives a POST request from the '/compare' page to create a new pull request. This handler validates the submitted form data (title, body, labels, assignees), resolves the head and base branches, and prepares the data structures needed to create the pull request.",
+ "cellName": "Handle PR Creation Request - pull.go:L1314-1345",
+ "cellId": "b5e61883-df8d-4f17-8f87-aa74d16df77b",
+ "visible": true,
+ "startLine": 1314,
+ "endLine": 1345,
+ "parentCellId": "82a6e105-ada7-413b-987f-f44109b7b3cc",
+ "parentPath": "routers/web/repo/pull.go"
+ },
+ "bfa1c7f3-8d1a-4ffe-a65f-b5c87c095cb7": {
+ "path": "bfa1c7f3-8d1a-4ffe-a65f-b5c87c095cb7",
+ "cellName": "Create PR in Service Layer - pull.go:L54-61",
+ "cellId": "bfa1c7f3-8d1a-4ffe-a65f-b5c87c095cb7",
+ "visible": true,
+ "parentCellId": "b0197d77-0606-4d64-af96-ce992f9de7a5"
+ },
+ "services/pull/pull.go-simstep-e5ba05df-a66c-4931-9faa-926f5a23d6ae": {
+ "path": "services/pull/pull.go-simstep-e5ba05df-a66c-4931-9faa-926f5a23d6ae",
+ "fileName": "pull.go",
+ "wiki": "This service function handles the business logic of creating a pull request. It wraps the database operations in a transaction, creates the issue and pull request records, pushes the PR's head ref to the base repository, and triggers notifications for webhooks and other services.",
+ "cellName": "Create PR in Service Layer - pull.go:L54-61",
+ "cellId": "bfa1c7f3-8d1a-4ffe-a65f-b5c87c095cb7",
+ "visible": true,
+ "startLine": 54,
+ "endLine": 61,
+ "parentCellId": "b0197d77-0606-4d64-af96-ce992f9de7a5",
+ "parentPath": "services/pull/pull.go"
+ },
+ "fee62c98-5a6d-4979-830d-4db9909c6a98": {
+ "path": "fee62c98-5a6d-4979-830d-4db9909c6a98",
+ "cellName": "Insert PR into Database - pull.go:L457-465",
+ "cellId": "fee62c98-5a6d-4979-830d-4db9909c6a98",
+ "visible": true,
+ "parentCellId": "ae4355d1-5b08-4720-b048-73c948697625"
+ },
+ "models/issues/pull.go-simstep-5092d84c-c9ea-4367-8615-a4824895029c": {
+ "path": "models/issues/pull.go-simstep-5092d84c-c9ea-4367-8615-a4824895029c",
+ "fileName": "pull.go",
+ "wiki": "This function executes the database queries to insert a new row into the `issue` table and a corresponding row into the `pull_request` table, linking them together.",
+ "cellName": "Insert PR into Database - pull.go:L457-465",
+ "cellId": "fee62c98-5a6d-4979-830d-4db9909c6a98",
+ "visible": true,
+ "startLine": 457,
+ "endLine": 465,
+ "parentCellId": "ae4355d1-5b08-4720-b048-73c948697625",
+ "parentPath": "models/issues/pull.go"
+ },
+ "a94cfe55-a85f-4f92-a28d-e58f004b12b3": {
+ "path": "a94cfe55-a85f-4f92-a28d-e58f004b12b3",
+ "cellName": "Dispatch PR Creation Notifications - notify.go:L110-119",
+ "cellId": "a94cfe55-a85f-4f92-a28d-e58f004b12b3",
+ "visible": true,
+ "parentCellId": "4ab5206e-2bb5-411c-ab1f-17a126f951b3"
+ },
+ "services/notify/notify.go-simstep-56fda301-e5b4-440a-8db2-4c4ed2bd649a": {
+ "path": "services/notify/notify.go-simstep-56fda301-e5b4-440a-8db2-4c4ed2bd649a",
+ "fileName": "notify.go",
+ "wiki": "This function acts as a dispatcher. It iterates over all registered notifiers (e.g., webhook, actions, mailer, UI notifications) and calls the `NewPullRequest` method on each one, passing along the PR data.",
+ "cellName": "Dispatch PR Creation Notifications - notify.go:L110-119",
+ "cellId": "a94cfe55-a85f-4f92-a28d-e58f004b12b3",
+ "visible": true,
+ "startLine": 110,
+ "endLine": 119,
+ "parentCellId": "4ab5206e-2bb5-411c-ab1f-17a126f951b3",
+ "parentPath": "services/notify/notify.go"
+ },
+ "a35e90c9-3fc2-4891-9dd8-d3690b17ff54": {
+ "path": "a35e90c9-3fc2-4891-9dd8-d3690b17ff54",
+ "cellName": "Update PR Status and Enqueue Check - check.go:L76-81",
+ "cellId": "a35e90c9-3fc2-4891-9dd8-d3690b17ff54",
+ "visible": true,
+ "parentCellId": "760215a8-c752-4619-ab66-274b59be1ec3"
+ },
+ "services/pull/check.go-simstep-b7c0578c-e1e5-47e4-978c-cc79753235f0": {
+ "path": "services/pull/check.go-simstep-b7c0578c-e1e5-47e4-978c-cc79753235f0",
+ "fileName": "check.go",
+ "wiki": "This function first updates the pull request's status in the database to `PullRequestStatusChecking`. It then pushes the pull request's ID onto a queue that is processed by background workers to perform the merge check.",
+ "cellName": "Update PR Status and Enqueue Check - check.go:L76-81",
+ "cellId": "a35e90c9-3fc2-4891-9dd8-d3690b17ff54",
+ "visible": true,
+ "startLine": 76,
+ "endLine": 81,
+ "parentCellId": "760215a8-c752-4619-ab66-274b59be1ec3",
+ "parentPath": "services/pull/check.go"
+ },
+ "1f9b64f0-5508-4177-887f-14556a0628b0": {
+ "path": "1f9b64f0-5508-4177-887f-14556a0628b0",
+ "cellName": "Handle PR Merge Request - pull.go:L1016-1024",
+ "cellId": "1f9b64f0-5508-4177-887f-14556a0628b0",
+ "visible": true,
+ "parentCellId": "82a6e105-ada7-413b-987f-f44109b7b3cc"
+ },
+ "routers/web/repo/pull.go-simstep-7f11138f-6ee9-4918-b3ca-78da3871caea": {
+ "path": "routers/web/repo/pull.go-simstep-7f11138f-6ee9-4918-b3ca-78da3871caea",
+ "fileName": "pull.go",
+ "wiki": "The web server receives a POST request to merge a pull request. This handler validates the user's permissions, confirms the PR is in a mergeable state, and retrieves the merge strategy and commit message from the submitted form.",
+ "cellName": "Handle PR Merge Request - pull.go:L1016-1024",
+ "cellId": "1f9b64f0-5508-4177-887f-14556a0628b0",
+ "visible": true,
+ "startLine": 1016,
+ "endLine": 1024,
+ "parentCellId": "82a6e105-ada7-413b-987f-f44109b7b3cc",
+ "parentPath": "routers/web/repo/pull.go"
+ },
+ "882a8fca-a108-4651-abb9-20a43eb9f64d": {
+ "path": "882a8fca-a108-4651-abb9-20a43eb9f64d",
+ "cellName": "Execute Merge in Service Layer - merge.go:L219-227",
+ "cellId": "882a8fca-a108-4651-abb9-20a43eb9f64d",
+ "visible": true,
+ "parentCellId": "8c9ebe99-1c96-46af-b937-545322eb5328"
+ },
+ "services/pull/merge.go-simstep-1551889d-7fcd-4b22-9962-d4174a18ddd6": {
+ "path": "services/pull/merge.go-simstep-1551889d-7fcd-4b22-9962-d4174a18ddd6",
+ "fileName": "merge.go",
+ "wiki": "This function orchestrates the merge process. It checks branch protections, prepares a temporary repository, performs the actual Git merge operation based on the selected style, pushes the result to the base branch, and finally updates the PR's status in the database.",
+ "cellName": "Execute Merge in Service Layer - merge.go:L219-227",
+ "cellId": "882a8fca-a108-4651-abb9-20a43eb9f64d",
+ "visible": true,
+ "startLine": 219,
+ "endLine": 227,
+ "parentCellId": "8c9ebe99-1c96-46af-b937-545322eb5328",
+ "parentPath": "services/pull/merge.go"
+ },
+ "0ef482fa-8bc1-446d-baa4-fded92d124f3": {
+ "path": "0ef482fa-8bc1-446d-baa4-fded92d124f3",
+ "cellName": "Update PR Status to Merged - merge.go:L669-679",
+ "cellId": "0ef482fa-8bc1-446d-baa4-fded92d124f3",
+ "visible": true,
+ "parentCellId": "8c9ebe99-1c96-46af-b937-545322eb5328"
+ },
+ "services/pull/merge.go-simstep-1b760baa-c919-4660-9e0c-b6137e1c2721": {
+ "path": "services/pull/merge.go-simstep-1b760baa-c919-4660-9e0c-b6137e1c2721",
+ "fileName": "merge.go",
+ "wiki": "This function updates the pull request's record in the database. It sets `has_merged` to true, records the `merged_commit_id`, `merger_id`, and `merged_unix` timestamp. It also closes the associated issue.",
+ "cellName": "Update PR Status to Merged - merge.go:L669-679",
+ "cellId": "0ef482fa-8bc1-446d-baa4-fded92d124f3",
+ "visible": true,
+ "startLine": 669,
+ "endLine": 679,
+ "parentCellId": "8c9ebe99-1c96-46af-b937-545322eb5328",
+ "parentPath": "services/pull/merge.go"
+ },
+ "b66f2694-f430-4fd0-808a-5e5279c50dd7": {
+ "path": "b66f2694-f430-4fd0-808a-5e5279c50dd7",
+ "cellName": "Dispatch Merge Notifications - notify.go:L91-95",
+ "cellId": "b66f2694-f430-4fd0-808a-5e5279c50dd7",
+ "visible": true,
+ "parentCellId": "4ab5206e-2bb5-411c-ab1f-17a126f951b3"
+ },
+ "services/notify/notify.go-simstep-0a08a7a7-4813-4700-9b6b-0787163e9fd9": {
+ "path": "services/notify/notify.go-simstep-0a08a7a7-4813-4700-9b6b-0787163e9fd9",
+ "fileName": "notify.go",
+ "wiki": "This function dispatches the merge event to all registered notifiers (e.g., webhook, actions). Each notifier will then handle the event, such as sending a 'pull request closed' webhook payload with a 'merged' state.",
+ "cellName": "Dispatch Merge Notifications - notify.go:L91-95",
+ "cellId": "b66f2694-f430-4fd0-808a-5e5279c50dd7",
+ "visible": true,
+ "startLine": 91,
+ "endLine": 95,
+ "parentCellId": "4ab5206e-2bb5-411c-ab1f-17a126f951b3",
+ "parentPath": "services/notify/notify.go"
+ },
+ "88810df3-fc69-4b7f-b6c8-e46446ce3696": {
+ "path": "88810df3-fc69-4b7f-b6c8-e46446ce3696",
+ "cellName": "Data Transmission:\nCall Pull\nRequest Service",
+ "cellId": "88810df3-fc69-4b7f-b6c8-e46446ce3696",
+ "visible": true
+ },
+ "generated-edge-simstep-4cab6466-093b-43c9-88ad-28484e60d6c4-88810df3-fc69-4b7f-b6c8-e46446ce3696": {
+ "path": "generated-edge-simstep-4cab6466-093b-43c9-88ad-28484e60d6c4-88810df3-fc69-4b7f-b6c8-e46446ce3696",
+ "fileName": "pull.go",
+ "cellName": "Data Transmission: Call Pull Request Service",
+ "cellId": "88810df3-fc69-4b7f-b6c8-e46446ce3696",
+ "visible": true,
+ "startLine": 1345,
+ "endLine": 1345,
+ "parentPath": "routers/web/repo/pull.go"
+ },
+ "aaadac8d-1aba-451a-bba4-794a4221c886": {
+ "path": "aaadac8d-1aba-451a-bba4-794a4221c886",
+ "cellName": "Data Transmission:\nPrepare DB\nRecords",
+ "cellId": "aaadac8d-1aba-451a-bba4-794a4221c886",
+ "visible": true
+ },
+ "generated-edge-simstep-0ab8dd7f-05f5-4462-bf64-1985f392f78d-aaadac8d-1aba-451a-bba4-794a4221c886": {
+ "path": "generated-edge-simstep-0ab8dd7f-05f5-4462-bf64-1985f392f78d-aaadac8d-1aba-451a-bba4-794a4221c886",
+ "fileName": "pull.go",
+ "cellName": "Data Transmission: Prepare DB Records",
+ "cellId": "aaadac8d-1aba-451a-bba4-794a4221c886",
+ "visible": true,
+ "startLine": 105,
+ "endLine": 105,
+ "parentPath": "services/pull/pull.go"
+ },
+ "8fd4a69e-be65-4ade-9ced-047c7ebd6c0d": {
+ "path": "8fd4a69e-be65-4ade-9ced-047c7ebd6c0d",
+ "cellName": "Data Transmission:\nTrigger Notifications",
+ "cellId": "8fd4a69e-be65-4ade-9ced-047c7ebd6c0d",
+ "visible": true
+ },
+ "generated-edge-simstep-22b464f6-b543-4ac2-8b6b-e26efa91e1b5-8fd4a69e-be65-4ade-9ced-047c7ebd6c0d": {
+ "path": "generated-edge-simstep-22b464f6-b543-4ac2-8b6b-e26efa91e1b5-8fd4a69e-be65-4ade-9ced-047c7ebd6c0d",
+ "fileName": "pull.go",
+ "cellName": "Data Transmission: Trigger Notifications",
+ "cellId": "8fd4a69e-be65-4ade-9ced-047c7ebd6c0d",
+ "visible": true,
+ "startLine": 161,
+ "endLine": 161,
+ "parentPath": "models/issues/pull.go"
+ },
+ "af2b35e5-e443-42dc-8bef-a9183a7c13f8": {
+ "path": "af2b35e5-e443-42dc-8bef-a9183a7c13f8",
+ "cellName": "Data Transmission:\nQueue Mergability\nCheck",
+ "cellId": "af2b35e5-e443-42dc-8bef-a9183a7c13f8",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3"
+ },
+ "generated-edge-simstep-b564efb1-92b6-4978-8c83-c278707dc375-af2b35e5-e443-42dc-8bef-a9183a7c13f8": {
+ "path": "generated-edge-simstep-b564efb1-92b6-4978-8c83-c278707dc375-af2b35e5-e443-42dc-8bef-a9183a7c13f8",
+ "fileName": "notify.go",
+ "cellName": "Data Transmission: Queue Mergability Check",
+ "cellId": "af2b35e5-e443-42dc-8bef-a9183a7c13f8",
+ "visible": true,
+ "startLine": 130,
+ "endLine": 130,
+ "parentPath": "services/notify/notify.go"
+ },
+ "52c36476-f770-4a34-b3db-87f7f134802f": {
+ "path": "52c36476-f770-4a34-b3db-87f7f134802f",
+ "cellName": "User Interaction:\nTriggers Merge",
+ "cellId": "52c36476-f770-4a34-b3db-87f7f134802f",
+ "visible": true
+ },
+ "generated-edge-simstep-a12e4843-9815-455c-a6d8-d62a3022639b-52c36476-f770-4a34-b3db-87f7f134802f": {
+ "path": "generated-edge-simstep-a12e4843-9815-455c-a6d8-d62a3022639b-52c36476-f770-4a34-b3db-87f7f134802f",
+ "fileName": "check.go",
+ "cellName": "User Interaction: Triggers Merge",
+ "cellId": "52c36476-f770-4a34-b3db-87f7f134802f",
+ "visible": true,
+ "startLine": 4,
+ "endLine": 12,
+ "parentPath": "services/pull/check.go"
+ },
+ "a44ff35a-ae0f-4846-99c3-dcc26c469dff": {
+ "path": "a44ff35a-ae0f-4846-99c3-dcc26c469dff",
+ "cellName": "Data Transmission:\nCall Merge\nService",
+ "cellId": "a44ff35a-ae0f-4846-99c3-dcc26c469dff",
+ "visible": true
+ },
+ "generated-edge-simstep-5804dffe-4772-4a09-a711-15938dea8430-a44ff35a-ae0f-4846-99c3-dcc26c469dff": {
+ "path": "generated-edge-simstep-5804dffe-4772-4a09-a711-15938dea8430-a44ff35a-ae0f-4846-99c3-dcc26c469dff",
+ "fileName": "pull.go",
+ "cellName": "Data Transmission: Call Merge Service",
+ "cellId": "a44ff35a-ae0f-4846-99c3-dcc26c469dff",
+ "visible": true,
+ "startLine": 1089,
+ "endLine": 1089,
+ "parentPath": "routers/web/repo/pull.go"
+ },
+ "8dfd279d-9e21-4855-b71d-bf3e167eab19": {
+ "path": "8dfd279d-9e21-4855-b71d-bf3e167eab19",
+ "cellName": "Data Transmission:\nPass Merged\nCommit ID\nfor DB\nUpdate",
+ "cellId": "8dfd279d-9e21-4855-b71d-bf3e167eab19",
+ "visible": true,
+ "parentCellId": "8c9ebe99-1c96-46af-b937-545322eb5328"
+ },
+ "generated-edge-simstep-b2b55ac7-e6cf-45f1-a94f-edf2b463bcaf-8dfd279d-9e21-4855-b71d-bf3e167eab19": {
+ "path": "generated-edge-simstep-b2b55ac7-e6cf-45f1-a94f-edf2b463bcaf-8dfd279d-9e21-4855-b71d-bf3e167eab19",
+ "fileName": "merge.go",
+ "cellName": "Data Transmission: Pass Merged Commit ID for DB Update",
+ "cellId": "8dfd279d-9e21-4855-b71d-bf3e167eab19",
+ "visible": true,
+ "startLine": 286,
+ "endLine": 286,
+ "parentPath": "services/pull/merge.go"
+ },
+ "c271830f-aca0-4976-b30a-49c7480d2d5f": {
+ "path": "c271830f-aca0-4976-b30a-49c7480d2d5f",
+ "cellName": "Data Transmission:\nTrigger Merge\nNotifications",
+ "cellId": "c271830f-aca0-4976-b30a-49c7480d2d5f",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3"
+ },
+ "generated-edge-simstep-5c7c61d7-c7a3-42e5-8991-f30f383d00da-c271830f-aca0-4976-b30a-49c7480d2d5f": {
+ "path": "generated-edge-simstep-5c7c61d7-c7a3-42e5-8991-f30f383d00da-c271830f-aca0-4976-b30a-49c7480d2d5f",
+ "fileName": "merge.go",
+ "cellName": "Data Transmission: Trigger Merge Notifications",
+ "cellId": "c271830f-aca0-4976-b30a-49c7480d2d5f",
+ "visible": true,
+ "startLine": 287,
+ "endLine": 287,
+ "parentPath": "services/pull/merge.go"
+ },
+ "c66d3460-05f8-48fe-aae7-80531064bdd7": {
+ "path": "c66d3460-05f8-48fe-aae7-80531064bdd7",
+ "cellName": "issue",
+ "cellId": "c66d3460-05f8-48fe-aae7-80531064bdd7",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3"
+ },
+ "1d625953-5a4b-4e1d-9f8a-a3dbc41bae6b": {
+ "path": "1d625953-5a4b-4e1d-9f8a-a3dbc41bae6b",
+ "cellName": "issue.go",
+ "cellId": "1d625953-5a4b-4e1d-9f8a-a3dbc41bae6b",
+ "visible": true,
+ "parentCellId": "c66d3460-05f8-48fe-aae7-80531064bdd7"
+ },
+ "aa6e7784-13b0-4fc8-a253-363ad293bcb0": {
+ "path": "aa6e7784-13b0-4fc8-a253-363ad293bcb0",
+ "cellName": "issue.go",
+ "cellId": "aa6e7784-13b0-4fc8-a253-363ad293bcb0",
+ "visible": true,
+ "parentCellId": "92701556-5fde-4ec1-b80b-12ec36212aad"
+ },
+ "e2b305da-d0ea-47ad-aac6-67d3497ccb15": {
+ "path": "e2b305da-d0ea-47ad-aac6-67d3497ccb15",
+ "cellName": "issue_new.go",
+ "cellId": "e2b305da-d0ea-47ad-aac6-67d3497ccb15",
+ "visible": true,
+ "parentCellId": "e784820c-8d2c-4480-8888-bf60f961f4b7"
+ },
+ "0fdc02d5-1b92-4a8c-91f5-7a43eae87236": {
+ "path": "0fdc02d5-1b92-4a8c-91f5-7a43eae87236",
+ "cellName": "Web: Handle New Issue Form Submission - issue_new.go:L130-240",
+ "cellId": "0fdc02d5-1b92-4a8c-91f5-7a43eae87236",
+ "visible": true,
+ "parentCellId": "e2b305da-d0ea-47ad-aac6-67d3497ccb15"
+ },
+ "routers/web/repo/issue_new.go-simstep-ffce7d78-1ab1-49b1-b495-1416b1eadfc9": {
+ "path": "routers/web/repo/issue_new.go-simstep-ffce7d78-1ab1-49b1-b495-1416b1eadfc9",
+ "fileName": "issue_new.go",
+ "wiki": "A user submits the 'New Issue' form via a POST request. The `NewIssuePost` handler in the web router receives this request, validates the submitted form data (title, content, labels, assignees), and prepares the data for the issue creation service.",
+ "cellName": "Web: Handle New Issue Form Submission - issue_new.go:L130-240",
+ "cellId": "0fdc02d5-1b92-4a8c-91f5-7a43eae87236",
+ "visible": true,
+ "startLine": 130,
+ "endLine": 240,
+ "parentCellId": "e2b305da-d0ea-47ad-aac6-67d3497ccb15",
+ "parentPath": "routers/web/repo/issue_new.go"
+ },
+ "c5e558c9-f7f1-48c0-b35d-20852848a419": {
+ "path": "c5e558c9-f7f1-48c0-b35d-20852848a419",
+ "cellName": "Service: Orchestrate Issue Creation - issue.go:L142-242",
+ "cellId": "c5e558c9-f7f1-48c0-b35d-20852848a419",
+ "visible": true,
+ "parentCellId": "1d625953-5a4b-4e1d-9f8a-a3dbc41bae6b"
+ },
+ "services/issue/issue.go-simstep-23e3c1d3-be55-497a-ab55-03195d821e10": {
+ "path": "services/issue/issue.go-simstep-23e3c1d3-be55-497a-ab55-03195d821e10",
+ "fileName": "issue.go",
+ "wiki": "The `NewIssue` service function manages the entire creation process. It starts a database transaction, populates the issue object with necessary details, and calls the model layer to persist the data. It also handles creating the initial comment from the issue content.",
+ "cellName": "Service: Orchestrate Issue Creation - issue.go:L142-242",
+ "cellId": "c5e558c9-f7f1-48c0-b35d-20852848a419",
+ "visible": true,
+ "startLine": 142,
+ "endLine": 242,
+ "parentCellId": "1d625953-5a4b-4e1d-9f8a-a3dbc41bae6b",
+ "parentPath": "services/issue/issue.go"
+ },
+ "97fb5926-0c38-47ad-8591-399006209210": {
+ "path": "97fb5926-0c38-47ad-8591-399006209210",
+ "cellName": "Database: Insert Issue Record - issue.go:L768-794",
+ "cellId": "97fb5926-0c38-47ad-8591-399006209210",
+ "visible": true,
+ "parentCellId": "aa6e7784-13b0-4fc8-a253-363ad293bcb0"
+ },
+ "models/issues/issue.go-simstep-77c253a8-80a6-4e84-965f-c37320babc81": {
+ "path": "models/issues/issue.go-simstep-77c253a8-80a6-4e84-965f-c37320babc81",
+ "fileName": "issue.go",
+ "wiki": "The `insertIssue` function (called by `InsertIssues`) executes the database queries to create the new issue. It inserts the main record into the `issue` table and then inserts associated records for labels into the `issue_label` table within a transaction.",
+ "cellName": "Database: Insert Issue Record - issue.go:L768-794",
+ "cellId": "97fb5926-0c38-47ad-8591-399006209210",
+ "visible": true,
+ "startLine": 768,
+ "endLine": 794,
+ "parentCellId": "aa6e7784-13b0-4fc8-a253-363ad293bcb0",
+ "parentPath": "models/issues/issue.go"
+ },
+ "efbd431a-4332-4576-8367-04b50ee53a2a": {
+ "path": "efbd431a-4332-4576-8367-04b50ee53a2a",
+ "cellName": "Webhook: Prepare and Send Notification - notifier.go:L275-294",
+ "cellId": "efbd431a-4332-4576-8367-04b50ee53a2a",
+ "visible": true,
+ "parentCellId": "ee3c4395-ec52-49ae-b5f6-c0564e51e17f"
+ },
+ "services/webhook/notifier.go-simstep-756e8552-8547-4936-982a-f6adb7aefd97": {
+ "path": "services/webhook/notifier.go-simstep-756e8552-8547-4936-982a-f6adb7aefd97",
+ "fileName": "notifier.go",
+ "wiki": "The `webhookNotifier.NewIssue` function is triggered. It loads the necessary repository and user data, constructs an `api.IssuePayload` containing information about the new issue, and prepares it for delivery to all matching webhooks.",
+ "cellName": "Webhook: Prepare and Send Notification - notifier.go:L275-294",
+ "cellId": "efbd431a-4332-4576-8367-04b50ee53a2a",
+ "visible": true,
+ "startLine": 275,
+ "endLine": 294,
+ "parentCellId": "ee3c4395-ec52-49ae-b5f6-c0564e51e17f",
+ "parentPath": "services/webhook/notifier.go"
+ },
+ "bb14c890-2c21-47a0-9a96-ba933c84c606": {
+ "path": "bb14c890-2c21-47a0-9a96-ba933c84c606",
+ "cellName": "Web: Redirect User to New Issue Page - issue_new.go:L252-253",
+ "cellId": "bb14c890-2c21-47a0-9a96-ba933c84c606",
+ "visible": true,
+ "parentCellId": "e2b305da-d0ea-47ad-aac6-67d3497ccb15"
+ },
+ "routers/web/repo/issue_new.go-simstep-97731684-60e8-4305-9098-6027b64190bd": {
+ "path": "routers/web/repo/issue_new.go-simstep-97731684-60e8-4305-9098-6027b64190bd",
+ "fileName": "issue_new.go",
+ "wiki": "The `NewIssuePost` handler, having successfully created the issue, sends an HTTP 302 Redirect response to the user's browser, directing them to the URL of the newly created issue.",
+ "cellName": "Web: Redirect User to New Issue Page - issue_new.go:L252-253",
+ "cellId": "bb14c890-2c21-47a0-9a96-ba933c84c606",
+ "visible": true,
+ "startLine": 252,
+ "endLine": 253,
+ "parentCellId": "e2b305da-d0ea-47ad-aac6-67d3497ccb15",
+ "parentPath": "routers/web/repo/issue_new.go"
+ },
+ "c8cdf497-8db8-4cce-b1b2-57765ae78e03": {
+ "path": "c8cdf497-8db8-4cce-b1b2-57765ae78e03",
+ "cellName": "Data Flow:\nPass Issue\nData to\nService",
+ "cellId": "c8cdf497-8db8-4cce-b1b2-57765ae78e03",
+ "visible": true
+ },
+ "generated-edge-simstep-91a514b9-1466-4433-93a9-a1ff6c6c8f37-c8cdf497-8db8-4cce-b1b2-57765ae78e03": {
+ "path": "generated-edge-simstep-91a514b9-1466-4433-93a9-a1ff6c6c8f37-c8cdf497-8db8-4cce-b1b2-57765ae78e03",
+ "fileName": "issue_new.go",
+ "cellName": "Data Flow: Pass Issue Data to Service",
+ "cellId": "c8cdf497-8db8-4cce-b1b2-57765ae78e03",
+ "visible": true,
+ "startLine": 240,
+ "endLine": 240,
+ "parentPath": "routers/web/repo/issue_new.go"
+ },
+ "1da93353-da10-4d79-b4a5-5e45280dd1e8": {
+ "path": "1da93353-da10-4d79-b4a5-5e45280dd1e8",
+ "cellName": "Data Flow:\nPass Issue\nObject to\nModel",
+ "cellId": "1da93353-da10-4d79-b4a5-5e45280dd1e8",
+ "visible": true
+ },
+ "generated-edge-simstep-dd1c8491-415a-470b-bd31-573e7f2383ff-1da93353-da10-4d79-b4a5-5e45280dd1e8": {
+ "path": "generated-edge-simstep-dd1c8491-415a-470b-bd31-573e7f2383ff-1da93353-da10-4d79-b4a5-5e45280dd1e8",
+ "fileName": "issue.go",
+ "cellName": "Data Flow: Pass Issue Object to Model",
+ "cellId": "1da93353-da10-4d79-b4a5-5e45280dd1e8",
+ "visible": true,
+ "startLine": 161,
+ "endLine": 161,
+ "parentPath": "services/issue/issue.go"
+ },
+ "10a06681-af82-48d0-b42b-52498d398caf": {
+ "path": "10a06681-af82-48d0-b42b-52498d398caf",
+ "cellName": "Event: Notify\nWebhook Service\nof New\nIssue",
+ "cellId": "10a06681-af82-48d0-b42b-52498d398caf",
+ "visible": true
+ },
+ "generated-edge-simstep-202f0b40-d7cf-40d6-b794-229b0f38d1b4-10a06681-af82-48d0-b42b-52498d398caf": {
+ "path": "generated-edge-simstep-202f0b40-d7cf-40d6-b794-229b0f38d1b4-10a06681-af82-48d0-b42b-52498d398caf",
+ "fileName": "issue.go",
+ "cellName": "Event: Notify Webhook Service of New Issue",
+ "cellId": "10a06681-af82-48d0-b42b-52498d398caf",
+ "visible": true,
+ "startLine": 221,
+ "endLine": 221,
+ "parentPath": "models/issues/issue.go"
+ },
+ "fa2e1092-e208-4362-b048-ee6ad9443576": {
+ "path": "fa2e1092-e208-4362-b048-ee6ad9443576",
+ "cellName": "Data Flow:\nReturn to\nWeb Handler",
+ "cellId": "fa2e1092-e208-4362-b048-ee6ad9443576",
+ "visible": true
+ },
+ "generated-edge-simstep-179e5cc9-bbc1-4f87-a1c7-c19324545695-fa2e1092-e208-4362-b048-ee6ad9443576": {
+ "path": "generated-edge-simstep-179e5cc9-bbc1-4f87-a1c7-c19324545695-fa2e1092-e208-4362-b048-ee6ad9443576",
+ "fileName": "notifier.go",
+ "cellName": "Data Flow: Return to Web Handler",
+ "cellId": "fa2e1092-e208-4362-b048-ee6ad9443576",
+ "visible": true,
+ "startLine": 241,
+ "endLine": 241,
+ "parentPath": "services/webhook/notifier.go"
+ },
+ "c9e2608a-433c-4d04-9c8c-03984aa24fcc": {
+ "path": "c9e2608a-433c-4d04-9c8c-03984aa24fcc",
+ "cellName": "modules",
+ "cellId": "c9e2608a-433c-4d04-9c8c-03984aa24fcc",
+ "visible": true
+ },
+ "0f64dd37-6573-4d47-a06a-435f9ac9acac": {
+ "path": "0f64dd37-6573-4d47-a06a-435f9ac9acac",
+ "cellName": "actions",
+ "cellId": "0f64dd37-6573-4d47-a06a-435f9ac9acac",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3"
+ },
+ "4c93880a-1d09-4b55-ac7b-89233950cc5c": {
+ "path": "4c93880a-1d09-4b55-ac7b-89233950cc5c",
+ "cellName": "actions",
+ "cellId": "4c93880a-1d09-4b55-ac7b-89233950cc5c",
+ "visible": true,
+ "parentCellId": "c9e2608a-433c-4d04-9c8c-03984aa24fcc"
+ },
+ "2877baa9-2dbd-44c3-98e0-684becf46b08": {
+ "path": "2877baa9-2dbd-44c3-98e0-684becf46b08",
+ "cellName": "actions",
+ "cellId": "2877baa9-2dbd-44c3-98e0-684becf46b08",
+ "visible": true,
+ "parentCellId": "9c37213c-3c3a-45d9-acff-87fc3ab9c825"
+ },
+ "807c2016-8e41-4357-b295-11ccb53c3eae": {
+ "path": "807c2016-8e41-4357-b295-11ccb53c3eae",
+ "cellName": "api",
+ "cellId": "807c2016-8e41-4357-b295-11ccb53c3eae",
+ "visible": true,
+ "parentCellId": "f88f08c3-0e93-4de5-b142-4ff1a55f4c7b"
+ },
+ "083eae6c-89fc-462f-a945-a15d57a9cc9e": {
+ "path": "083eae6c-89fc-462f-a945-a15d57a9cc9e",
+ "cellName": "notifier_helper.go",
+ "cellId": "083eae6c-89fc-462f-a945-a15d57a9cc9e",
+ "visible": true,
+ "parentCellId": "0f64dd37-6573-4d47-a06a-435f9ac9acac"
+ },
+ "01eacf2c-6451-40c4-b950-52dfbd738a90": {
+ "path": "01eacf2c-6451-40c4-b950-52dfbd738a90",
+ "cellName": "job_emitter.go",
+ "cellId": "01eacf2c-6451-40c4-b950-52dfbd738a90",
+ "visible": true,
+ "parentCellId": "0f64dd37-6573-4d47-a06a-435f9ac9acac"
+ },
+ "0779d0ad-6911-459b-9a90-9a60522f1037": {
+ "path": "0779d0ad-6911-459b-9a90-9a60522f1037",
+ "cellName": "task.go",
+ "cellId": "0779d0ad-6911-459b-9a90-9a60522f1037",
+ "visible": true,
+ "parentCellId": "0f64dd37-6573-4d47-a06a-435f9ac9acac"
+ },
+ "55410235-e25a-43f1-9e9e-0c4d56846a85": {
+ "path": "55410235-e25a-43f1-9e9e-0c4d56846a85",
+ "cellName": "commit_status.go",
+ "cellId": "55410235-e25a-43f1-9e9e-0c4d56846a85",
+ "visible": true,
+ "parentCellId": "0f64dd37-6573-4d47-a06a-435f9ac9acac"
+ },
+ "4b8c137f-4ebc-4ff7-9fa6-32c4ea0a4124": {
+ "path": "4b8c137f-4ebc-4ff7-9fa6-32c4ea0a4124",
+ "cellName": "workflows.go",
+ "cellId": "4b8c137f-4ebc-4ff7-9fa6-32c4ea0a4124",
+ "visible": true,
+ "parentCellId": "4c93880a-1d09-4b55-ac7b-89233950cc5c"
+ },
+ "0a3a4f48-3de3-4279-a764-3905209adebb": {
+ "path": "0a3a4f48-3de3-4279-a764-3905209adebb",
+ "cellName": "run.go",
+ "cellId": "0a3a4f48-3de3-4279-a764-3905209adebb",
+ "visible": true,
+ "parentCellId": "2877baa9-2dbd-44c3-98e0-684becf46b08"
+ },
+ "6d3c2152-7875-4098-ab7b-890f6113e98f": {
+ "path": "6d3c2152-7875-4098-ab7b-890f6113e98f",
+ "cellName": "actions",
+ "cellId": "6d3c2152-7875-4098-ab7b-890f6113e98f",
+ "visible": true,
+ "parentCellId": "807c2016-8e41-4357-b295-11ccb53c3eae"
+ },
+ "be32ba0f-1fd7-4703-b379-f22b27c2147f": {
+ "path": "be32ba0f-1fd7-4703-b379-f22b27c2147f",
+ "cellName": "runner",
+ "cellId": "be32ba0f-1fd7-4703-b379-f22b27c2147f",
+ "visible": true,
+ "parentCellId": "6d3c2152-7875-4098-ab7b-890f6113e98f"
+ },
+ "11629953-2d33-4973-82aa-1587607afd89": {
+ "path": "11629953-2d33-4973-82aa-1587607afd89",
+ "cellName": "runner.go",
+ "cellId": "11629953-2d33-4973-82aa-1587607afd89",
+ "visible": true,
+ "parentCellId": "be32ba0f-1fd7-4703-b379-f22b27c2147f"
+ },
+ "d022d6fa-5c86-4fa0-a0be-31236a28c8d4": {
+ "path": "d022d6fa-5c86-4fa0-a0be-31236a28c8d4",
+ "cellName": "Git Push Event Trigger - notifier_helper.go:L320-395",
+ "cellId": "d022d6fa-5c86-4fa0-a0be-31236a28c8d4",
+ "visible": true,
+ "parentCellId": "083eae6c-89fc-462f-a945-a15d57a9cc9e"
+ },
+ "services/actions/notifier_helper.go-simstep-54c475cd-aa1c-4381-9d38-a54792886af9": {
+ "path": "services/actions/notifier_helper.go-simstep-54c475cd-aa1c-4381-9d38-a54792886af9",
+ "fileName": "notifier_helper.go",
+ "wiki": "A git push event triggers the notification system, which in turn invokes the actions service to handle the event. This is the entry point for detecting and running workflows.",
+ "cellName": "Git Push Event Trigger - notifier_helper.go:L320-395",
+ "cellId": "d022d6fa-5c86-4fa0-a0be-31236a28c8d4",
+ "visible": true,
+ "startLine": 320,
+ "endLine": 395,
+ "parentCellId": "083eae6c-89fc-462f-a945-a15d57a9cc9e",
+ "parentPath": "services/actions/notifier_helper.go"
+ },
+ "d1143895-5d48-4593-813f-b281b6145fdb": {
+ "path": "d1143895-5d48-4593-813f-b281b6145fdb",
+ "cellName": "Create Action Run and Jobs - run.go:L284-358",
+ "cellId": "d1143895-5d48-4593-813f-b281b6145fdb",
+ "visible": true,
+ "parentCellId": "0a3a4f48-3de3-4279-a764-3905209adebb"
+ },
+ "models/actions/run.go-simstep-c96bb1be-02e4-4023-bc30-19d4ba081da8": {
+ "path": "models/actions/run.go-simstep-c96bb1be-02e4-4023-bc30-19d4ba081da8",
+ "fileName": "run.go",
+ "wiki": "Based on the parsed workflow file, an `ActionRun` record is created for the overall workflow, and individual `ActionRunJob` records are created for each job defined within it. These are persisted to the database in a transaction.",
+ "cellName": "Create Action Run and Jobs - run.go:L284-358",
+ "cellId": "d1143895-5d48-4593-813f-b281b6145fdb",
+ "visible": true,
+ "startLine": 284,
+ "endLine": 358,
+ "parentCellId": "0a3a4f48-3de3-4279-a764-3905209adebb",
+ "parentPath": "models/actions/run.go"
+ },
+ "cf18404b-f3c3-4e0a-ba42-80c0b9eee16f": {
+ "path": "cf18404b-f3c3-4e0a-ba42-80c0b9eee16f",
+ "cellName": "Job Emitter Checks Dependencies - job_emitter.go:L48-92",
+ "cellId": "cf18404b-f3c3-4e0a-ba42-80c0b9eee16f",
+ "visible": true,
+ "parentCellId": "01eacf2c-6451-40c4-b950-52dfbd738a90"
+ },
+ "services/actions/job_emitter.go-simstep-b2c4908e-d37d-4606-a880-31babd962d71": {
+ "path": "services/actions/job_emitter.go-simstep-b2c4908e-d37d-4606-a880-31babd962d71",
+ "fileName": "job_emitter.go",
+ "wiki": "A background worker picks up the Run ID from the queue. It inspects all jobs for that run, determines which ones have their `needs` dependencies satisfied, and updates their status to `waiting` so they can be picked up by a runner.",
+ "cellName": "Job Emitter Checks Dependencies - job_emitter.go:L48-92",
+ "cellId": "cf18404b-f3c3-4e0a-ba42-80c0b9eee16f",
+ "visible": true,
+ "startLine": 48,
+ "endLine": 92,
+ "parentCellId": "01eacf2c-6451-40c4-b950-52dfbd738a90",
+ "parentPath": "services/actions/job_emitter.go"
+ },
+ "4d3a7ffc-e4d8-43b4-b098-a7ef886630ca": {
+ "path": "4d3a7ffc-e4d8-43b4-b098-a7ef886630ca",
+ "cellName": "Runner Fetches Task - task.go:L18-113",
+ "cellId": "4d3a7ffc-e4d8-43b4-b098-a7ef886630ca",
+ "visible": true,
+ "parentCellId": "0779d0ad-6911-459b-9a90-9a60522f1037"
+ },
+ "services/actions/task.go-simstep-01f6079d-0a18-402a-9778-a571b661a3e6": {
+ "path": "services/actions/task.go-simstep-01f6079d-0a18-402a-9778-a571b661a3e6",
+ "fileName": "task.go",
+ "wiki": "A self-hosted runner polls the Gitea instance for available tasks. The server finds a `waiting` job that matches the runner's labels (e.g., 'ubuntu-latest'), creates an `ActionTask` for it, and assigns it to the runner.",
+ "cellName": "Runner Fetches Task - task.go:L18-113",
+ "cellId": "4d3a7ffc-e4d8-43b4-b098-a7ef886630ca",
+ "visible": true,
+ "startLine": 18,
+ "endLine": 113,
+ "parentCellId": "0779d0ad-6911-459b-9a90-9a60522f1037",
+ "parentPath": "services/actions/task.go"
+ },
+ "f4a68738-6a58-4424-8090-85b1f5d14d23": {
+ "path": "f4a68738-6a58-4424-8090-85b1f5d14d23",
+ "cellName": "Runner Reports Job Completion - runner.go:L165-199",
+ "cellId": "f4a68738-6a58-4424-8090-85b1f5d14d23",
+ "visible": true,
+ "parentCellId": "11629953-2d33-4973-82aa-1587607afd89"
+ },
+ "routers/api/actions/runner/runner.go-simstep-a9a8aad6-c51e-4d1d-83bd-1a716cc18de1": {
+ "path": "routers/api/actions/runner/runner.go-simstep-a9a8aad6-c51e-4d1d-83bd-1a716cc18de1",
+ "fileName": "runner.go",
+ "wiki": "After executing all steps, the runner reports the final job status back to Gitea via an RPC call. This endpoint handles updating the task and the associated job.",
+ "cellName": "Runner Reports Job Completion - runner.go:L165-199",
+ "cellId": "f4a68738-6a58-4424-8090-85b1f5d14d23",
+ "visible": true,
+ "startLine": 165,
+ "endLine": 199,
+ "parentCellId": "11629953-2d33-4973-82aa-1587607afd89",
+ "parentPath": "routers/api/actions/runner/runner.go"
+ },
+ "54715d5b-dbe6-405c-b591-0c4fc4f211eb": {
+ "path": "54715d5b-dbe6-405c-b591-0c4fc4f211eb",
+ "cellName": "Update Commit Status - commit_status.go:L26-40",
+ "cellId": "54715d5b-dbe6-405c-b591-0c4fc4f211eb",
+ "visible": true,
+ "parentCellId": "55410235-e25a-43f1-9e9e-0c4d56846a85"
+ },
+ "services/actions/commit_status.go-simstep-1850ee33-6937-4414-8809-657c49ab8c24": {
+ "path": "services/actions/commit_status.go-simstep-1850ee33-6937-4414-8809-657c49ab8c24",
+ "fileName": "commit_status.go",
+ "wiki": "The system updates the commit status for the specific commit SHA of the workflow run. This provides visual feedback in the Gitea UI (e.g., a green checkmark on the commit list).",
+ "cellName": "Update Commit Status - commit_status.go:L26-40",
+ "cellId": "54715d5b-dbe6-405c-b591-0c4fc4f211eb",
+ "visible": true,
+ "startLine": 26,
+ "endLine": 40,
+ "parentCellId": "55410235-e25a-43f1-9e9e-0c4d56846a85",
+ "parentPath": "services/actions/commit_status.go"
+ },
+ "b0ef37fb-198b-46a5-bdf6-0544a12abc08": {
+ "path": "b0ef37fb-198b-46a5-bdf6-0544a12abc08",
+ "cellName": "Send Webhook Notifications - notifier.go:L1013-1052",
+ "cellId": "b0ef37fb-198b-46a5-bdf6-0544a12abc08",
+ "visible": true,
+ "parentCellId": "ee3c4395-ec52-49ae-b5f6-c0564e51e17f"
+ },
+ "services/webhook/notifier.go-simstep-819644f6-a9d1-489c-a1e9-8a7f607d8db6": {
+ "path": "services/webhook/notifier.go-simstep-819644f6-a9d1-489c-a1e9-8a7f607d8db6",
+ "fileName": "notifier.go",
+ "wiki": "The notification service prepares and sends webhook payloads for the `workflow_run` event to any configured endpoints, informing external systems of the workflow's completion.",
+ "cellName": "Send Webhook Notifications - notifier.go:L1013-1052",
+ "cellId": "b0ef37fb-198b-46a5-bdf6-0544a12abc08",
+ "visible": true,
+ "startLine": 1013,
+ "endLine": 1052,
+ "parentCellId": "ee3c4395-ec52-49ae-b5f6-c0564e51e17f",
+ "parentPath": "services/webhook/notifier.go"
+ },
+ "ac3433e9-9244-42ed-be46-d927aee90d41": {
+ "path": "ac3433e9-9244-42ed-be46-d927aee90d41",
+ "cellName": "Transmit Workflow\nDefinitions",
+ "cellId": "ac3433e9-9244-42ed-be46-d927aee90d41",
+ "visible": true
+ },
+ "generated-edge-simstep-2405bd87-f38a-4df3-abcd-25cfc0af4398-ac3433e9-9244-42ed-be46-d927aee90d41": {
+ "path": "generated-edge-simstep-2405bd87-f38a-4df3-abcd-25cfc0af4398-ac3433e9-9244-42ed-be46-d927aee90d41",
+ "fileName": "notifier_helper.go",
+ "cellName": "Transmit Workflow Definitions",
+ "cellId": "ac3433e9-9244-42ed-be46-d927aee90d41",
+ "visible": true,
+ "startLine": 46,
+ "endLine": 66,
+ "parentPath": "services/actions/notifier_helper.go"
+ },
+ "5ae1e1da-794d-4152-88da-5ba4e75f5bee": {
+ "path": "5ae1e1da-794d-4152-88da-5ba4e75f5bee",
+ "cellName": "Queue Run\nfor Job\nEmission",
+ "cellId": "5ae1e1da-794d-4152-88da-5ba4e75f5bee",
+ "visible": true
+ },
+ "generated-edge-simstep-48f44711-30e0-4b75-9fc2-56c98bce1fa7-5ae1e1da-794d-4152-88da-5ba4e75f5bee": {
+ "path": "generated-edge-simstep-48f44711-30e0-4b75-9fc2-56c98bce1fa7-5ae1e1da-794d-4152-88da-5ba4e75f5bee",
+ "fileName": "run.go",
+ "cellName": "Queue Run for Job Emission",
+ "cellId": "5ae1e1da-794d-4152-88da-5ba4e75f5bee",
+ "visible": true,
+ "startLine": 27,
+ "endLine": 33,
+ "parentPath": "models/actions/run.go"
+ },
+ "7ad46963-6001-4cba-9021-a22187da39b7": {
+ "path": "7ad46963-6001-4cba-9021-a22187da39b7",
+ "cellName": "Job Becomes\nReady for\nPickup",
+ "cellId": "7ad46963-6001-4cba-9021-a22187da39b7",
+ "visible": true,
+ "parentCellId": "0f64dd37-6573-4d47-a06a-435f9ac9acac"
+ },
+ "generated-edge-simstep-295d2174-45bc-4e48-b88e-f0fa71fceb9a-7ad46963-6001-4cba-9021-a22187da39b7": {
+ "path": "generated-edge-simstep-295d2174-45bc-4e48-b88e-f0fa71fceb9a-7ad46963-6001-4cba-9021-a22187da39b7",
+ "fileName": "job_emitter.go",
+ "cellName": "Job Becomes Ready for Pickup",
+ "cellId": "7ad46963-6001-4cba-9021-a22187da39b7",
+ "visible": true,
+ "startLine": 78,
+ "endLine": 83,
+ "parentPath": "services/actions/job_emitter.go"
+ },
+ "da88243b-558a-438b-870e-9da2c643e90d": {
+ "path": "da88243b-558a-438b-870e-9da2c643e90d",
+ "cellName": "Task Details\nSent to\nRunner",
+ "cellId": "da88243b-558a-438b-870e-9da2c643e90d",
+ "visible": true
+ },
+ "generated-edge-simstep-da76dc6b-1315-4863-afad-c68b80f75671-da88243b-558a-438b-870e-9da2c643e90d": {
+ "path": "generated-edge-simstep-da76dc6b-1315-4863-afad-c68b80f75671-da88243b-558a-438b-870e-9da2c643e90d",
+ "fileName": "task.go",
+ "cellName": "Task Details Sent to Runner",
+ "cellId": "da88243b-558a-438b-870e-9da2c643e90d",
+ "visible": true,
+ "startLine": 109,
+ "endLine": 136,
+ "parentPath": "services/actions/task.go"
+ },
+ "bd25ec2e-95b9-47c2-89e3-15fa8ca4eae2": {
+ "path": "bd25ec2e-95b9-47c2-89e3-15fa8ca4eae2",
+ "cellName": "Job Status\nChange Propagated",
+ "cellId": "bd25ec2e-95b9-47c2-89e3-15fa8ca4eae2",
+ "visible": true
+ },
+ "generated-edge-simstep-c80b44b7-e91a-4b61-a095-c1cf10dbb585-bd25ec2e-95b9-47c2-89e3-15fa8ca4eae2": {
+ "path": "generated-edge-simstep-c80b44b7-e91a-4b61-a095-c1cf10dbb585-bd25ec2e-95b9-47c2-89e3-15fa8ca4eae2",
+ "fileName": "runner.go",
+ "cellName": "Job Status Change Propagated",
+ "cellId": "bd25ec2e-95b9-47c2-89e3-15fa8ca4eae2",
+ "visible": true,
+ "startLine": 95,
+ "endLine": 104,
+ "parentPath": "routers/api/actions/runner/runner.go"
+ },
+ "0e991a9b-0712-41d9-9a67-7f3de1da39dc": {
+ "path": "0e991a9b-0712-41d9-9a67-7f3de1da39dc",
+ "cellName": "Run Completion\nNotification",
+ "cellId": "0e991a9b-0712-41d9-9a67-7f3de1da39dc",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3"
+ },
+ "generated-edge-simstep-c5ff05a3-ed72-407a-a3e8-9764acd20134-0e991a9b-0712-41d9-9a67-7f3de1da39dc": {
+ "path": "generated-edge-simstep-c5ff05a3-ed72-407a-a3e8-9764acd20134-0e991a9b-0712-41d9-9a67-7f3de1da39dc",
+ "fileName": "commit_status.go",
+ "cellName": "Run Completion Notification",
+ "cellId": "0e991a9b-0712-41d9-9a67-7f3de1da39dc",
+ "visible": true,
+ "startLine": 402,
+ "endLine": 406,
+ "parentPath": "services/actions/commit_status.go"
+ },
+ "a63a77af-acb7-48f5-9179-64bc26b1d1a6": {
+ "path": "a63a77af-acb7-48f5-9179-64bc26b1d1a6",
+ "cellName": "organization",
+ "cellId": "a63a77af-acb7-48f5-9179-64bc26b1d1a6",
+ "visible": true,
+ "parentCellId": "9c37213c-3c3a-45d9-acff-87fc3ab9c825"
+ },
+ "cfcc20ae-59cf-47b3-a7a3-96ba0ad1abd6": {
+ "path": "cfcc20ae-59cf-47b3-a7a3-96ba0ad1abd6",
+ "cellName": "perm",
+ "cellId": "cfcc20ae-59cf-47b3-a7a3-96ba0ad1abd6",
+ "visible": true,
+ "parentCellId": "9c37213c-3c3a-45d9-acff-87fc3ab9c825"
+ },
+ "6bd2ddd2-7126-44ef-81a0-f5a723fed41d": {
+ "path": "6bd2ddd2-7126-44ef-81a0-f5a723fed41d",
+ "cellName": "org",
+ "cellId": "6bd2ddd2-7126-44ef-81a0-f5a723fed41d",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3"
+ },
+ "547773bf-f623-4285-bcf3-bc7352e83727": {
+ "path": "547773bf-f623-4285-bcf3-bc7352e83727",
+ "cellName": "v1",
+ "cellId": "547773bf-f623-4285-bcf3-bc7352e83727",
+ "visible": true,
+ "parentCellId": "807c2016-8e41-4357-b295-11ccb53c3eae"
+ },
+ "9fe58423-820e-4df6-80f1-17d2c56c3577": {
+ "path": "9fe58423-820e-4df6-80f1-17d2c56c3577",
+ "cellName": "org.go",
+ "cellId": "9fe58423-820e-4df6-80f1-17d2c56c3577",
+ "visible": true,
+ "parentCellId": "a63a77af-acb7-48f5-9179-64bc26b1d1a6"
+ },
+ "76a94391-d82b-481f-b6c0-261acdb9ac38": {
+ "path": "76a94391-d82b-481f-b6c0-261acdb9ac38",
+ "cellName": "access",
+ "cellId": "76a94391-d82b-481f-b6c0-261acdb9ac38",
+ "visible": true,
+ "parentCellId": "cfcc20ae-59cf-47b3-a7a3-96ba0ad1abd6"
+ },
+ "dbbfae18-dda1-45cb-af47-2cc6201794a4": {
+ "path": "dbbfae18-dda1-45cb-af47-2cc6201794a4",
+ "cellName": "team.go",
+ "cellId": "dbbfae18-dda1-45cb-af47-2cc6201794a4",
+ "visible": true,
+ "parentCellId": "6bd2ddd2-7126-44ef-81a0-f5a723fed41d"
+ },
+ "4c9979e0-7716-4c7a-ab18-d6cfe683964b": {
+ "path": "4c9979e0-7716-4c7a-ab18-d6cfe683964b",
+ "cellName": "repo_team.go",
+ "cellId": "4c9979e0-7716-4c7a-ab18-d6cfe683964b",
+ "visible": true,
+ "parentCellId": "825b9e8b-b738-4712-bd94-10d08696cae1"
+ },
+ "f3d903ba-37ed-4ff5-bcab-2598ac719c9d": {
+ "path": "f3d903ba-37ed-4ff5-bcab-2598ac719c9d",
+ "cellName": "org",
+ "cellId": "f3d903ba-37ed-4ff5-bcab-2598ac719c9d",
+ "visible": true,
+ "parentCellId": "547773bf-f623-4285-bcf3-bc7352e83727"
+ },
+ "0bd8f3b7-c2b4-456f-9d12-4f70d1f09126": {
+ "path": "0bd8f3b7-c2b4-456f-9d12-4f70d1f09126",
+ "cellName": "access.go",
+ "cellId": "0bd8f3b7-c2b4-456f-9d12-4f70d1f09126",
+ "visible": true,
+ "parentCellId": "76a94391-d82b-481f-b6c0-261acdb9ac38"
+ },
+ "b76765f5-65e3-41ee-97a6-c3db05b1a331": {
+ "path": "b76765f5-65e3-41ee-97a6-c3db05b1a331",
+ "cellName": "org.go",
+ "cellId": "b76765f5-65e3-41ee-97a6-c3db05b1a331",
+ "visible": true,
+ "parentCellId": "f3d903ba-37ed-4ff5-bcab-2598ac719c9d"
+ },
+ "95504365-53f2-4430-a256-918e72715e2f": {
+ "path": "95504365-53f2-4430-a256-918e72715e2f",
+ "cellName": "team.go",
+ "cellId": "95504365-53f2-4430-a256-918e72715e2f",
+ "visible": true,
+ "parentCellId": "f3d903ba-37ed-4ff5-bcab-2598ac719c9d"
+ },
+ "5801e4ea-4e2b-472a-87ec-4284f690993c": {
+ "path": "5801e4ea-4e2b-472a-87ec-4284f690993c",
+ "cellName": "API Call: Create an Organization - org.go:L222-275",
+ "cellId": "5801e4ea-4e2b-472a-87ec-4284f690993c",
+ "visible": true,
+ "parentCellId": "b76765f5-65e3-41ee-97a6-c3db05b1a331"
+ },
+ "routers/api/v1/org/org.go-simstep-d3d50f13-d8b4-42b7-9c03-f5aecdd107c3": {
+ "path": "routers/api/v1/org/org.go-simstep-d3d50f13-d8b4-42b7-9c03-f5aecdd107c3",
+ "fileName": "org.go",
+ "wiki": "A user with appropriate permissions makes an API call to create a new organization. The request includes the organization's name, description, and visibility settings.",
+ "cellName": "API Call: Create an Organization - org.go:L222-275",
+ "cellId": "5801e4ea-4e2b-472a-87ec-4284f690993c",
+ "visible": true,
+ "startLine": 222,
+ "endLine": 275,
+ "parentCellId": "b76765f5-65e3-41ee-97a6-c3db05b1a331",
+ "parentPath": "routers/api/v1/org/org.go"
+ },
+ "74565581-b2f0-4f07-a22e-b3ca8b2ca245": {
+ "path": "74565581-b2f0-4f07-a22e-b3ca8b2ca245",
+ "cellName": "Database: Create Organization and Owner Team - org.go:L282-379",
+ "cellId": "74565581-b2f0-4f07-a22e-b3ca8b2ca245",
+ "visible": true,
+ "parentCellId": "9fe58423-820e-4df6-80f1-17d2c56c3577"
+ },
+ "models/organization/org.go-simstep-c87a4f37-7192-4dd9-a921-65701d2514da": {
+ "path": "models/organization/org.go-simstep-c87a4f37-7192-4dd9-a921-65701d2514da",
+ "fileName": "org.go",
+ "wiki": "The `CreateOrganization` function persists the new organization to the database. It creates a new user of type 'Organization', automatically creates a default 'Owners' team, assigns all repository unit permissions to this team, and adds the creating user as the first member of the organization and the 'Owners' team.",
+ "cellName": "Database: Create Organization and Owner Team - org.go:L282-379",
+ "cellId": "74565581-b2f0-4f07-a22e-b3ca8b2ca245",
+ "visible": true,
+ "startLine": 282,
+ "endLine": 379,
+ "parentCellId": "9fe58423-820e-4df6-80f1-17d2c56c3577",
+ "parentPath": "models/organization/org.go"
+ },
+ "e94a5358-862e-45d4-a9fc-44f3d404f9a2": {
+ "path": "e94a5358-862e-45d4-a9fc-44f3d404f9a2",
+ "cellName": "API Call: Create a Team - team.go:L181-245",
+ "cellId": "e94a5358-862e-45d4-a9fc-44f3d404f9a2",
+ "visible": true,
+ "parentCellId": "95504365-53f2-4430-a256-918e72715e2f"
+ },
+ "routers/api/v1/org/team.go-simstep-27159163-bec3-4784-814c-39fbbabbe5c0": {
+ "path": "routers/api/v1/org/team.go-simstep-27159163-bec3-4784-814c-39fbbabbe5c0",
+ "fileName": "team.go",
+ "wiki": "An organization owner makes an API call to create a new team within the organization, specifying the team's name, permissions, and repository access settings.",
+ "cellName": "API Call: Create a Team - team.go:L181-245",
+ "cellId": "e94a5358-862e-45d4-a9fc-44f3d404f9a2",
+ "visible": true,
+ "startLine": 181,
+ "endLine": 245,
+ "parentCellId": "95504365-53f2-4430-a256-918e72715e2f",
+ "parentPath": "routers/api/v1/org/team.go"
+ },
+ "ab5d40fa-b506-44e3-af02-f493f3fa1062": {
+ "path": "ab5d40fa-b506-44e3-af02-f493f3fa1062",
+ "cellName": "Database: Create Team and Units - team.go:L26-83",
+ "cellId": "ab5d40fa-b506-44e3-af02-f493f3fa1062",
+ "visible": true,
+ "parentCellId": "dbbfae18-dda1-45cb-af47-2cc6201794a4"
+ },
+ "services/org/team.go-simstep-c7a4932f-39c4-440f-bfb2-6e0f08961f03": {
+ "path": "services/org/team.go-simstep-c7a4932f-39c4-440f-bfb2-6e0f08961f03",
+ "fileName": "team.go",
+ "wiki": "The `NewTeam` service function validates the team name and permissions, then inserts the new team record into the `team` table. It also creates associated `team_unit` records to define the team's access permissions for different repository sections (code, issues, etc.).",
+ "cellName": "Database: Create Team and Units - team.go:L26-83",
+ "cellId": "ab5d40fa-b506-44e3-af02-f493f3fa1062",
+ "visible": true,
+ "startLine": 26,
+ "endLine": 83,
+ "parentCellId": "dbbfae18-dda1-45cb-af47-2cc6201794a4",
+ "parentPath": "services/org/team.go"
+ },
+ "b686c9a2-1300-4f86-9915-9b3bad7ecfb6": {
+ "path": "b686c9a2-1300-4f86-9915-9b3bad7ecfb6",
+ "cellName": "API Call: Add User to Team - team.go:L453-491",
+ "cellId": "b686c9a2-1300-4f86-9915-9b3bad7ecfb6",
+ "visible": true,
+ "parentCellId": "95504365-53f2-4430-a256-918e72715e2f"
+ },
+ "routers/api/v1/org/team.go-simstep-3ffb9dab-a06e-447e-ac05-83e821f4e38f": {
+ "path": "routers/api/v1/org/team.go-simstep-3ffb9dab-a06e-447e-ac05-83e821f4e38f",
+ "fileName": "team.go",
+ "wiki": "An organization owner adds an existing user to the newly created 'developers' team via an API call.",
+ "cellName": "API Call: Add User to Team - team.go:L453-491",
+ "cellId": "b686c9a2-1300-4f86-9915-9b3bad7ecfb6",
+ "visible": true,
+ "startLine": 453,
+ "endLine": 491,
+ "parentCellId": "95504365-53f2-4430-a256-918e72715e2f",
+ "parentPath": "routers/api/v1/org/team.go"
+ },
+ "385f5d69-6b5e-452c-9b07-8774ded3e691": {
+ "path": "385f5d69-6b5e-452c-9b07-8774ded3e691",
+ "cellName": "Database: Create Team Membership - team.go:L213-272",
+ "cellId": "385f5d69-6b5e-452c-9b07-8774ded3e691",
+ "visible": true,
+ "parentCellId": "dbbfae18-dda1-45cb-af47-2cc6201794a4"
+ },
+ "services/org/team.go-simstep-62554420-2e08-4eb8-ae5c-8664c95a27b2": {
+ "path": "services/org/team.go-simstep-62554420-2e08-4eb8-ae5c-8664c95a27b2",
+ "fileName": "team.go",
+ "wiki": "The `AddTeamMember` service function first ensures the user is a member of the organization by creating an `org_user` record if one doesn't exist. Then, it creates a `team_user` record to link the user to the team, and increments the team's member count. Finally, it updates the user's access permissions to all repositories the team has access to.",
+ "cellName": "Database: Create Team Membership - team.go:L213-272",
+ "cellId": "385f5d69-6b5e-452c-9b07-8774ded3e691",
+ "visible": true,
+ "startLine": 213,
+ "endLine": 272,
+ "parentCellId": "dbbfae18-dda1-45cb-af47-2cc6201794a4",
+ "parentPath": "services/org/team.go"
+ },
+ "a8fb5076-2684-418a-86dd-e1a81ef6dcd5": {
+ "path": "a8fb5076-2684-418a-86dd-e1a81ef6dcd5",
+ "cellName": "API Call: Add Repository to Team - team.go:L645-692",
+ "cellId": "a8fb5076-2684-418a-86dd-e1a81ef6dcd5",
+ "visible": true,
+ "parentCellId": "95504365-53f2-4430-a256-918e72715e2f"
+ },
+ "routers/api/v1/org/team.go-simstep-63bb7359-8e00-459a-9be7-a4cb596a2ac4": {
+ "path": "routers/api/v1/org/team.go-simstep-63bb7359-8e00-459a-9be7-a4cb596a2ac4",
+ "fileName": "team.go",
+ "wiki": "An organization owner grants the 'developers' team access to an organization repository via an API call.",
+ "cellName": "API Call: Add Repository to Team - team.go:L645-692",
+ "cellId": "a8fb5076-2684-418a-86dd-e1a81ef6dcd5",
+ "visible": true,
+ "startLine": 645,
+ "endLine": 692,
+ "parentCellId": "95504365-53f2-4430-a256-918e72715e2f",
+ "parentPath": "routers/api/v1/org/team.go"
+ },
+ "e8f83196-c831-49b1-bdf9-f8747469b62c": {
+ "path": "e8f83196-c831-49b1-bdf9-f8747469b62c",
+ "cellName": "Database: Grant Repository Access to Team - repo_team.go:L29-55",
+ "cellId": "e8f83196-c831-49b1-bdf9-f8747469b62c",
+ "visible": true,
+ "parentCellId": "4c9979e0-7716-4c7a-ab18-d6cfe683964b"
+ },
+ "services/repository/repo_team.go-simstep-b6cf2f5e-8a56-4e3a-84f0-5259abcb93a0": {
+ "path": "services/repository/repo_team.go-simstep-b6cf2f5e-8a56-4e3a-84f0-5259abcb93a0",
+ "fileName": "repo_team.go",
+ "wiki": "The `TeamAddRepository` service function creates a `team_repo` record linking the team to the repository. It then calls `RecalculateTeamAccesses` to update the `access` table, ensuring all members of the team receive the correct permissions for the repository based on the team's access mode.",
+ "cellName": "Database: Grant Repository Access to Team - repo_team.go:L29-55",
+ "cellId": "e8f83196-c831-49b1-bdf9-f8747469b62c",
+ "visible": true,
+ "startLine": 29,
+ "endLine": 55,
+ "parentCellId": "4c9979e0-7716-4c7a-ab18-d6cfe683964b",
+ "parentPath": "services/repository/repo_team.go"
+ },
+ "4fc53056-f096-48e0-9866-5ce11e58e2d7": {
+ "path": "4fc53056-f096-48e0-9866-5ce11e58e2d7",
+ "cellName": "Logic: Verifying User Permissions - access.go:L203-220",
+ "cellId": "4fc53056-f096-48e0-9866-5ce11e58e2d7",
+ "visible": true,
+ "parentCellId": "0bd8f3b7-c2b4-456f-9d12-4f70d1f09126"
+ },
+ "models/perm/access/access.go-simstep-bf4d9374-88f2-4882-8c74-b393fe42964f": {
+ "path": "models/perm/access/access.go-simstep-bf4d9374-88f2-4882-8c74-b393fe42964f",
+ "fileName": "access.go",
+ "wiki": "When a user attempts to access a repository, the system calls `GetUserRepoPermission`. This function determines the user's access level. For organization repositories, it checks if the user is a direct collaborator. If not, it aggregates permissions from all teams the user is a member of that have access to the repository. It checks the `team_user` and `team_repo` tables to establish this relationship, and then consolidates the access modes from the relevant `team` and `team_unit` records to grant the highest possible permission level.",
+ "cellName": "Logic: Verifying User Permissions - access.go:L203-220",
+ "cellId": "4fc53056-f096-48e0-9866-5ce11e58e2d7",
+ "visible": true,
+ "startLine": 203,
+ "endLine": 220,
+ "parentCellId": "0bd8f3b7-c2b4-456f-9d12-4f70d1f09126",
+ "parentPath": "models/perm/access/access.go"
+ },
+ "c07fa184-527d-444e-bf79-b0450d13b27c": {
+ "path": "c07fa184-527d-444e-bf79-b0450d13b27c",
+ "cellName": "Data Transmission:\nPass Organization\nData to\nService",
+ "cellId": "c07fa184-527d-444e-bf79-b0450d13b27c",
+ "visible": true
+ },
+ "generated-edge-simstep-c043edea-95e5-4a4d-9153-95d0adf7c4e8-c07fa184-527d-444e-bf79-b0450d13b27c": {
+ "path": "generated-edge-simstep-c043edea-95e5-4a4d-9153-95d0adf7c4e8-c07fa184-527d-444e-bf79-b0450d13b27c",
+ "fileName": "org.go",
+ "cellName": "Data Transmission: Pass Organization Data to Service",
+ "cellId": "c07fa184-527d-444e-bf79-b0450d13b27c",
+ "visible": true,
+ "startLine": 267,
+ "endLine": 267,
+ "parentPath": "routers/api/v1/org/org.go"
+ },
+ "987bbf28-002d-4fe1-863f-ec21c4f7824a": {
+ "path": "987bbf28-002d-4fe1-863f-ec21c4f7824a",
+ "cellName": "API Response:\nOrganization Created",
+ "cellId": "987bbf28-002d-4fe1-863f-ec21c4f7824a",
+ "visible": true
+ },
+ "generated-edge-simstep-a0797477-98f0-4487-bd6e-7abf47b86744-987bbf28-002d-4fe1-863f-ec21c4f7824a": {
+ "path": "generated-edge-simstep-a0797477-98f0-4487-bd6e-7abf47b86744-987bbf28-002d-4fe1-863f-ec21c4f7824a",
+ "fileName": "org.go",
+ "cellName": "API Response: Organization Created",
+ "cellId": "987bbf28-002d-4fe1-863f-ec21c4f7824a",
+ "visible": true,
+ "startLine": 274,
+ "endLine": 274,
+ "parentPath": "models/organization/org.go"
+ },
+ "e31b5a55-8e34-469c-91c6-4d12d7b47bb6": {
+ "path": "e31b5a55-8e34-469c-91c6-4d12d7b47bb6",
+ "cellName": "Data Transmission:\nPass Team\nData to\nService",
+ "cellId": "e31b5a55-8e34-469c-91c6-4d12d7b47bb6",
+ "visible": true
+ },
+ "generated-edge-simstep-a8d868f5-ec8f-497d-9e46-e7741e51d2d2-e31b5a55-8e34-469c-91c6-4d12d7b47bb6": {
+ "path": "generated-edge-simstep-a8d868f5-ec8f-497d-9e46-e7741e51d2d2-e31b5a55-8e34-469c-91c6-4d12d7b47bb6",
+ "fileName": "team.go",
+ "cellName": "Data Transmission: Pass Team Data to Service",
+ "cellId": "e31b5a55-8e34-469c-91c6-4d12d7b47bb6",
+ "visible": true,
+ "startLine": 232,
+ "endLine": 232,
+ "parentPath": "routers/api/v1/org/team.go"
+ },
+ "2b874597-f207-44a5-8cde-031be7eb2b56": {
+ "path": "2b874597-f207-44a5-8cde-031be7eb2b56",
+ "cellName": "API Response:\nTeam Created",
+ "cellId": "2b874597-f207-44a5-8cde-031be7eb2b56",
+ "visible": true
+ },
+ "generated-edge-simstep-b7de382b-0703-4570-93b6-0f58841ebf91-2b874597-f207-44a5-8cde-031be7eb2b56": {
+ "path": "generated-edge-simstep-b7de382b-0703-4570-93b6-0f58841ebf91-2b874597-f207-44a5-8cde-031be7eb2b56",
+ "fileName": "team.go",
+ "cellName": "API Response: Team Created",
+ "cellId": "2b874597-f207-44a5-8cde-031be7eb2b56",
+ "visible": true,
+ "startLine": 241,
+ "endLine": 243,
+ "parentPath": "services/org/team.go"
+ },
+ "8d94591b-aa0d-42da-af64-24eb53a28705": {
+ "path": "8d94591b-aa0d-42da-af64-24eb53a28705",
+ "cellName": "Data Transmission:\nPass User\nand Team\nto Service",
+ "cellId": "8d94591b-aa0d-42da-af64-24eb53a28705",
+ "visible": true
+ },
+ "generated-edge-simstep-7cd2fd9a-4b40-49c3-a288-e35db0272f3c-8d94591b-aa0d-42da-af64-24eb53a28705": {
+ "path": "generated-edge-simstep-7cd2fd9a-4b40-49c3-a288-e35db0272f3c-8d94591b-aa0d-42da-af64-24eb53a28705",
+ "fileName": "team.go",
+ "cellName": "Data Transmission: Pass User and Team to Service",
+ "cellId": "8d94591b-aa0d-42da-af64-24eb53a28705",
+ "visible": true,
+ "startLine": 485,
+ "endLine": 485,
+ "parentPath": "routers/api/v1/org/team.go"
+ },
+ "951d6bc3-97ee-4898-b6a0-c3e4b5d4f443": {
+ "path": "951d6bc3-97ee-4898-b6a0-c3e4b5d4f443",
+ "cellName": "API Response:\nUser Added\nto Team",
+ "cellId": "951d6bc3-97ee-4898-b6a0-c3e4b5d4f443",
+ "visible": true
+ },
+ "generated-edge-simstep-9174ea75-a7d4-4c3b-928a-ca8849adc991-951d6bc3-97ee-4898-b6a0-c3e4b5d4f443": {
+ "path": "generated-edge-simstep-9174ea75-a7d4-4c3b-928a-ca8849adc991-951d6bc3-97ee-4898-b6a0-c3e4b5d4f443",
+ "fileName": "team.go",
+ "cellName": "API Response: User Added to Team",
+ "cellId": "951d6bc3-97ee-4898-b6a0-c3e4b5d4f443",
+ "visible": true,
+ "startLine": 489,
+ "endLine": 489,
+ "parentPath": "services/org/team.go"
+ },
+ "511cb761-ed7f-44d9-9a4d-00d12b23b846": {
+ "path": "511cb761-ed7f-44d9-9a4d-00d12b23b846",
+ "cellName": "Data Transmission:\nPass Repo\nand Team\nto Service",
+ "cellId": "511cb761-ed7f-44d9-9a4d-00d12b23b846",
+ "visible": true
+ },
+ "generated-edge-simstep-2fff8506-9cf7-4560-8963-857e670940d7-511cb761-ed7f-44d9-9a4d-00d12b23b846": {
+ "path": "generated-edge-simstep-2fff8506-9cf7-4560-8963-857e670940d7-511cb761-ed7f-44d9-9a4d-00d12b23b846",
+ "fileName": "team.go",
+ "cellName": "Data Transmission: Pass Repo and Team to Service",
+ "cellId": "511cb761-ed7f-44d9-9a4d-00d12b23b846",
+ "visible": true,
+ "startLine": 689,
+ "endLine": 689,
+ "parentPath": "routers/api/v1/org/team.go"
+ },
+ "3eec94e4-2183-4f04-817c-6d464923e971": {
+ "path": "3eec94e4-2183-4f04-817c-6d464923e971",
+ "cellName": "API Response:\nRepository Added\nto Team",
+ "cellId": "3eec94e4-2183-4f04-817c-6d464923e971",
+ "visible": true
+ },
+ "generated-edge-simstep-582f4568-966f-4a89-b5d3-73fbff0899ee-3eec94e4-2183-4f04-817c-6d464923e971": {
+ "path": "generated-edge-simstep-582f4568-966f-4a89-b5d3-73fbff0899ee-3eec94e4-2183-4f04-817c-6d464923e971",
+ "fileName": "repo_team.go",
+ "cellName": "API Response: Repository Added to Team",
+ "cellId": "3eec94e4-2183-4f04-817c-6d464923e971",
+ "visible": true,
+ "startLine": 691,
+ "endLine": 691,
+ "parentPath": "services/repository/repo_team.go"
+ },
+ "9395aa4c-73a4-4c2a-b21d-7ba8961158c1": {
+ "path": "9395aa4c-73a4-4c2a-b21d-7ba8961158c1",
+ "cellName": "packages",
+ "cellId": "9395aa4c-73a4-4c2a-b21d-7ba8961158c1",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3"
+ },
+ "7f767bed-ae0a-4dc2-a810-058a34d7415c": {
+ "path": "7f767bed-ae0a-4dc2-a810-058a34d7415c",
+ "cellName": "packages",
+ "cellId": "7f767bed-ae0a-4dc2-a810-058a34d7415c",
+ "visible": true,
+ "parentCellId": "807c2016-8e41-4357-b295-11ccb53c3eae"
+ },
+ "61a15f31-b7b2-430b-acb7-c7558d4720cb": {
+ "path": "61a15f31-b7b2-430b-acb7-c7558d4720cb",
+ "cellName": "packages.go",
+ "cellId": "61a15f31-b7b2-430b-acb7-c7558d4720cb",
+ "visible": true,
+ "parentCellId": "9395aa4c-73a4-4c2a-b21d-7ba8961158c1"
+ },
+ "c90b0788-272b-4a3f-8419-c1e7c5f78ab9": {
+ "path": "c90b0788-272b-4a3f-8419-c1e7c5f78ab9",
+ "cellName": "api.go",
+ "cellId": "c90b0788-272b-4a3f-8419-c1e7c5f78ab9",
+ "visible": true,
+ "parentCellId": "7f767bed-ae0a-4dc2-a810-058a34d7415c"
+ },
+ "23320a3b-e866-4326-aa0a-fab89f250a87": {
+ "path": "23320a3b-e866-4326-aa0a-fab89f250a87",
+ "cellName": "generic",
+ "cellId": "23320a3b-e866-4326-aa0a-fab89f250a87",
+ "visible": true,
+ "parentCellId": "7f767bed-ae0a-4dc2-a810-058a34d7415c"
+ },
+ "47388450-891e-4383-b54a-1c28df16469c": {
+ "path": "47388450-891e-4383-b54a-1c28df16469c",
+ "cellName": "generic.go",
+ "cellId": "47388450-891e-4383-b54a-1c28df16469c",
+ "visible": true,
+ "parentCellId": "23320a3b-e866-4326-aa0a-fab89f250a87"
+ },
+ "93a89fef-f5df-40a0-a9e5-a3bc04193b06": {
+ "path": "93a89fef-f5df-40a0-a9e5-a3bc04193b06",
+ "cellName": "API Call: Route Package Upload Request - api.go:L308",
+ "cellId": "93a89fef-f5df-40a0-a9e5-a3bc04193b06",
+ "visible": true,
+ "parentCellId": "c90b0788-272b-4a3f-8419-c1e7c5f78ab9"
+ },
+ "routers/api/packages/api.go-simstep-80bd7665-22f0-4298-a595-441e3ac30519": {
+ "path": "routers/api/packages/api.go-simstep-80bd7665-22f0-4298-a595-441e3ac30519",
+ "fileName": "api.go",
+ "wiki": "An incoming HTTP PUT request to upload a generic package is received. The router matches the URL pattern '/api/packages/{owner}/generic/{packagename}/{packageversion}/{filename}' and directs the request to the `generic.UploadPackage` handler.",
+ "cellName": "API Call: Route Package Upload Request - api.go:L308",
+ "cellId": "93a89fef-f5df-40a0-a9e5-a3bc04193b06",
+ "visible": true,
+ "startLine": 308,
+ "endLine": 308,
+ "parentCellId": "c90b0788-272b-4a3f-8419-c1e7c5f78ab9",
+ "parentPath": "routers/api/packages/api.go"
+ },
+ "602f94d9-2d09-4bda-8700-5fd0e4ce0cb6": {
+ "path": "602f94d9-2d09-4bda-8700-5fd0e4ce0cb6",
+ "cellName": "Data Transformation: Process Uploaded File Data - generic.go:L101-106",
+ "cellId": "602f94d9-2d09-4bda-8700-5fd0e4ce0cb6",
+ "visible": true,
+ "parentCellId": "47388450-891e-4383-b54a-1c28df16469c"
+ },
+ "routers/api/packages/generic/generic.go-simstep-9e90ffc2-07f4-4084-b09e-bee9d373e5d7": {
+ "path": "routers/api/packages/generic/generic.go-simstep-9e90ffc2-07f4-4084-b09e-bee9d373e5d7",
+ "fileName": "generic.go",
+ "wiki": "The handler reads the file content from the request body. It creates a `HashedBuffer` which simultaneously reads the stream into a temporary buffer and calculates multiple checksums (MD5, SHA1, SHA256, SHA512).",
+ "cellName": "Data Transformation: Process Uploaded File Data - generic.go:L101-106",
+ "cellId": "602f94d9-2d09-4bda-8700-5fd0e4ce0cb6",
+ "visible": true,
+ "startLine": 101,
+ "endLine": 106,
+ "parentCellId": "47388450-891e-4383-b54a-1c28df16469c",
+ "parentPath": "routers/api/packages/generic/generic.go"
+ },
+ "60f8ff6c-06aa-4a3b-acb1-de1f90145878": {
+ "path": "60f8ff6c-06aa-4a3b-acb1-de1f90145878",
+ "cellName": "Database Query: Create Package Records - packages.go:L72-120",
+ "cellId": "60f8ff6c-06aa-4a3b-acb1-de1f90145878",
+ "visible": true,
+ "parentCellId": "61a15f31-b7b2-430b-acb7-c7558d4720cb"
+ },
+ "services/packages/packages.go-simstep-3a18acb5-55a0-428f-9bb5-2cade38c753e": {
+ "path": "services/packages/packages.go-simstep-3a18acb5-55a0-428f-9bb5-2cade38c753e",
+ "fileName": "packages.go",
+ "wiki": "The `CreatePackageOrAddFileToExisting` service function handles the database and storage operations. It starts a transaction, creates or retrieves the `Package` and `PackageVersion` records, saves the file content to the configured storage creating a `PackageBlob` record, and finally creates a `PackageFile` record linking the version to the content. The transaction is then committed.",
+ "cellName": "Database Query: Create Package Records - packages.go:L72-120",
+ "cellId": "60f8ff6c-06aa-4a3b-acb1-de1f90145878",
+ "visible": true,
+ "startLine": 72,
+ "endLine": 120,
+ "parentCellId": "61a15f31-b7b2-430b-acb7-c7558d4720cb",
+ "parentPath": "services/packages/packages.go"
+ },
+ "b52e0740-466f-4999-b5e2-40f2a59be4da": {
+ "path": "b52e0740-466f-4999-b5e2-40f2a59be4da",
+ "cellName": "API Call: Send Success Response - generic.go:L135",
+ "cellId": "b52e0740-466f-4999-b5e2-40f2a59be4da",
+ "visible": true,
+ "parentCellId": "47388450-891e-4383-b54a-1c28df16469c"
+ },
+ "routers/api/packages/generic/generic.go-simstep-1c045caa-8810-492e-97be-a8471a7605b2": {
+ "path": "routers/api/packages/generic/generic.go-simstep-1c045caa-8810-492e-97be-a8471a7605b2",
+ "fileName": "generic.go",
+ "wiki": "After the service function returns successfully, the API handler sends an HTTP `201 Created` response back to the client to confirm that the package was uploaded.",
+ "cellName": "API Call: Send Success Response - generic.go:L135",
+ "cellId": "b52e0740-466f-4999-b5e2-40f2a59be4da",
+ "visible": true,
+ "startLine": 135,
+ "endLine": 135,
+ "parentCellId": "47388450-891e-4383-b54a-1c28df16469c",
+ "parentPath": "routers/api/packages/generic/generic.go"
+ },
+ "0ba0d3db-8e3b-4454-b9f9-c770676a5de6": {
+ "path": "0ba0d3db-8e3b-4454-b9f9-c770676a5de6",
+ "cellName": "Data Transmission:\nPass Request\nto Handler",
+ "cellId": "0ba0d3db-8e3b-4454-b9f9-c770676a5de6",
+ "visible": true,
+ "parentCellId": "7f767bed-ae0a-4dc2-a810-058a34d7415c"
+ },
+ "generated-edge-simstep-df58fa69-47ff-45b1-9e42-a0ff6501abeb-0ba0d3db-8e3b-4454-b9f9-c770676a5de6": {
+ "path": "generated-edge-simstep-df58fa69-47ff-45b1-9e42-a0ff6501abeb-0ba0d3db-8e3b-4454-b9f9-c770676a5de6",
+ "fileName": "api.go",
+ "cellName": "Data Transmission: Pass Request to Handler",
+ "cellId": "0ba0d3db-8e3b-4454-b9f9-c770676a5de6",
+ "visible": true,
+ "startLine": 72,
+ "endLine": 72,
+ "parentPath": "routers/api/packages/api.go"
+ },
+ "79140f26-f852-443c-8b81-26bafbf41a8d": {
+ "path": "79140f26-f852-443c-8b81-26bafbf41a8d",
+ "cellName": "Data Transmission:\nPass Package\nData to\nService",
+ "cellId": "79140f26-f852-443c-8b81-26bafbf41a8d",
+ "visible": true
+ },
+ "generated-edge-simstep-433dacf5-48f5-4c8b-8bd3-2afd7b5c03ad-79140f26-f852-443c-8b81-26bafbf41a8d": {
+ "path": "generated-edge-simstep-433dacf5-48f5-4c8b-8bd3-2afd7b5c03ad-79140f26-f852-443c-8b81-26bafbf41a8d",
+ "fileName": "generic.go",
+ "cellName": "Data Transmission: Pass Package Data to Service",
+ "cellId": "79140f26-f852-443c-8b81-26bafbf41a8d",
+ "visible": true,
+ "startLine": 111,
+ "endLine": 126,
+ "parentPath": "routers/api/packages/generic/generic.go"
+ },
+ "61550a8c-6c85-4ec9-a9f3-dc0299c5ae3a": {
+ "path": "61550a8c-6c85-4ec9-a9f3-dc0299c5ae3a",
+ "cellName": "Data Transmission:\nReturn Success\nto Handler",
+ "cellId": "61550a8c-6c85-4ec9-a9f3-dc0299c5ae3a",
+ "visible": true
+ },
+ "generated-edge-simstep-6b367fd7-0316-477a-89a5-b339c79ba573-61550a8c-6c85-4ec9-a9f3-dc0299c5ae3a": {
+ "path": "generated-edge-simstep-6b367fd7-0316-477a-89a5-b339c79ba573-61550a8c-6c85-4ec9-a9f3-dc0299c5ae3a",
+ "fileName": "packages.go",
+ "cellName": "Data Transmission: Return Success to Handler",
+ "cellId": "61550a8c-6c85-4ec9-a9f3-dc0299c5ae3a",
+ "visible": true,
+ "startLine": 111,
+ "endLine": 111,
+ "parentPath": "services/packages/packages.go"
+ },
+ "d3647ed6-309d-4bbb-83e1-8ac8c769d74a": {
+ "path": "d3647ed6-309d-4bbb-83e1-8ac8c769d74a",
+ "cellName": "webhook",
+ "cellId": "d3647ed6-309d-4bbb-83e1-8ac8c769d74a",
+ "visible": true,
+ "parentCellId": "9c37213c-3c3a-45d9-acff-87fc3ab9c825"
+ },
+ "d8fcd25d-fb86-46b3-9277-197d7750b1dd": {
+ "path": "d8fcd25d-fb86-46b3-9277-197d7750b1dd",
+ "cellName": "webhook.go",
+ "cellId": "d8fcd25d-fb86-46b3-9277-197d7750b1dd",
+ "visible": true,
+ "parentCellId": "d3647ed6-309d-4bbb-83e1-8ac8c769d74a"
+ },
+ "324ebb2a-8eb7-4418-9d46-e6c6862f79f2": {
+ "path": "324ebb2a-8eb7-4418-9d46-e6c6862f79f2",
+ "cellName": "webhook.go",
+ "cellId": "324ebb2a-8eb7-4418-9d46-e6c6862f79f2",
+ "visible": true,
+ "parentCellId": "2ebce87f-f247-403e-950a-4f695d05ac6e"
+ },
+ "e4e5f63d-e96f-4d9f-bbba-9a25dccf1be4": {
+ "path": "e4e5f63d-e96f-4d9f-bbba-9a25dccf1be4",
+ "cellName": "deliver.go",
+ "cellId": "e4e5f63d-e96f-4d9f-bbba-9a25dccf1be4",
+ "visible": true,
+ "parentCellId": "2ebce87f-f247-403e-950a-4f695d05ac6e"
+ },
+ "e0bd77b2-9399-46af-ada1-62c5c4852b6f": {
+ "path": "e0bd77b2-9399-46af-ada1-62c5c4852b6f",
+ "cellName": "repo",
+ "cellId": "e0bd77b2-9399-46af-ada1-62c5c4852b6f",
+ "visible": true,
+ "parentCellId": "547773bf-f623-4285-bcf3-bc7352e83727"
+ },
+ "415fef8e-57f9-453a-9052-8cb5fb6ca6f9": {
+ "path": "415fef8e-57f9-453a-9052-8cb5fb6ca6f9",
+ "cellName": "utils",
+ "cellId": "415fef8e-57f9-453a-9052-8cb5fb6ca6f9",
+ "visible": true,
+ "parentCellId": "547773bf-f623-4285-bcf3-bc7352e83727"
+ },
+ "4e2643dd-9d0b-4335-ad1e-7afdc33bd158": {
+ "path": "4e2643dd-9d0b-4335-ad1e-7afdc33bd158",
+ "cellName": "hook.go",
+ "cellId": "4e2643dd-9d0b-4335-ad1e-7afdc33bd158",
+ "visible": true,
+ "parentCellId": "e0bd77b2-9399-46af-ada1-62c5c4852b6f"
+ },
+ "295b44d5-48fa-4bdb-aec3-8c84ddf9b86c": {
+ "path": "295b44d5-48fa-4bdb-aec3-8c84ddf9b86c",
+ "cellName": "hook.go",
+ "cellId": "295b44d5-48fa-4bdb-aec3-8c84ddf9b86c",
+ "visible": true,
+ "parentCellId": "415fef8e-57f9-453a-9052-8cb5fb6ca6f9"
+ },
+ "90e0a729-5498-4df2-bfef-c4bf7f8ab73f": {
+ "path": "90e0a729-5498-4df2-bfef-c4bf7f8ab73f",
+ "cellName": "API Call: Create Webhook - hook.go:L79-96",
+ "cellId": "90e0a729-5498-4df2-bfef-c4bf7f8ab73f",
+ "visible": true,
+ "parentCellId": "4e2643dd-9d0b-4335-ad1e-7afdc33bd158"
+ },
+ "routers/api/v1/repo/hook.go-simstep-76ada736-60f1-4b60-ac04-2a06ce0f08eb": {
+ "path": "routers/api/v1/repo/hook.go-simstep-76ada736-60f1-4b60-ac04-2a06ce0f08eb",
+ "fileName": "hook.go",
+ "wiki": "Gitea's API server receives a POST request to the `/api/v1/repos/{owner}/{repo}/hooks` endpoint to create a new webhook. The request body contains the webhook configuration.",
+ "cellName": "API Call: Create Webhook - hook.go:L79-96",
+ "cellId": "90e0a729-5498-4df2-bfef-c4bf7f8ab73f",
+ "visible": true,
+ "startLine": 79,
+ "endLine": 96,
+ "parentCellId": "4e2643dd-9d0b-4335-ad1e-7afdc33bd158",
+ "parentPath": "routers/api/v1/repo/hook.go"
+ },
+ "4efe568d-fb0e-4b73-bca4-93d8b23def0d": {
+ "path": "4efe568d-fb0e-4b73-bca4-93d8b23def0d",
+ "cellName": "Logic: Construct Webhook Object - hook.go:L210-260",
+ "cellId": "4efe568d-fb0e-4b73-bca4-93d8b23def0d",
+ "visible": true,
+ "parentCellId": "295b44d5-48fa-4bdb-aec3-8c84ddf9b86c"
+ },
+ "routers/api/v1/utils/hook.go-simstep-7d095ef9-2d9a-46ea-bd33-04da751e319f": {
+ "path": "routers/api/v1/utils/hook.go-simstep-7d095ef9-2d9a-46ea-bd33-04da751e319f",
+ "fileName": "hook.go",
+ "wiki": "The `addHook` function validates the provided configuration and constructs a `webhook.Webhook` model object. It processes the event types, sets the URL, content type, secret, and other metadata based on the request.",
+ "cellName": "Logic: Construct Webhook Object - hook.go:L210-260",
+ "cellId": "4efe568d-fb0e-4b73-bca4-93d8b23def0d",
+ "visible": true,
+ "startLine": 210,
+ "endLine": 260,
+ "parentCellId": "295b44d5-48fa-4bdb-aec3-8c84ddf9b86c",
+ "parentPath": "routers/api/v1/utils/hook.go"
+ },
+ "85b318b0-fc06-4e63-96e6-549a40657642": {
+ "path": "85b318b0-fc06-4e63-96e6-549a40657642",
+ "cellName": "Database: Insert Webhook Record - webhook.go:L228-231",
+ "cellId": "85b318b0-fc06-4e63-96e6-549a40657642",
+ "visible": true,
+ "parentCellId": "d8fcd25d-fb86-46b3-9277-197d7750b1dd"
+ },
+ "models/webhook/webhook.go-simstep-6cb0b191-90e3-4ddc-93d3-61a18c507e1a": {
+ "path": "models/webhook/webhook.go-simstep-6cb0b191-90e3-4ddc-93d3-61a18c507e1a",
+ "fileName": "webhook.go",
+ "wiki": "The `CreateWebhook` function executes an SQL INSERT statement to save the new webhook's details into the `webhook` table.",
+ "cellName": "Database: Insert Webhook Record - webhook.go:L228-231",
+ "cellId": "85b318b0-fc06-4e63-96e6-549a40657642",
+ "visible": true,
+ "startLine": 228,
+ "endLine": 231,
+ "parentCellId": "d8fcd25d-fb86-46b3-9277-197d7750b1dd",
+ "parentPath": "models/webhook/webhook.go"
+ },
+ "2bba0f9c-e4a6-4a85-9395-17a890477a91": {
+ "path": "2bba0f9c-e4a6-4a85-9395-17a890477a91",
+ "cellName": "API Response: Send Created Webhook - hook.go:L90-95",
+ "cellId": "2bba0f9c-e4a6-4a85-9395-17a890477a91",
+ "visible": true,
+ "parentCellId": "4e2643dd-9d0b-4335-ad1e-7afdc33bd158"
+ },
+ "routers/api/v1/repo/hook.go-simstep-907040df-6d7e-4c66-b65e-97fd1e1fb7f7": {
+ "path": "routers/api/v1/repo/hook.go-simstep-907040df-6d7e-4c66-b65e-97fd1e1fb7f7",
+ "fileName": "hook.go",
+ "wiki": "The API handler formats the webhook data into the appropriate API structure and sends a `201 Created` response to the client, including the JSON representation of the newly created webhook.",
+ "cellName": "API Response: Send Created Webhook - hook.go:L90-95",
+ "cellId": "2bba0f9c-e4a6-4a85-9395-17a890477a91",
+ "visible": true,
+ "startLine": 90,
+ "endLine": 95,
+ "parentCellId": "4e2643dd-9d0b-4335-ad1e-7afdc33bd158",
+ "parentPath": "routers/api/v1/repo/hook.go"
+ },
+ "f7d0dc25-3cff-4920-b358-54b0e1eb2285": {
+ "path": "f7d0dc25-3cff-4920-b358-54b0e1eb2285",
+ "cellName": "Event Trigger: Push Event Occurs - notifier.go:L643-666",
+ "cellId": "f7d0dc25-3cff-4920-b358-54b0e1eb2285",
+ "visible": true,
+ "parentCellId": "ee3c4395-ec52-49ae-b5f6-c0564e51e17f"
+ },
+ "services/webhook/notifier.go-simstep-aa2b12e0-ced0-40fd-9afe-d2dafe836790": {
+ "path": "services/webhook/notifier.go-simstep-aa2b12e0-ced0-40fd-9afe-d2dafe836790",
+ "fileName": "notifier.go",
+ "wiki": "A user pushes commits to a repository, triggering Gitea's notification system. The `PushCommits` method in the webhook notifier is called to handle this event.",
+ "cellName": "Event Trigger: Push Event Occurs - notifier.go:L643-666",
+ "cellId": "f7d0dc25-3cff-4920-b358-54b0e1eb2285",
+ "visible": true,
+ "startLine": 643,
+ "endLine": 666,
+ "parentCellId": "ee3c4395-ec52-49ae-b5f6-c0564e51e17f",
+ "parentPath": "services/webhook/notifier.go"
+ },
+ "d58f07ab-224c-45ad-8ec0-806dac605e87": {
+ "path": "d58f07ab-224c-45ad-8ec0-806dac605e87",
+ "cellName": "Logic: Find Matching Webhooks - webhook.go:L188-217",
+ "cellId": "d58f07ab-224c-45ad-8ec0-806dac605e87",
+ "visible": true,
+ "parentCellId": "324ebb2a-8eb7-4418-9d46-e6c6862f79f2"
+ },
+ "services/webhook/webhook.go-simstep-f12258ba-b683-4b8e-ae55-f9e9cb830e91": {
+ "path": "services/webhook/webhook.go-simstep-f12258ba-b683-4b8e-ae55-f9e9cb830e91",
+ "fileName": "webhook.go",
+ "wiki": "The `PrepareWebhooks` function queries the database to find all active webhooks (repository, organization, and system-level) that are configured to listen for the push event.",
+ "cellName": "Logic: Find Matching Webhooks - webhook.go:L188-217",
+ "cellId": "d58f07ab-224c-45ad-8ec0-806dac605e87",
+ "visible": true,
+ "startLine": 188,
+ "endLine": 217,
+ "parentCellId": "324ebb2a-8eb7-4418-9d46-e6c6862f79f2",
+ "parentPath": "services/webhook/webhook.go"
+ },
+ "7fda5f6b-b357-4c1c-b552-45b7146b697f": {
+ "path": "7fda5f6b-b357-4c1c-b552-45b7146b697f",
+ "cellName": "Logic: Create and Enqueue Hook Task - webhook.go:L129-172",
+ "cellId": "7fda5f6b-b357-4c1c-b552-45b7146b697f",
+ "visible": true,
+ "parentCellId": "324ebb2a-8eb7-4418-9d46-e6c6862f79f2"
+ },
+ "services/webhook/webhook.go-simstep-ca8b0022-2b6d-47f3-b750-132b50943f97": {
+ "path": "services/webhook/webhook.go-simstep-ca8b0022-2b6d-47f3-b750-132b50943f97",
+ "fileName": "webhook.go",
+ "wiki": "The `PrepareWebhook` function verifies the event and branch filters. If they match, it serializes the payload and creates a `HookTask` record in the database. It then enqueues the task ID for asynchronous delivery.",
+ "cellName": "Logic: Create and Enqueue Hook Task - webhook.go:L129-172",
+ "cellId": "7fda5f6b-b357-4c1c-b552-45b7146b697f",
+ "visible": true,
+ "startLine": 129,
+ "endLine": 172,
+ "parentCellId": "324ebb2a-8eb7-4418-9d46-e6c6862f79f2",
+ "parentPath": "services/webhook/webhook.go"
+ },
+ "8b1b81a8-1554-4802-b3f2-3f9e1a295792": {
+ "path": "8b1b81a8-1554-4802-b3f2-3f9e1a295792",
+ "cellName": "Worker: Dequeue and Fetch Task - webhook.go:L78-99",
+ "cellId": "8b1b81a8-1554-4802-b3f2-3f9e1a295792",
+ "visible": true,
+ "parentCellId": "324ebb2a-8eb7-4418-9d46-e6c6862f79f2"
+ },
+ "services/webhook/webhook.go-simstep-3da3ce55-4f26-4df2-b476-405ce84c47c6": {
+ "path": "services/webhook/webhook.go-simstep-3da3ce55-4f26-4df2-b476-405ce84c47c6",
+ "fileName": "webhook.go",
+ "wiki": "A background worker process dequeues the task ID and fetches the complete `HookTask` details, including the payload, from the database.",
+ "cellName": "Worker: Dequeue and Fetch Task - webhook.go:L78-99",
+ "cellId": "8b1b81a8-1554-4802-b3f2-3f9e1a295792",
+ "visible": true,
+ "startLine": 78,
+ "endLine": 99,
+ "parentCellId": "324ebb2a-8eb7-4418-9d46-e6c6862f79f2",
+ "parentPath": "services/webhook/webhook.go"
+ },
+ "78582255-93a6-4d8c-862e-6314bbb83142": {
+ "path": "78582255-93a6-4d8c-862e-6314bbb83142",
+ "cellName": "Dispatcher: Prepare and Send HTTP Request - deliver.go:L149-262",
+ "cellId": "78582255-93a6-4d8c-862e-6314bbb83142",
+ "visible": true,
+ "parentCellId": "e4e5f63d-e96f-4d9f-bbba-9a25dccf1be4"
+ },
+ "services/webhook/deliver.go-simstep-e8051428-7f7d-484f-a54d-402fad522be8": {
+ "path": "services/webhook/deliver.go-simstep-e8051428-7f7d-484f-a54d-402fad522be8",
+ "fileName": "deliver.go",
+ "wiki": "The `Deliver` function constructs the final HTTP request, including headers like `X-Gitea-Event` and a HMAC signature. It then sends this request to the webhook's configured target URL. Before sending, it marks the task as delivered to prevent duplicate dispatches.",
+ "cellName": "Dispatcher: Prepare and Send HTTP Request - deliver.go:L149-262",
+ "cellId": "78582255-93a6-4d8c-862e-6314bbb83142",
+ "visible": true,
+ "startLine": 149,
+ "endLine": 262,
+ "parentCellId": "e4e5f63d-e96f-4d9f-bbba-9a25dccf1be4",
+ "parentPath": "services/webhook/deliver.go"
+ },
+ "1955d69c-79d0-4a14-9de3-4a9a0fadeb54": {
+ "path": "1955d69c-79d0-4a14-9de3-4a9a0fadeb54",
+ "cellName": "Dispatcher: Record Delivery Result - deliver.go:L219-245",
+ "cellId": "1955d69c-79d0-4a14-9de3-4a9a0fadeb54",
+ "visible": true,
+ "parentCellId": "e4e5f63d-e96f-4d9f-bbba-9a25dccf1be4"
+ },
+ "services/webhook/deliver.go-simstep-93f1ca06-955c-441a-9f4d-7d515d95aeba": {
+ "path": "services/webhook/deliver.go-simstep-93f1ca06-955c-441a-9f4d-7d515d95aeba",
+ "fileName": "deliver.go",
+ "wiki": "Upon receiving a response from the external service, the `Deliver` function captures the HTTP status code, response body, and headers. It updates the `HookTask` record in the database with this information and marks the delivery as successful or failed.",
+ "cellName": "Dispatcher: Record Delivery Result - deliver.go:L219-245",
+ "cellId": "1955d69c-79d0-4a14-9de3-4a9a0fadeb54",
+ "visible": true,
+ "startLine": 219,
+ "endLine": 245,
+ "parentCellId": "e4e5f63d-e96f-4d9f-bbba-9a25dccf1be4",
+ "parentPath": "services/webhook/deliver.go"
+ },
+ "9eaf2897-e259-4e1a-a138-3e6844cec166": {
+ "path": "9eaf2897-e259-4e1a-a138-3e6844cec166",
+ "cellName": "Data Flow:\nPass Webhook\nOptions for\nCreation",
+ "cellId": "9eaf2897-e259-4e1a-a138-3e6844cec166",
+ "visible": true,
+ "parentCellId": "547773bf-f623-4285-bcf3-bc7352e83727"
+ },
+ "generated-edge-simstep-40191feb-a811-489e-a0f1-ea3d39bb00f9-9eaf2897-e259-4e1a-a138-3e6844cec166": {
+ "path": "generated-edge-simstep-40191feb-a811-489e-a0f1-ea3d39bb00f9-9eaf2897-e259-4e1a-a138-3e6844cec166",
+ "fileName": "hook.go",
+ "cellName": "Data Flow: Pass Webhook Options for Creation",
+ "cellId": "9eaf2897-e259-4e1a-a138-3e6844cec166",
+ "visible": true,
+ "startLine": 84,
+ "endLine": 84,
+ "parentPath": "routers/api/v1/repo/hook.go"
+ },
+ "87906207-d798-426c-8ec4-2b2fb40919ee": {
+ "path": "87906207-d798-426c-8ec4-2b2fb40919ee",
+ "cellName": "Database Query:\nPersist Webhook",
+ "cellId": "87906207-d798-426c-8ec4-2b2fb40919ee",
+ "visible": true
+ },
+ "generated-edge-simstep-80c189b4-7eb6-4e9c-800e-e21447dfbf72-87906207-d798-426c-8ec4-2b2fb40919ee": {
+ "path": "generated-edge-simstep-80c189b4-7eb6-4e9c-800e-e21447dfbf72-87906207-d798-426c-8ec4-2b2fb40919ee",
+ "fileName": "hook.go",
+ "cellName": "Database Query: Persist Webhook",
+ "cellId": "87906207-d798-426c-8ec4-2b2fb40919ee",
+ "visible": true,
+ "startLine": 262,
+ "endLine": 262,
+ "parentPath": "routers/api/v1/utils/hook.go"
+ },
+ "bd976180-7de9-43bd-8d1e-f58f93173cf2": {
+ "path": "bd976180-7de9-43bd-8d1e-f58f93173cf2",
+ "cellName": "Data Flow:\nReturn Created\nWebhook",
+ "cellId": "bd976180-7de9-43bd-8d1e-f58f93173cf2",
+ "visible": true
+ },
+ "generated-edge-simstep-16c11187-302e-4e92-a962-44d2cd8dbffe-bd976180-7de9-43bd-8d1e-f58f93173cf2": {
+ "path": "generated-edge-simstep-16c11187-302e-4e92-a962-44d2cd8dbffe-bd976180-7de9-43bd-8d1e-f58f93173cf2",
+ "fileName": "webhook.go",
+ "cellName": "Data Flow: Return Created Webhook",
+ "cellId": "bd976180-7de9-43bd-8d1e-f58f93173cf2",
+ "visible": true,
+ "startLine": 266,
+ "endLine": 266,
+ "parentPath": "models/webhook/webhook.go"
+ },
+ "cc057b38-3d8f-48b1-a4e6-fda341e23c20": {
+ "path": "cc057b38-3d8f-48b1-a4e6-fda341e23c20",
+ "cellName": "Notification Flow:\nInitiate Webhook\nPreparation",
+ "cellId": "cc057b38-3d8f-48b1-a4e6-fda341e23c20",
+ "visible": true,
+ "parentCellId": "2ebce87f-f247-403e-950a-4f695d05ac6e"
+ },
+ "generated-edge-simstep-fc5cc0e7-04a7-4a73-8467-9f7fcf4fe658-cc057b38-3d8f-48b1-a4e6-fda341e23c20": {
+ "path": "generated-edge-simstep-fc5cc0e7-04a7-4a73-8467-9f7fcf4fe658-cc057b38-3d8f-48b1-a4e6-fda341e23c20",
+ "fileName": "notifier.go",
+ "cellName": "Notification Flow: Initiate Webhook Preparation",
+ "cellId": "cc057b38-3d8f-48b1-a4e6-fda341e23c20",
+ "visible": true,
+ "startLine": 660,
+ "endLine": 660,
+ "parentPath": "services/webhook/notifier.go"
+ },
+ "139f905a-97c8-4303-855a-ccf3a7882b46": {
+ "path": "139f905a-97c8-4303-855a-ccf3a7882b46",
+ "cellName": "Data Flow:\nProcess Each\nWebhook",
+ "cellId": "139f905a-97c8-4303-855a-ccf3a7882b46",
+ "visible": true,
+ "parentCellId": "324ebb2a-8eb7-4418-9d46-e6c6862f79f2"
+ },
+ "generated-edge-simstep-deb804e2-437d-4acc-94be-43f8afbf4f0f-139f905a-97c8-4303-855a-ccf3a7882b46": {
+ "path": "generated-edge-simstep-deb804e2-437d-4acc-94be-43f8afbf4f0f-139f905a-97c8-4303-855a-ccf3a7882b46",
+ "fileName": "webhook.go",
+ "cellName": "Data Flow: Process Each Webhook",
+ "cellId": "139f905a-97c8-4303-855a-ccf3a7882b46",
+ "visible": true,
+ "startLine": 219,
+ "endLine": 223,
+ "parentPath": "services/webhook/webhook.go"
+ },
+ "789df1b7-e8cc-4bf0-9a85-c2dac7c64b00": {
+ "path": "789df1b7-e8cc-4bf0-9a85-c2dac7c64b00",
+ "cellName": "Queue: Task\nID Sent\nto Worker\nQueue",
+ "cellId": "789df1b7-e8cc-4bf0-9a85-c2dac7c64b00",
+ "visible": true,
+ "parentCellId": "324ebb2a-8eb7-4418-9d46-e6c6862f79f2"
+ },
+ "generated-edge-simstep-1bea30e4-8dd5-4d87-851c-51424da5ef6b-789df1b7-e8cc-4bf0-9a85-c2dac7c64b00": {
+ "path": "generated-edge-simstep-1bea30e4-8dd5-4d87-851c-51424da5ef6b-789df1b7-e8cc-4bf0-9a85-c2dac7c64b00",
+ "fileName": "webhook.go",
+ "cellName": "Queue: Task ID Sent to Worker Queue",
+ "cellId": "789df1b7-e8cc-4bf0-9a85-c2dac7c64b00",
+ "visible": true,
+ "startLine": 50,
+ "endLine": 53,
+ "parentPath": "services/webhook/webhook.go"
+ },
+ "58204391-3066-4cf2-8e28-579e26ce0d8a": {
+ "path": "58204391-3066-4cf2-8e28-579e26ce0d8a",
+ "cellName": "Data Flow:\nSend Task\nto Deliverer",
+ "cellId": "58204391-3066-4cf2-8e28-579e26ce0d8a",
+ "visible": true,
+ "parentCellId": "2ebce87f-f247-403e-950a-4f695d05ac6e"
+ },
+ "generated-edge-simstep-08055f7d-a4d9-4511-b553-c373069ae6aa-58204391-3066-4cf2-8e28-579e26ce0d8a": {
+ "path": "generated-edge-simstep-08055f7d-a4d9-4511-b553-c373069ae6aa-58204391-3066-4cf2-8e28-579e26ce0d8a",
+ "fileName": "webhook.go",
+ "cellName": "Data Flow: Send Task to Deliverer",
+ "cellId": "58204391-3066-4cf2-8e28-579e26ce0d8a",
+ "visible": true,
+ "startLine": 95,
+ "endLine": 95,
+ "parentPath": "services/webhook/webhook.go"
+ },
+ "5c98efaf-3371-47d1-92ec-08f5f1a408d2": {
+ "path": "5c98efaf-3371-47d1-92ec-08f5f1a408d2",
+ "cellName": "Network: Payload\nTransmitted",
+ "cellId": "5c98efaf-3371-47d1-92ec-08f5f1a408d2",
+ "visible": true,
+ "parentCellId": "e4e5f63d-e96f-4d9f-bbba-9a25dccf1be4"
+ },
+ "generated-edge-simstep-e6240b65-0ba9-4547-a519-45c09b25a567-5c98efaf-3371-47d1-92ec-08f5f1a408d2": {
+ "path": "generated-edge-simstep-e6240b65-0ba9-4547-a519-45c09b25a567-5c98efaf-3371-47d1-92ec-08f5f1a408d2",
+ "fileName": "deliver.go",
+ "cellName": "Network: Payload Transmitted",
+ "cellId": "5c98efaf-3371-47d1-92ec-08f5f1a408d2",
+ "visible": true,
+ "startLine": 248,
+ "endLine": 248,
+ "parentPath": "services/webhook/deliver.go"
+ },
+ "ae1da22a-a9d0-458e-89ab-2a63d212de9b": {
+ "path": "ae1da22a-a9d0-458e-89ab-2a63d212de9b",
+ "cellName": "auth",
+ "cellId": "ae1da22a-a9d0-458e-89ab-2a63d212de9b",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3"
+ },
+ "a6632228-3a8d-444a-9e04-e306ee1682a0": {
+ "path": "a6632228-3a8d-444a-9e04-e306ee1682a0",
+ "cellName": "auth",
+ "cellId": "a6632228-3a8d-444a-9e04-e306ee1682a0",
+ "visible": true,
+ "parentCellId": "4c5d55c2-d60f-4c4c-b674-bfed63fdd138"
+ },
+ "bd39a2a8-6696-4331-818b-3de73d784b19": {
+ "path": "bd39a2a8-6696-4331-818b-3de73d784b19",
+ "cellName": "signin.go",
+ "cellId": "bd39a2a8-6696-4331-818b-3de73d784b19",
+ "visible": true,
+ "parentCellId": "ae1da22a-a9d0-458e-89ab-2a63d212de9b"
+ },
+ "c9434e1d-28b1-4380-907c-8288b392b07b": {
+ "path": "c9434e1d-28b1-4380-907c-8288b392b07b",
+ "cellName": "source",
+ "cellId": "c9434e1d-28b1-4380-907c-8288b392b07b",
+ "visible": true,
+ "parentCellId": "ae1da22a-a9d0-458e-89ab-2a63d212de9b"
+ },
+ "2ad9e5d7-3a54-4e5a-b6a4-3c1ad81907c1": {
+ "path": "2ad9e5d7-3a54-4e5a-b6a4-3c1ad81907c1",
+ "cellName": "auth.go",
+ "cellId": "2ad9e5d7-3a54-4e5a-b6a4-3c1ad81907c1",
+ "visible": true,
+ "parentCellId": "a6632228-3a8d-444a-9e04-e306ee1682a0"
+ },
+ "de24489c-6df1-4c57-9419-5443e9986d88": {
+ "path": "de24489c-6df1-4c57-9419-5443e9986d88",
+ "cellName": "ldap",
+ "cellId": "de24489c-6df1-4c57-9419-5443e9986d88",
+ "visible": true,
+ "parentCellId": "c9434e1d-28b1-4380-907c-8288b392b07b"
+ },
+ "a0a0b2ce-286f-49a7-bd9a-9418bdfd6b48": {
+ "path": "a0a0b2ce-286f-49a7-bd9a-9418bdfd6b48",
+ "cellName": "source_authenticate.go",
+ "cellId": "a0a0b2ce-286f-49a7-bd9a-9418bdfd6b48",
+ "visible": true,
+ "parentCellId": "de24489c-6df1-4c57-9419-5443e9986d88"
+ },
+ "90ae1a9d-b4b6-42df-b7e9-fa206e89fbb8": {
+ "path": "90ae1a9d-b4b6-42df-b7e9-fa206e89fbb8",
+ "cellName": "source_search.go",
+ "cellId": "90ae1a9d-b4b6-42df-b7e9-fa206e89fbb8",
+ "visible": true,
+ "parentCellId": "de24489c-6df1-4c57-9419-5443e9986d88"
+ },
+ "df68b70e-609b-4e46-bd13-b2789a256937": {
+ "path": "df68b70e-609b-4e46-bd13-b2789a256937",
+ "cellName": "Handle Login Request - auth.go:L108-119",
+ "cellId": "df68b70e-609b-4e46-bd13-b2789a256937",
+ "visible": true,
+ "parentCellId": "2ad9e5d7-3a54-4e5a-b6a4-3c1ad81907c1"
+ },
+ "routers/web/auth/auth.go-simstep-de460200-3fc3-4ce4-85dd-55f7a1a902e0": {
+ "path": "routers/web/auth/auth.go-simstep-de460200-3fc3-4ce4-85dd-55f7a1a902e0",
+ "fileName": "auth.go",
+ "wiki": "The Gitea web server receives the user's login credentials from the login form. The `SignInPost` function is the entry point for handling this request and calls the authentication service.",
+ "cellName": "Handle Login Request - auth.go:L108-119",
+ "cellId": "df68b70e-609b-4e46-bd13-b2789a256937",
+ "visible": true,
+ "startLine": 108,
+ "endLine": 119,
+ "parentCellId": "2ad9e5d7-3a54-4e5a-b6a4-3c1ad81907c1",
+ "parentPath": "routers/web/auth/auth.go"
+ },
+ "9a31a054-afe3-4108-a222-e00c6711d764": {
+ "path": "9a31a054-afe3-4108-a222-e00c6711d764",
+ "cellName": "User Sign-In Orchestration - signin.go:L28-87",
+ "cellId": "9a31a054-afe3-4108-a222-e00c6711d764",
+ "visible": true,
+ "parentCellId": "bd39a2a8-6696-4331-818b-3de73d784b19"
+ },
+ "services/auth/signin.go-simstep-660ca44b-c08d-42e4-a28a-58caf0b6d6ab": {
+ "path": "services/auth/signin.go-simstep-660ca44b-c08d-42e4-a28a-58caf0b6d6ab",
+ "fileName": "signin.go",
+ "wiki": "The `UserSignIn` function first attempts to find the user in the local database. If the user does not exist or is linked to an external source, it iterates through all active authentication sources to find one that can authenticate the user.",
+ "cellName": "User Sign-In Orchestration - signin.go:L28-87",
+ "cellId": "9a31a054-afe3-4108-a222-e00c6711d764",
+ "visible": true,
+ "startLine": 28,
+ "endLine": 87,
+ "parentCellId": "bd39a2a8-6696-4331-818b-3de73d784b19",
+ "parentPath": "services/auth/signin.go"
+ },
+ "287f8218-823c-459c-8071-e71192fc9048": {
+ "path": "287f8218-823c-459c-8071-e71192fc9048",
+ "cellName": "LDAP Authenticate & Search Entry - source_authenticate.go:L24-32",
+ "cellId": "287f8218-823c-459c-8071-e71192fc9048",
+ "visible": true,
+ "parentCellId": "a0a0b2ce-286f-49a7-bd9a-9418bdfd6b48"
+ },
+ "services/auth/source/ldap/source_authenticate.go-simstep-a3a212e6-29d1-423c-aec2-e2bf5dc80756": {
+ "path": "services/auth/source/ldap/source_authenticate.go-simstep-a3a212e6-29d1-423c-aec2-e2bf5dc80756",
+ "fileName": "source_authenticate.go",
+ "wiki": "The `Authenticate` method for the LDAP source is called. It immediately calls the `SearchEntry` function to perform the actual connection, binding, and searching against the LDAP server.",
+ "cellName": "LDAP Authenticate & Search Entry - source_authenticate.go:L24-32",
+ "cellId": "287f8218-823c-459c-8071-e71192fc9048",
+ "visible": true,
+ "startLine": 24,
+ "endLine": 32,
+ "parentCellId": "a0a0b2ce-286f-49a7-bd9a-9418bdfd6b48",
+ "parentPath": "services/auth/source/ldap/source_authenticate.go"
+ },
+ "d0979ef4-d3ac-4772-9d30-df7852f72044": {
+ "path": "d0979ef4-d3ac-4772-9d30-df7852f72044",
+ "cellName": "Establish Connection to LDAP Server - source_search.go:L107-132",
+ "cellId": "d0979ef4-d3ac-4772-9d30-df7852f72044",
+ "visible": true,
+ "parentCellId": "90ae1a9d-b4b6-42df-b7e9-fa206e89fbb8"
+ },
+ "services/auth/source/ldap/source_search.go-simstep-ce938895-5d2d-4137-8207-18ec5a5454e6": {
+ "path": "services/auth/source/ldap/source_search.go-simstep-ce938895-5d2d-4137-8207-18ec5a5454e6",
+ "fileName": "source_search.go",
+ "wiki": "The `dial` function creates a TCP connection to the LDAP server. Based on the `SecurityProtocol` configuration, it may use `ldap.DialTLS` for LDAPS or upgrade an unencrypted connection using `conn.StartTLS` for StartTLS.",
+ "cellName": "Establish Connection to LDAP Server - source_search.go:L107-132",
+ "cellId": "d0979ef4-d3ac-4772-9d30-df7852f72044",
+ "visible": true,
+ "startLine": 107,
+ "endLine": 132,
+ "parentCellId": "90ae1a9d-b4b6-42df-b7e9-fa206e89fbb8",
+ "parentPath": "services/auth/source/ldap/source_search.go"
+ },
+ "00c27c1f-26a0-425b-9adc-f2f5af2d6262": {
+ "path": "00c27c1f-26a0-425b-9adc-f2f5af2d6262",
+ "cellName": "Search for User's Distinguished Name (DN) - source_search.go:L77-105",
+ "cellId": "00c27c1f-26a0-425b-9adc-f2f5af2d6262",
+ "visible": true,
+ "parentCellId": "90ae1a9d-b4b6-42df-b7e9-fa206e89fbb8"
+ },
+ "services/auth/source/ldap/source_search.go-simstep-76cd35ae-8050-4987-9381-32c9fde784e4": {
+ "path": "services/auth/source/ldap/source_search.go-simstep-76cd35ae-8050-4987-9381-32c9fde784e4",
+ "fileName": "source_search.go",
+ "wiki": "After successfully binding with the service account, the `findUserDN` function is called. It uses the `UserFilter` (e.g., `(&(objectClass=posixAccount)(uid=%s))`) and `UserBase` to search for the specific user entry and retrieve their DN.",
+ "cellName": "Search for User's Distinguished Name (DN) - source_search.go:L77-105",
+ "cellId": "00c27c1f-26a0-425b-9adc-f2f5af2d6262",
+ "visible": true,
+ "startLine": 77,
+ "endLine": 105,
+ "parentCellId": "90ae1a9d-b4b6-42df-b7e9-fa206e89fbb8",
+ "parentPath": "services/auth/source/ldap/source_search.go"
+ },
+ "853993e9-8e61-43c9-bdbc-ad0fc3191f57": {
+ "path": "853993e9-8e61-43c9-bdbc-ad0fc3191f57",
+ "cellName": "Fetch User Attributes from LDAP - source_search.go:L340-414",
+ "cellId": "853993e9-8e61-43c9-bdbc-ad0fc3191f57",
+ "visible": true,
+ "parentCellId": "90ae1a9d-b4b6-42df-b7e9-fa206e89fbb8"
+ },
+ "services/auth/source/ldap/source_search.go-simstep-2baf8794-62c5-44b8-a564-f3193c532ccd": {
+ "path": "services/auth/source/ldap/source_search.go-simstep-2baf8794-62c5-44b8-a564-f3193c532ccd",
+ "fileName": "source_search.go",
+ "wiki": "Upon successful authentication, `SearchEntry` performs a final LDAP search to fetch the user's attributes, such as `givenName`, `sn`, `mail`, and `sshPublicKey`. It also checks if the user matches the `AdminFilter`.",
+ "cellName": "Fetch User Attributes from LDAP - source_search.go:L340-414",
+ "cellId": "853993e9-8e61-43c9-bdbc-ad0fc3191f57",
+ "visible": true,
+ "startLine": 340,
+ "endLine": 414,
+ "parentCellId": "90ae1a9d-b4b6-42df-b7e9-fa206e89fbb8",
+ "parentPath": "services/auth/source/ldap/source_search.go"
+ },
+ "ef8eb7fc-c748-4b9c-8470-320a6a13cb97": {
+ "path": "ef8eb7fc-c748-4b9c-8470-320a6a13cb97",
+ "cellName": "Provision or Update Gitea User - source_authenticate.go:L50-169",
+ "cellId": "ef8eb7fc-c748-4b9c-8470-320a6a13cb97",
+ "visible": true,
+ "parentCellId": "a0a0b2ce-286f-49a7-bd9a-9418bdfd6b48"
+ },
+ "services/auth/source/ldap/source_authenticate.go-simstep-afbb7d9a-0643-4796-8ca2-8fe72357bc0e": {
+ "path": "services/auth/source/ldap/source_authenticate.go-simstep-afbb7d9a-0643-4796-8ca2-8fe72357bc0e",
+ "fileName": "source_authenticate.go",
+ "wiki": "The `Authenticate` method checks if the user exists in Gitea. If not, it creates a new user with the details from the `SearchResult`. If the user exists, it updates their profile information, admin status, and synchronizes SSH keys. An `ExternalLoginUser` record is created or updated to link the Gitea account to the LDAP identity.",
+ "cellName": "Provision or Update Gitea User - source_authenticate.go:L50-169",
+ "cellId": "ef8eb7fc-c748-4b9c-8470-320a6a13cb97",
+ "visible": true,
+ "startLine": 50,
+ "endLine": 169,
+ "parentCellId": "a0a0b2ce-286f-49a7-bd9a-9418bdfd6b48",
+ "parentPath": "services/auth/source/ldap/source_authenticate.go"
+ },
+ "a7b7c2b5-0068-46f0-b82c-1eacee946cdb": {
+ "path": "a7b7c2b5-0068-46f0-b82c-1eacee946cdb",
+ "cellName": "Create Web Session - auth.go:L157-192",
+ "cellId": "a7b7c2b5-0068-46f0-b82c-1eacee946cdb",
+ "visible": true,
+ "parentCellId": "2ad9e5d7-3a54-4e5a-b6a4-3c1ad81907c1"
+ },
+ "routers/web/auth/auth.go-simstep-0af9a86b-2996-4b9e-8e2b-1904f42e63ac": {
+ "path": "routers/web/auth/auth.go-simstep-0af9a86b-2996-4b9e-8e2b-1904f42e63ac",
+ "fileName": "auth.go",
+ "wiki": "The `SignInPost` web handler receives the authenticated user object, creates a new session, sets the session cookie in the user's browser, and redirects them to the dashboard.",
+ "cellName": "Create Web Session - auth.go:L157-192",
+ "cellId": "a7b7c2b5-0068-46f0-b82c-1eacee946cdb",
+ "visible": true,
+ "startLine": 157,
+ "endLine": 192,
+ "parentCellId": "2ad9e5d7-3a54-4e5a-b6a4-3c1ad81907c1",
+ "parentPath": "routers/web/auth/auth.go"
+ },
+ "7550ab04-4827-4480-813b-04b0047c3f97": {
+ "path": "7550ab04-4827-4480-813b-04b0047c3f97",
+ "cellName": "Call Authentication\nService",
+ "cellId": "7550ab04-4827-4480-813b-04b0047c3f97",
+ "visible": true
+ },
+ "generated-edge-simstep-239f8b69-e2d2-4da7-b3b3-3e2ceef5c2ac-7550ab04-4827-4480-813b-04b0047c3f97": {
+ "path": "generated-edge-simstep-239f8b69-e2d2-4da7-b3b3-3e2ceef5c2ac-7550ab04-4827-4480-813b-04b0047c3f97",
+ "fileName": "auth.go",
+ "cellName": "Call Authentication Service",
+ "cellId": "7550ab04-4827-4480-813b-04b0047c3f97",
+ "visible": true,
+ "startLine": 119,
+ "endLine": 119,
+ "parentPath": "routers/web/auth/auth.go"
+ },
+ "8d11a7b1-41ba-4b05-892c-c1581a535365": {
+ "path": "8d11a7b1-41ba-4b05-892c-c1581a535365",
+ "cellName": "Delegate to\nLDAP Authenticator",
+ "cellId": "8d11a7b1-41ba-4b05-892c-c1581a535365",
+ "visible": true,
+ "parentCellId": "ae1da22a-a9d0-458e-89ab-2a63d212de9b"
+ },
+ "generated-edge-simstep-57392fc2-e13c-4477-8980-4443ef60742e-8d11a7b1-41ba-4b05-892c-c1581a535365": {
+ "path": "generated-edge-simstep-57392fc2-e13c-4477-8980-4443ef60742e-8d11a7b1-41ba-4b05-892c-c1581a535365",
+ "fileName": "signin.go",
+ "cellName": "Delegate to LDAP Authenticator",
+ "cellId": "8d11a7b1-41ba-4b05-892c-c1581a535365",
+ "visible": true,
+ "startLine": 87,
+ "endLine": 87,
+ "parentPath": "services/auth/signin.go"
+ },
+ "7a2c7f85-74cf-40f2-b9a6-10d85ac527df": {
+ "path": "7a2c7f85-74cf-40f2-b9a6-10d85ac527df",
+ "cellName": "Initiate LDAP\nConnection",
+ "cellId": "7a2c7f85-74cf-40f2-b9a6-10d85ac527df",
+ "visible": true,
+ "parentCellId": "de24489c-6df1-4c57-9419-5443e9986d88"
+ },
+ "generated-edge-simstep-633c6f49-102e-4305-8433-7a69053a1f09-7a2c7f85-74cf-40f2-b9a6-10d85ac527df": {
+ "path": "generated-edge-simstep-633c6f49-102e-4305-8433-7a69053a1f09-7a2c7f85-74cf-40f2-b9a6-10d85ac527df",
+ "fileName": "source_authenticate.go",
+ "cellName": "Initiate LDAP Connection",
+ "cellId": "7a2c7f85-74cf-40f2-b9a6-10d85ac527df",
+ "visible": true,
+ "startLine": 266,
+ "endLine": 266,
+ "parentPath": "services/auth/source/ldap/source_authenticate.go"
+ },
+ "9480a9ba-eeb9-4aad-85a3-aa830b1e46dc": {
+ "path": "9480a9ba-eeb9-4aad-85a3-aa830b1e46dc",
+ "cellName": "Bind with\nService Account\n(BindDN)",
+ "cellId": "9480a9ba-eeb9-4aad-85a3-aa830b1e46dc",
+ "visible": true,
+ "parentCellId": "90ae1a9d-b4b6-42df-b7e9-fa206e89fbb8"
+ },
+ "generated-edge-simstep-89a427cc-153d-4b8a-8e5f-e983710a2751-9480a9ba-eeb9-4aad-85a3-aa830b1e46dc": {
+ "path": "generated-edge-simstep-89a427cc-153d-4b8a-8e5f-e983710a2751-9480a9ba-eeb9-4aad-85a3-aa830b1e46dc",
+ "fileName": "source_search.go",
+ "cellName": "Bind with Service Account (BindDN)",
+ "cellId": "9480a9ba-eeb9-4aad-85a3-aa830b1e46dc",
+ "visible": true,
+ "startLine": 307,
+ "endLine": 307,
+ "parentPath": "services/auth/source/ldap/source_search.go"
+ },
+ "c1ce39a1-0844-41af-b3b5-42105f03de44": {
+ "path": "c1ce39a1-0844-41af-b3b5-42105f03de44",
+ "cellName": "Authenticate with\nUser Credentials",
+ "cellId": "c1ce39a1-0844-41af-b3b5-42105f03de44",
+ "visible": true,
+ "parentCellId": "90ae1a9d-b4b6-42df-b7e9-fa206e89fbb8"
+ },
+ "generated-edge-simstep-cb0c2053-812b-4828-b712-5b39c702a738-c1ce39a1-0844-41af-b3b5-42105f03de44": {
+ "path": "generated-edge-simstep-cb0c2053-812b-4828-b712-5b39c702a738-c1ce39a1-0844-41af-b3b5-42105f03de44",
+ "fileName": "source_search.go",
+ "cellName": "Authenticate with User Credentials",
+ "cellId": "c1ce39a1-0844-41af-b3b5-42105f03de44",
+ "visible": true,
+ "startLine": 326,
+ "endLine": 326,
+ "parentPath": "services/auth/source/ldap/source_search.go"
+ },
+ "98842aae-5f17-4c78-810f-775eb06c4e94": {
+ "path": "98842aae-5f17-4c78-810f-775eb06c4e94",
+ "cellName": "Return Populated\nUser Data",
+ "cellId": "98842aae-5f17-4c78-810f-775eb06c4e94",
+ "visible": true,
+ "parentCellId": "de24489c-6df1-4c57-9419-5443e9986d88"
+ },
+ "generated-edge-simstep-9957a28c-8e0c-4530-94a5-136e7aaa1130-98842aae-5f17-4c78-810f-775eb06c4e94": {
+ "path": "generated-edge-simstep-9957a28c-8e0c-4530-94a5-136e7aaa1130-98842aae-5f17-4c78-810f-775eb06c4e94",
+ "fileName": "source_search.go",
+ "cellName": "Return Populated User Data",
+ "cellId": "98842aae-5f17-4c78-810f-775eb06c4e94",
+ "visible": true,
+ "startLine": 414,
+ "endLine": 414,
+ "parentPath": "services/auth/source/ldap/source_search.go"
+ },
+ "f8ce50e7-326c-495a-8afa-5052ad817766": {
+ "path": "f8ce50e7-326c-495a-8afa-5052ad817766",
+ "cellName": "Return Authenticated\nUser Object",
+ "cellId": "f8ce50e7-326c-495a-8afa-5052ad817766",
+ "visible": true
+ },
+ "generated-edge-simstep-35ca6447-1574-4dbb-b6b7-5dc9f0d4abca-f8ce50e7-326c-495a-8afa-5052ad817766": {
+ "path": "generated-edge-simstep-35ca6447-1574-4dbb-b6b7-5dc9f0d4abca-f8ce50e7-326c-495a-8afa-5052ad817766",
+ "fileName": "source_authenticate.go",
+ "cellName": "Return Authenticated User Object",
+ "cellId": "f8ce50e7-326c-495a-8afa-5052ad817766",
+ "visible": true,
+ "startLine": 172,
+ "endLine": 172,
+ "parentPath": "services/auth/source/ldap/source_authenticate.go"
+ },
+ "f303d583-ee5b-4623-943e-60565b1e9631": {
+ "path": "f303d583-ee5b-4623-943e-60565b1e9631",
+ "cellName": "cron",
+ "cellId": "f303d583-ee5b-4623-943e-60565b1e9631",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3"
+ },
+ "be189c27-22c4-488a-95ee-4106d357a6a1": {
+ "path": "be189c27-22c4-488a-95ee-4106d357a6a1",
+ "cellName": "mirror",
+ "cellId": "be189c27-22c4-488a-95ee-4106d357a6a1",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3"
+ },
+ "107d36b9-9cb1-45ca-8663-314abeddd662": {
+ "path": "107d36b9-9cb1-45ca-8663-314abeddd662",
+ "cellName": "fork.go",
+ "cellId": "107d36b9-9cb1-45ca-8663-314abeddd662",
+ "visible": true,
+ "parentCellId": "825b9e8b-b738-4712-bd94-10d08696cae1"
+ },
+ "d32cb5cb-563a-45af-8d4c-9abf1317a647": {
+ "path": "d32cb5cb-563a-45af-8d4c-9abf1317a647",
+ "cellName": "tasks_basic.go",
+ "cellId": "d32cb5cb-563a-45af-8d4c-9abf1317a647",
+ "visible": true,
+ "parentCellId": "f303d583-ee5b-4623-943e-60565b1e9631"
+ },
+ "6b12a694-4b0c-4f03-a4f0-100770e8e8db": {
+ "path": "6b12a694-4b0c-4f03-a4f0-100770e8e8db",
+ "cellName": "mirror.go",
+ "cellId": "6b12a694-4b0c-4f03-a4f0-100770e8e8db",
+ "visible": true,
+ "parentCellId": "be189c27-22c4-488a-95ee-4106d357a6a1"
+ },
+ "4d118f1a-fbc0-48e8-ac1c-1d9d6a6f9175": {
+ "path": "4d118f1a-fbc0-48e8-ac1c-1d9d6a6f9175",
+ "cellName": "queue.go",
+ "cellId": "4d118f1a-fbc0-48e8-ac1c-1d9d6a6f9175",
+ "visible": true,
+ "parentCellId": "be189c27-22c4-488a-95ee-4106d357a6a1"
+ },
+ "81c9d8c9-e4be-49a9-b19a-3274140914b3": {
+ "path": "81c9d8c9-e4be-49a9-b19a-3274140914b3",
+ "cellName": "mirror_pull.go",
+ "cellId": "81c9d8c9-e4be-49a9-b19a-3274140914b3",
+ "visible": true,
+ "parentCellId": "be189c27-22c4-488a-95ee-4106d357a6a1"
+ },
+ "d86b1308-1a5b-4a28-8842-a0e4d633ad62": {
+ "path": "d86b1308-1a5b-4a28-8842-a0e4d633ad62",
+ "cellName": "fork.go",
+ "cellId": "d86b1308-1a5b-4a28-8842-a0e4d633ad62",
+ "visible": true,
+ "parentCellId": "e0bd77b2-9399-46af-ada1-62c5c4852b6f"
+ },
+ "b27685e7-6df0-4c06-a0b1-00beb27c86c3": {
+ "path": "b27685e7-6df0-4c06-a0b1-00beb27c86c3",
+ "cellName": "Flow: Repository Forking - API: Receive Fork Request - fork.go:L151-159",
+ "cellId": "b27685e7-6df0-4c06-a0b1-00beb27c86c3",
+ "visible": true,
+ "parentCellId": "d86b1308-1a5b-4a28-8842-a0e4d633ad62"
+ },
+ "routers/api/v1/repo/fork.go-simstep-db85ab4c-6720-4017-bf0f-aaba20353724": {
+ "path": "routers/api/v1/repo/fork.go-simstep-db85ab4c-6720-4017-bf0f-aaba20353724",
+ "fileName": "fork.go",
+ "wiki": "The API endpoint `/repos/{owner}/{repo}/forks` receives a POST request to fork a repository. It validates the user's permissions, parses the request payload for optional new owner or name, and prepares to call the forking service.",
+ "cellName": "Flow: Repository Forking - API: Receive Fork Request - fork.go:L151-159",
+ "cellId": "b27685e7-6df0-4c06-a0b1-00beb27c86c3",
+ "visible": true,
+ "startLine": 151,
+ "endLine": 159,
+ "parentCellId": "d86b1308-1a5b-4a28-8842-a0e4d633ad62",
+ "parentPath": "routers/api/v1/repo/fork.go"
+ },
+ "914714c3-26ca-4e05-87fb-5ba226f7e4c3": {
+ "path": "914714c3-26ca-4e05-87fb-5ba226f7e4c3",
+ "cellName": "Flow: Repository Forking - Service: Execute Core Fork Logic - fork.go:L58-210",
+ "cellId": "914714c3-26ca-4e05-87fb-5ba226f7e4c3",
+ "visible": true,
+ "parentCellId": "107d36b9-9cb1-45ca-8663-314abeddd662"
+ },
+ "services/repository/fork.go-simstep-11f9bf8c-700e-46aa-864c-c8d401074487": {
+ "path": "services/repository/fork.go-simstep-11f9bf8c-700e-46aa-864c-c8d401074487",
+ "fileName": "fork.go",
+ "wiki": "The `ForkRepository` service function orchestrates the forking process. It performs critical checks (e.g., if a fork already exists, repository creation limits), creates a new repository record in the database, clones the git data from the base repository to the new one, and updates the fork count on the original repository.",
+ "cellName": "Flow: Repository Forking - Service: Execute Core Fork Logic - fork.go:L58-210",
+ "cellId": "914714c3-26ca-4e05-87fb-5ba226f7e4c3",
+ "visible": true,
+ "startLine": 58,
+ "endLine": 210,
+ "parentCellId": "107d36b9-9cb1-45ca-8663-314abeddd662",
+ "parentPath": "services/repository/fork.go"
+ },
+ "b7a0a93a-d46e-473a-a07f-7da223c55a95": {
+ "path": "b7a0a93a-d46e-473a-a07f-7da223c55a95",
+ "cellName": "Flow: Repository Forking - Notification Hub: Process Fork Event - notify.go:L311-315",
+ "cellId": "b7a0a93a-d46e-473a-a07f-7da223c55a95",
+ "visible": true,
+ "parentCellId": "4ab5206e-2bb5-411c-ab1f-17a126f951b3"
+ },
+ "services/notify/notify.go-simstep-ddb168e8-da57-418a-82f2-28b2b22dae09": {
+ "path": "services/notify/notify.go-simstep-ddb168e8-da57-418a-82f2-28b2b22dae09",
+ "fileName": "notify.go",
+ "wiki": "The central notification service receives the fork event and iterates through all registered notifiers (e.g., for webhooks, actions, activity feeds), calling the `ForkRepository` method on each one.",
+ "cellName": "Flow: Repository Forking - Notification Hub: Process Fork Event - notify.go:L311-315",
+ "cellId": "b7a0a93a-d46e-473a-a07f-7da223c55a95",
+ "visible": true,
+ "startLine": 311,
+ "endLine": 315,
+ "parentCellId": "4ab5206e-2bb5-411c-ab1f-17a126f951b3",
+ "parentPath": "services/notify/notify.go"
+ },
+ "417f8e37-4b9a-4ef5-997d-c88421fb0ec2": {
+ "path": "417f8e37-4b9a-4ef5-997d-c88421fb0ec2",
+ "cellName": "Flow: Repository Forking - Webhook: Prepare and Send Payload - notifier.go:L85-94",
+ "cellId": "417f8e37-4b9a-4ef5-997d-c88421fb0ec2",
+ "visible": true,
+ "parentCellId": "ee3c4395-ec52-49ae-b5f6-c0564e51e17f"
+ },
+ "services/webhook/notifier.go-simstep-24889f3c-0f56-4418-9dce-63d75388b45d": {
+ "path": "services/webhook/notifier.go-simstep-24889f3c-0f56-4418-9dce-63d75388b45d",
+ "fileName": "notifier.go",
+ "wiki": "The webhook notifier constructs a JSON payload for the `fork` event, containing information about the original repository (forkee), the new forked repository, and the user who performed the action. It then sends this payload to all webhooks configured for the original repository.",
+ "cellName": "Flow: Repository Forking - Webhook: Prepare and Send Payload - notifier.go:L85-94",
+ "cellId": "417f8e37-4b9a-4ef5-997d-c88421fb0ec2",
+ "visible": true,
+ "startLine": 85,
+ "endLine": 94,
+ "parentCellId": "ee3c4395-ec52-49ae-b5f6-c0564e51e17f",
+ "parentPath": "services/webhook/notifier.go"
+ },
+ "9e7ba7fa-caa3-41e2-ac5f-373890d534ab": {
+ "path": "9e7ba7fa-caa3-41e2-ac5f-373890d534ab",
+ "cellName": "Flow: Repository Mirroring - Cron: Scheduled Mirror Sync Trigger - tasks_basic.go:L25-43",
+ "cellId": "9e7ba7fa-caa3-41e2-ac5f-373890d534ab",
+ "visible": true,
+ "parentCellId": "d32cb5cb-563a-45af-8d4c-9abf1317a647"
+ },
+ "services/cron/tasks_basic.go-simstep-e70de2fd-29c5-4cb6-813c-264a2a622b2d": {
+ "path": "services/cron/tasks_basic.go-simstep-e70de2fd-29c5-4cb6-813c-264a2a622b2d",
+ "fileName": "tasks_basic.go",
+ "wiki": "A cron task named 'update_mirrors' is registered to run periodically (e.g., every 10 minutes). When the scheduler triggers this task, it initiates the process of updating all mirrored repositories in the system.",
+ "cellName": "Flow: Repository Mirroring - Cron: Scheduled Mirror Sync Trigger - tasks_basic.go:L25-43",
+ "cellId": "9e7ba7fa-caa3-41e2-ac5f-373890d534ab",
+ "visible": true,
+ "startLine": 25,
+ "endLine": 43,
+ "parentCellId": "d32cb5cb-563a-45af-8d4c-9abf1317a647",
+ "parentPath": "services/cron/tasks_basic.go"
+ },
+ "43d0c4c2-5f6a-46e7-b1f1-c8859c97ab4f": {
+ "path": "43d0c4c2-5f6a-46e7-b1f1-c8859c97ab4f",
+ "cellName": "Flow: Repository Mirroring - Service: Enqueue Mirrors for Sync - mirror.go:L31-73",
+ "cellId": "43d0c4c2-5f6a-46e7-b1f1-c8859c97ab4f",
+ "visible": true,
+ "parentCellId": "6b12a694-4b0c-4f03-a4f0-100770e8e8db"
+ },
+ "services/mirror/mirror.go-simstep-f00d42da-34d8-4564-a701-73b37241bc1e": {
+ "path": "services/mirror/mirror.go-simstep-f00d42da-34d8-4564-a701-73b37241bc1e",
+ "fileName": "mirror.go",
+ "wiki": "The mirror service queries the database for pull and push mirrors that are due for an update based on their last sync time and interval. It then adds the IDs of these repositories to a background processing queue.",
+ "cellName": "Flow: Repository Mirroring - Service: Enqueue Mirrors for Sync - mirror.go:L31-73",
+ "cellId": "43d0c4c2-5f6a-46e7-b1f1-c8859c97ab4f",
+ "visible": true,
+ "startLine": 31,
+ "endLine": 73,
+ "parentCellId": "6b12a694-4b0c-4f03-a4f0-100770e8e8db",
+ "parentPath": "services/mirror/mirror.go"
+ },
+ "ae6f102c-562a-4665-b562-b86cc0aac8d1": {
+ "path": "ae6f102c-562a-4665-b562-b86cc0aac8d1",
+ "cellName": "Flow: Repository Mirroring - Worker: Execute Pull Mirror Sync - mirror_pull.go:L36-173",
+ "cellId": "ae6f102c-562a-4665-b562-b86cc0aac8d1",
+ "visible": true,
+ "parentCellId": "81c9d8c9-e4be-49a9-b19a-3274140914b3"
+ },
+ "services/mirror/mirror_pull.go-simstep-1d09c452-183e-4857-aef6-9f0e66f0224a": {
+ "path": "services/mirror/mirror_pull.go-simstep-1d09c452-183e-4857-aef6-9f0e66f0224a",
+ "fileName": "mirror_pull.go",
+ "wiki": "A background worker picks a repository ID from the queue and calls `SyncPullMirror`. This function performs the core sync logic: it runs `git remote update` to fetch all changes from the upstream repository, updates all local branches and tags, and syncs associated data like LFS objects and releases.",
+ "cellName": "Flow: Repository Mirroring - Worker: Execute Pull Mirror Sync - mirror_pull.go:L36-173",
+ "cellId": "ae6f102c-562a-4665-b562-b86cc0aac8d1",
+ "visible": true,
+ "startLine": 36,
+ "endLine": 173,
+ "parentCellId": "81c9d8c9-e4be-49a9-b19a-3274140914b3",
+ "parentPath": "services/mirror/mirror_pull.go"
+ },
+ "0d0951da-962a-47bf-aaf1-da7ba73163d8": {
+ "path": "0d0951da-962a-47bf-aaf1-da7ba73163d8",
+ "cellName": "Flow: Repository\nForking -\nAPI Call:\nInvoke ForkRepository\nService",
+ "cellId": "0d0951da-962a-47bf-aaf1-da7ba73163d8",
+ "visible": true
+ },
+ "generated-edge-simstep-93cbc173-2cab-414f-b3d6-f0ea878c93c3-0d0951da-962a-47bf-aaf1-da7ba73163d8": {
+ "path": "generated-edge-simstep-93cbc173-2cab-414f-b3d6-f0ea878c93c3-0d0951da-962a-47bf-aaf1-da7ba73163d8",
+ "fileName": "fork.go",
+ "cellName": "Flow: Repository Forking - API Call: Invoke ForkRepository Service",
+ "cellId": "0d0951da-962a-47bf-aaf1-da7ba73163d8",
+ "visible": true,
+ "startLine": 155,
+ "endLine": 159,
+ "parentPath": "routers/api/v1/repo/fork.go"
+ },
+ "9413f317-6cff-4edf-acc6-f2cf0ba9b669": {
+ "path": "9413f317-6cff-4edf-acc6-f2cf0ba9b669",
+ "cellName": "Flow: Repository\nForking -\nEvent Dispatch:\nTrigger Notifications",
+ "cellId": "9413f317-6cff-4edf-acc6-f2cf0ba9b669",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3"
+ },
+ "generated-edge-simstep-512e90f0-0392-437f-99f2-49d7e291d597-9413f317-6cff-4edf-acc6-f2cf0ba9b669": {
+ "path": "generated-edge-simstep-512e90f0-0392-437f-99f2-49d7e291d597-9413f317-6cff-4edf-acc6-f2cf0ba9b669",
+ "fileName": "fork.go",
+ "cellName": "Flow: Repository Forking - Event Dispatch: Trigger Notifications",
+ "cellId": "9413f317-6cff-4edf-acc6-f2cf0ba9b669",
+ "visible": true,
+ "startLine": 206,
+ "endLine": 206,
+ "parentPath": "services/repository/fork.go"
+ },
+ "6fa84983-5d43-48e3-a028-9729688c1a00": {
+ "path": "6fa84983-5d43-48e3-a028-9729688c1a00",
+ "cellName": "Flow: Repository\nForking -\nFan-out: Send\nto Webhook\nNotifier",
+ "cellId": "6fa84983-5d43-48e3-a028-9729688c1a00",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3"
+ },
+ "generated-edge-simstep-4fd9e36f-4d1d-4083-a6ed-8184c7eefa94-6fa84983-5d43-48e3-a028-9729688c1a00": {
+ "path": "generated-edge-simstep-4fd9e36f-4d1d-4083-a6ed-8184c7eefa94-6fa84983-5d43-48e3-a028-9729688c1a00",
+ "fileName": "notify.go",
+ "cellName": "Flow: Repository Forking - Fan-out: Send to Webhook Notifier",
+ "cellId": "6fa84983-5d43-48e3-a028-9729688c1a00",
+ "visible": true,
+ "startLine": 312,
+ "endLine": 314,
+ "parentPath": "services/notify/notify.go"
+ },
+ "993d56ee-fde7-459d-963c-783f748e62d9": {
+ "path": "993d56ee-fde7-459d-963c-783f748e62d9",
+ "cellName": "Flow: Repository\nMirroring -\nCron Call:\nInvoke Mirror\nUpdate Service",
+ "cellId": "993d56ee-fde7-459d-963c-783f748e62d9",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3"
+ },
+ "generated-edge-simstep-aba987db-5d57-4f81-a947-2f3e9df1cb98-993d56ee-fde7-459d-963c-783f748e62d9": {
+ "path": "generated-edge-simstep-aba987db-5d57-4f81-a947-2f3e9df1cb98-993d56ee-fde7-459d-963c-783f748e62d9",
+ "fileName": "tasks_basic.go",
+ "cellName": "Flow: Repository Mirroring - Cron Call: Invoke Mirror Update Service",
+ "cellId": "993d56ee-fde7-459d-963c-783f748e62d9",
+ "visible": true,
+ "startLine": 41,
+ "endLine": 41,
+ "parentPath": "services/cron/tasks_basic.go"
+ },
+ "276130b8-05bb-4961-9852-c0084d6c73c2": {
+ "path": "276130b8-05bb-4961-9852-c0084d6c73c2",
+ "cellName": "Flow: Repository\nMirroring -\nQueue: Data\nto Background\nWorker",
+ "cellId": "276130b8-05bb-4961-9852-c0084d6c73c2",
+ "visible": true,
+ "parentCellId": "be189c27-22c4-488a-95ee-4106d357a6a1"
+ },
+ "generated-edge-simstep-fad04734-cb78-4c64-aae2-84c8eadf98fc-276130b8-05bb-4961-9852-c0084d6c73c2": {
+ "path": "generated-edge-simstep-fad04734-cb78-4c64-aae2-84c8eadf98fc-276130b8-05bb-4961-9852-c0084d6c73c2",
+ "fileName": "mirror.go",
+ "cellName": "Flow: Repository Mirroring - Queue: Data to Background Worker",
+ "cellId": "276130b8-05bb-4961-9852-c0084d6c73c2",
+ "visible": true,
+ "startLine": 21,
+ "endLine": 27,
+ "parentPath": "services/mirror/mirror.go"
+ },
+ "47c57001-a9f1-4b7e-9db5-d6a23bb48f72": {
+ "path": "47c57001-a9f1-4b7e-9db5-d6a23bb48f72",
+ "cellName": "wiki",
+ "cellId": "47c57001-a9f1-4b7e-9db5-d6a23bb48f72",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3"
+ },
+ "709e822a-a82a-4608-9a45-af356bc74660": {
+ "path": "709e822a-a82a-4608-9a45-af356bc74660",
+ "cellName": "release",
+ "cellId": "709e822a-a82a-4608-9a45-af356bc74660",
+ "visible": true,
+ "parentCellId": "2095457c-08fa-4087-baae-dd962ebe60d3"
+ },
+ "79b6908f-15a8-4264-a79f-e311b37d277d": {
+ "path": "79b6908f-15a8-4264-a79f-e311b37d277d",
+ "cellName": "wiki.go",
+ "cellId": "79b6908f-15a8-4264-a79f-e311b37d277d",
+ "visible": true,
+ "parentCellId": "47c57001-a9f1-4b7e-9db5-d6a23bb48f72"
+ },
+ "c150bfc9-bce2-4250-b468-2b5a81f74e87": {
+ "path": "c150bfc9-bce2-4250-b468-2b5a81f74e87",
+ "cellName": "release.go",
+ "cellId": "c150bfc9-bce2-4250-b468-2b5a81f74e87",
+ "visible": true,
+ "parentCellId": "709e822a-a82a-4608-9a45-af356bc74660"
+ },
+ "5c010790-dade-4ba3-a3dd-bb0cd571fcc6": {
+ "path": "5c010790-dade-4ba3-a3dd-bb0cd571fcc6",
+ "cellName": "wiki.go",
+ "cellId": "5c010790-dade-4ba3-a3dd-bb0cd571fcc6",
+ "visible": true,
+ "parentCellId": "e784820c-8d2c-4480-8888-bf60f961f4b7"
+ },
+ "50fc0867-77a6-428d-9687-0377657129cf": {
+ "path": "50fc0867-77a6-428d-9687-0377657129cf",
+ "cellName": "release.go",
+ "cellId": "50fc0867-77a6-428d-9687-0377657129cf",
+ "visible": true,
+ "parentCellId": "e784820c-8d2c-4480-8888-bf60f961f4b7"
+ },
+ "a6a31b25-0e4c-4044-8c56-1a79bf2ab773": {
+ "path": "a6a31b25-0e4c-4044-8c56-1a79bf2ab773",
+ "cellName": "Wiki: View Wiki Page - wiki.go:L450-516",
+ "cellId": "a6a31b25-0e4c-4044-8c56-1a79bf2ab773",
+ "visible": true,
+ "parentCellId": "5c010790-dade-4ba3-a3dd-bb0cd571fcc6"
+ },
+ "routers/web/repo/wiki.go-simstep-90a80659-4a4f-4034-aab4-d0bfbc1febb4": {
+ "path": "routers/web/repo/wiki.go-simstep-90a80659-4a4f-4034-aab4-d0bfbc1febb4",
+ "fileName": "wiki.go",
+ "wiki": "A user navigates to a repository's wiki. The backend router maps the request to the `Wiki` handler. The handler checks if the wiki exists, fetches the specific page's content from the wiki's Git repository, renders it from Markdown to HTML, and serves the `repo/wiki/view` template.",
+ "cellName": "Wiki: View Wiki Page - wiki.go:L450-516",
+ "cellId": "a6a31b25-0e4c-4044-8c56-1a79bf2ab773",
+ "visible": true,
+ "startLine": 450,
+ "endLine": 516,
+ "parentCellId": "5c010790-dade-4ba3-a3dd-bb0cd571fcc6",
+ "parentPath": "routers/web/repo/wiki.go"
+ },
+ "c20c49a4-694f-4fbd-b9e1-b23b134f1cce": {
+ "path": "c20c49a4-694f-4fbd-b9e1-b23b134f1cce",
+ "cellName": "Wiki: Submit New Page Form - wiki.go:L663-680",
+ "cellId": "c20c49a4-694f-4fbd-b9e1-b23b134f1cce",
+ "visible": true,
+ "parentCellId": "5c010790-dade-4ba3-a3dd-bb0cd571fcc6"
+ },
+ "routers/web/repo/wiki.go-simstep-c33becb1-0fbc-4f7b-8985-6b66630e84de": {
+ "path": "routers/web/repo/wiki.go-simstep-c33becb1-0fbc-4f7b-8985-6b66630e84de",
+ "fileName": "wiki.go",
+ "wiki": "A user submits the form for creating a new wiki page. The request is handled by `NewWikiPost`, which binds and validates the form data including the title, content, and an optional commit message.",
+ "cellName": "Wiki: Submit New Page Form - wiki.go:L663-680",
+ "cellId": "c20c49a4-694f-4fbd-b9e1-b23b134f1cce",
+ "visible": true,
+ "startLine": 663,
+ "endLine": 680,
+ "parentCellId": "5c010790-dade-4ba3-a3dd-bb0cd571fcc6",
+ "parentPath": "routers/web/repo/wiki.go"
+ },
+ "5c1d4e84-2b24-4364-892a-ad94f5c6a976": {
+ "path": "5c1d4e84-2b24-4364-892a-ad94f5c6a976",
+ "cellName": "Wiki: Commit Page to Git Repository - wiki.go:L239-242",
+ "cellId": "5c1d4e84-2b24-4364-892a-ad94f5c6a976",
+ "visible": true,
+ "parentCellId": "79b6908f-15a8-4264-a79f-e311b37d277d"
+ },
+ "services/wiki/wiki.go-simstep-c97445dd-e5af-4fda-88f8-5239054437b7": {
+ "path": "services/wiki/wiki.go-simstep-c97445dd-e5af-4fda-88f8-5239054437b7",
+ "fileName": "wiki.go",
+ "wiki": "The `AddWikiPage` service function locks the wiki repository, clones it to a temporary location, writes the new content to a file, commits the change using the provided message, and pushes it back to the bare wiki repository.",
+ "cellName": "Wiki: Commit Page to Git Repository - wiki.go:L239-242",
+ "cellId": "5c1d4e84-2b24-4364-892a-ad94f5c6a976",
+ "visible": true,
+ "startLine": 239,
+ "endLine": 242,
+ "parentCellId": "79b6908f-15a8-4264-a79f-e311b37d277d",
+ "parentPath": "services/wiki/wiki.go"
+ },
+ "7bba84d2-67d7-498d-87aa-84adf217d67f": {
+ "path": "7bba84d2-67d7-498d-87aa-84adf217d67f",
+ "cellName": "Release: Submit New Release Form - release.go:L393-470",
+ "cellId": "7bba84d2-67d7-498d-87aa-84adf217d67f",
+ "visible": true,
+ "parentCellId": "50fc0867-77a6-428d-9687-0377657129cf"
+ },
+ "routers/web/repo/release.go-simstep-b0a7c3ca-22a2-4429-9878-dee03f0f4bfd": {
+ "path": "routers/web/repo/release.go-simstep-b0a7c3ca-22a2-4429-9878-dee03f0f4bfd",
+ "fileName": "release.go",
+ "wiki": "A user submits the form to create a new release. The POST request is handled by `NewReleasePost`, which binds the form data (tag, target, title, notes, attachments) and performs validation.",
+ "cellName": "Release: Submit New Release Form - release.go:L393-470",
+ "cellId": "7bba84d2-67d7-498d-87aa-84adf217d67f",
+ "visible": true,
+ "startLine": 393,
+ "endLine": 470,
+ "parentCellId": "50fc0867-77a6-428d-9687-0377657129cf",
+ "parentPath": "routers/web/repo/release.go"
+ },
+ "03e91619-5b13-4a9e-bbb2-f6c6b1eceded": {
+ "path": "03e91619-5b13-4a9e-bbb2-f6c6b1eceded",
+ "cellName": "Release: Create Git Tag and Database Record - release.go:L167-200",
+ "cellId": "03e91619-5b13-4a9e-bbb2-f6c6b1eceded",
+ "visible": true,
+ "parentCellId": "c150bfc9-bce2-4250-b468-2b5a81f74e87"
+ },
+ "services/release/release.go-simstep-5873640f-cd1c-4bc5-9bc2-9e9df60bd7a9": {
+ "path": "services/release/release.go-simstep-5873640f-cd1c-4bc5-9bc2-9e9df60bd7a9",
+ "fileName": "release.go",
+ "wiki": "The `CreateRelease` service function creates a Git tag if one doesn't exist, inserts a new `Release` record into the database, and associates any uploaded attachments with this new record.",
+ "cellName": "Release: Create Git Tag and Database Record - release.go:L167-200",
+ "cellId": "03e91619-5b13-4a9e-bbb2-f6c6b1eceded",
+ "visible": true,
+ "startLine": 167,
+ "endLine": 200,
+ "parentCellId": "c150bfc9-bce2-4250-b468-2b5a81f74e87",
+ "parentPath": "services/release/release.go"
+ },
+ "12f0bfb6-ed6a-4188-aeb6-a73fbe6396bc": {
+ "path": "12f0bfb6-ed6a-4188-aeb6-a73fbe6396bc",
+ "cellName": "Release: List Repository Releases - release.go:L152-194",
+ "cellId": "12f0bfb6-ed6a-4188-aeb6-a73fbe6396bc",
+ "visible": true,
+ "parentCellId": "50fc0867-77a6-428d-9687-0377657129cf"
+ },
+ "routers/web/repo/release.go-simstep-c0e8827d-f756-4a38-b12b-9c6efca47dc5": {
+ "path": "routers/web/repo/release.go-simstep-c0e8827d-f756-4a38-b12b-9c6efca47dc5",
+ "fileName": "release.go",
+ "wiki": "A user navigates to the repository's releases page. The `Releases` handler fetches all releases and tags from the database via `getReleaseInfos`, which in turn calls `db.Find[repo_model.Release]`. It also loads associated attachments for each release.",
+ "cellName": "Release: List Repository Releases - release.go:L152-194",
+ "cellId": "12f0bfb6-ed6a-4188-aeb6-a73fbe6396bc",
+ "visible": true,
+ "startLine": 152,
+ "endLine": 194,
+ "parentCellId": "50fc0867-77a6-428d-9687-0377657129cf",
+ "parentPath": "routers/web/repo/release.go"
+ },
+ "8193e97d-e40a-41c9-a7c8-9cbd387fce1f": {
+ "path": "8193e97d-e40a-41c9-a7c8-9cbd387fce1f",
+ "cellName": "Wiki: Pass\nRendered Content\nto Template",
+ "cellId": "8193e97d-e40a-41c9-a7c8-9cbd387fce1f",
+ "visible": true,
+ "parentCellId": "5c010790-dade-4ba3-a3dd-bb0cd571fcc6"
+ },
+ "generated-edge-simstep-f24840a6-8e6c-477d-809c-6e439aeb1b11-8193e97d-e40a-41c9-a7c8-9cbd387fce1f": {
+ "path": "generated-edge-simstep-f24840a6-8e6c-477d-809c-6e439aeb1b11-8193e97d-e40a-41c9-a7c8-9cbd387fce1f",
+ "fileName": "wiki.go",
+ "cellName": "Wiki: Pass Rendered Content to Template",
+ "cellId": "8193e97d-e40a-41c9-a7c8-9cbd387fce1f",
+ "visible": true,
+ "startLine": 489,
+ "endLine": 489,
+ "parentPath": "routers/web/repo/wiki.go"
+ },
+ "50736740-a7a3-4d4c-88fd-d4da1101ddea": {
+ "path": "50736740-a7a3-4d4c-88fd-d4da1101ddea",
+ "cellName": "Wiki: Data\nFlow to\nService Layer",
+ "cellId": "50736740-a7a3-4d4c-88fd-d4da1101ddea",
+ "visible": true
+ },
+ "generated-edge-simstep-692694e8-777e-401d-b21e-360370dee044-50736740-a7a3-4d4c-88fd-d4da1101ddea": {
+ "path": "generated-edge-simstep-692694e8-777e-401d-b21e-360370dee044-50736740-a7a3-4d4c-88fd-d4da1101ddea",
+ "fileName": "wiki.go",
+ "cellName": "Wiki: Data Flow to Service Layer",
+ "cellId": "50736740-a7a3-4d4c-88fd-d4da1101ddea",
+ "visible": true,
+ "startLine": 682,
+ "endLine": 682,
+ "parentPath": "routers/web/repo/wiki.go"
+ },
+ "487df556-8b83-4f98-b884-7c63790cd423": {
+ "path": "487df556-8b83-4f98-b884-7c63790cd423",
+ "cellName": "Wiki: Trigger\nNotifications and\nWebhooks",
+ "cellId": "487df556-8b83-4f98-b884-7c63790cd423",
+ "visible": true
+ },
+ "generated-edge-simstep-1141ab5f-0065-42c1-9962-a4bec03d49f6-487df556-8b83-4f98-b884-7c63790cd423": {
+ "path": "generated-edge-simstep-1141ab5f-0065-42c1-9962-a4bec03d49f6-487df556-8b83-4f98-b884-7c63790cd423",
+ "fileName": "wiki.go",
+ "cellName": "Wiki: Trigger Notifications and Webhooks",
+ "cellId": "487df556-8b83-4f98-b884-7c63790cd423",
+ "visible": true,
+ "startLine": 700,
+ "endLine": 700,
+ "parentPath": "services/wiki/wiki.go"
+ },
+ "db8a1c5b-17b2-4592-a064-763fdf405b2e": {
+ "path": "db8a1c5b-17b2-4592-a064-763fdf405b2e",
+ "cellName": "Release: Pass\nData to\nRelease Service",
+ "cellId": "db8a1c5b-17b2-4592-a064-763fdf405b2e",
+ "visible": true
+ },
+ "generated-edge-simstep-1179818d-832c-4e69-adb1-5ea7983edcce-db8a1c5b-17b2-4592-a064-763fdf405b2e": {
+ "path": "generated-edge-simstep-1179818d-832c-4e69-adb1-5ea7983edcce-db8a1c5b-17b2-4592-a064-763fdf405b2e",
+ "fileName": "release.go",
+ "cellName": "Release: Pass Data to Release Service",
+ "cellId": "db8a1c5b-17b2-4592-a064-763fdf405b2e",
+ "visible": true,
+ "startLine": 488,
+ "endLine": 488,
+ "parentPath": "routers/web/repo/release.go"
+ },
+ "24cfd71c-fdb5-4fc3-a833-90fa4d372f79": {
+ "path": "24cfd71c-fdb5-4fc3-a833-90fa4d372f79",
+ "cellName": "Release: Trigger\nRelease Notifications",
+ "cellId": "24cfd71c-fdb5-4fc3-a833-90fa4d372f79",
+ "visible": true
+ },
+ "generated-edge-simstep-b30def5e-bb2a-4464-a9cb-f0faa2e68234-24cfd71c-fdb5-4fc3-a833-90fa4d372f79": {
+ "path": "generated-edge-simstep-b30def5e-bb2a-4464-a9cb-f0faa2e68234-24cfd71c-fdb5-4fc3-a833-90fa4d372f79",
+ "fileName": "release.go",
+ "cellName": "Release: Trigger Release Notifications",
+ "cellId": "24cfd71c-fdb5-4fc3-a833-90fa4d372f79",
+ "visible": true,
+ "startLine": 195,
+ "endLine": 195,
+ "parentPath": "services/release/release.go"
+ }
+ },
+ "simulations": {
+ "Git Repository Management and Code Browsing": {
+ "name": "Git Repository Management and Code Browsing",
+ "simSteps": [
+ {
+ "simStepId": "53901967-77be-42fa-9b62-2bc14def484f",
+ "diagramNodeId": "5dc7c5cf-cab6-4053-a804-59d4140be48c",
+ "simStepLabel": "[Create Repo Flow] UI: User Submits 'Create Repository' Form",
+ "simStepDescription": "The user fills out the 'Create a new repository' form and submits it. The POST request is handled by the `CreatePost` function, which validates the form data and prepares options for repository creation.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "routers/web/repo/repo.go",
+ "startLine": "216",
+ "endLine": "277",
+ "relevantVariables": [
+ "CreatePost",
+ "form",
+ "repo_service.CreateRepoOptions"
+ ]
+ },
+ "inputDataExample": "{\"repo_name\": \"my-new-repo\", \"description\": \"A great project\", \"private\": false, \"auto_init\": true, \"gitignores\": \"Go\", \"license\": \"MIT\"}",
+ "outputDataExample": "{\"Name\": \"my-new-repo\", \"Description\": \"A great project\", \"IsPrivate\": false, \"AutoInit\": true, \"Gitignores\": \"Go\", \"License\": \"MIT\", \"DefaultBranch\": \"main\"}"
+ },
+ {
+ "simStepId": "2cec9676-4fa2-4880-ae98-8499dfe5d73d",
+ "diagramNodeId": "3c173167-a47f-4e9d-9269-210cd7056b61",
+ "simStepLabel": "[Create Repo Flow] Data Flow: Pass Options to Creation Service",
+ "simStepDescription": "The validated options from the form are passed as a `CreateRepoOptions` struct to the `repo_service.CreateRepository` function in the repository service layer.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "routers/web/repo/repo.go",
+ "startLine": "278",
+ "endLine": "294",
+ "relevantVariables": [
+ "repo_service.CreateRepository"
+ ]
+ },
+ "inputDataExample": "{\"Name\": \"my-new-repo\", \"Description\": \"A great project\", \"IsPrivate\": false, \"AutoInit\": true, \"Gitignores\": \"Go\", \"License\": \"MIT\", \"DefaultBranch\": \"main\"}",
+ "outputDataExample": "{\"Name\": \"my-new-repo\", \"Description\": \"A great project\", \"IsPrivate\": false, \"AutoInit\": true, \"Gitignores\": \"Go\", \"License\": \"MIT\", \"DefaultBranch\": \"main\"}"
+ },
+ {
+ "simStepId": "e53953bb-173b-4a7c-8798-7a292ed34210",
+ "diagramNodeId": "66b8e539-a8c1-431b-80bd-1f01703d3d0d",
+ "simStepLabel": "[Create Repo Flow] Service: Core Repository Creation Logic",
+ "simStepDescription": "The `CreateRepositoryDirectly` function orchestrates the repository creation. It creates a database record for the new repository and initializes a bare Git repository on the filesystem.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/repository/create.go",
+ "startLine": "207",
+ "endLine": "334",
+ "relevantVariables": [
+ "CreateRepositoryDirectly",
+ "createRepositoryInDB",
+ "initRepository",
+ "updateGitRepoAfterCreate"
+ ]
+ },
+ "inputDataExample": "{\"Name\": \"my-new-repo\", \"Description\": \"A great project\", \"IsPrivate\": false, \"AutoInit\": true, \"Gitignores\": \"Go\", \"License\": \"MIT\", \"DefaultBranch\": \"main\"}",
+ "outputDataExample": "{\"ID\": 123, \"OwnerID\": 1, \"OwnerName\": \"user1\", \"Name\": \"my-new-repo\", \"FullName\": \"user1/my-new-repo\", \"IsPrivate\": false, \"IsEmpty\": false, \"IsArchived\": false, \"Status\": 0, \"DefaultBranch\": \"main\"}"
+ },
+ {
+ "simStepId": "4bb58ff9-5969-4ea1-9d90-6af267c88852",
+ "diagramNodeId": "4ff771e1-09e3-477f-97f1-032198e031d1",
+ "simStepLabel": "[Create Repo Flow] Event Dispatch: Dispatch Creation Notification",
+ "simStepDescription": "After the repository is successfully created in the database and on disk, a notification is dispatched to inform other parts of the system, such as webhooks and actions.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "services/repository/create.go",
+ "startLine": "57",
+ "endLine": "57",
+ "relevantVariables": [
+ "notify_service.CreateRepository"
+ ]
+ },
+ "inputDataExample": "{\"doer\": {\"ID\": 1, \"Name\": \"user1\"}, \"owner\": {\"ID\": 1, \"Name\": \"user1\"}, \"repo\": {\"ID\": 123, \"Name\": \"my-new-repo\", \"FullName\": \"user1/my-new-repo\"}}",
+ "outputDataExample": "{\"doer\": {\"ID\": 1, \"Name\": \"user1\"}, \"owner\": {\"ID\": 1, \"Name\": \"user1\"}, \"repo\": {\"ID\": 123, \"Name\": \"my-new-repo\", \"FullName\": \"user1/my-new-repo\"}}"
+ },
+ {
+ "simStepId": "f1b0adeb-8b7e-43c5-8f1c-2f57935563f1",
+ "diagramNodeId": "c62a8467-c20f-48bf-baad-83a65c177225",
+ "simStepLabel": "[Create Repo Flow] Webhook: Handle Webhook Notification",
+ "simStepDescription": "The webhook notifier receives the creation event, constructs a payload with details about the new repository, and sends it to any configured webhook endpoints.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/webhook/notifier.go",
+ "startLine": "113",
+ "endLine": "123",
+ "relevantVariables": [
+ "webhookNotifier.CreateRepository",
+ "PrepareWebhooks",
+ "api.RepositoryPayload"
+ ]
+ },
+ "inputDataExample": "{\"doer\": {\"ID\": 1, \"Name\": \"user1\"}, \"repo\": {\"ID\": 123, \"Name\": \"my-new-repo\"}}",
+ "outputDataExample": "{\"action\": \"created\", \"repository\": {\"id\": 123, \"owner\": {\"login\": \"user1\"}, \"name\": \"my-new-repo\", \"full_name\": \"user1/my-new-repo\"}, \"sender\": {\"login\": \"user1\"}}"
+ },
+ {
+ "simStepId": "fc752333-bd0d-4bcb-bec9-bd07b7a0e201",
+ "diagramNodeId": "c853623e-b02f-4551-9b5b-aed279344787",
+ "simStepLabel": "[Create Repo Flow] UI: Redirect User to New Repository",
+ "simStepDescription": "Finally, the web handler sends an HTTP redirect response to the user's browser, directing them to the main page of their newly created repository.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "routers/web/repo/repo.go",
+ "startLine": "312",
+ "endLine": "312",
+ "relevantVariables": [
+ "ctx.Redirect",
+ "repo.Link()"
+ ]
+ },
+ "inputDataExample": "\"/user1/my-new-repo\"",
+ "outputDataExample": "\"/user1/my-new-repo\""
+ },
+ {
+ "simStepId": "1601b44c-14d8-4513-8c48-ca8155f37053",
+ "diagramNodeId": "f4ecbce4-0dad-48e1-92fc-373392e18d72",
+ "simStepLabel": "[Browse Repo Flow] Middleware: Request and Permission Check",
+ "simStepDescription": "A request to a repository URL (e.g., '/owner/repo') is first handled by the `RepoAssignment` middleware. This function loads the repository from the database, checks if the user has permission to view it, and populates the request context with repository information.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/context/repo.go",
+ "startLine": "416",
+ "endLine": "601",
+ "relevantVariables": [
+ "RepoAssignment",
+ "repo_model.GetRepositoryByOwnerAndName",
+ "access_model.GetUserRepoPermission",
+ "repoAssignment"
+ ]
+ },
+ "inputDataExample": "{\"method\": \"GET\", \"url\": \"/user2/repo1\"}",
+ "outputDataExample": "{\"Context\": {\"Repo\": {\"Repository\": {\"ID\": 1, \"Name\": \"repo1\", \"OwnerName\": \"user2\", \"IsPrivate\": false}, \"Permission\": {\"AccessMode\": 4}}}}"
+ },
+ {
+ "simStepId": "bf9ec22b-a6f7-4797-93bb-4ff38f4cf426",
+ "diagramNodeId": "fe63164b-9973-42fc-8544-b192110a4fca",
+ "simStepLabel": "[Browse Repo Flow] Data Flow: Populated Context to Handler",
+ "simStepDescription": "The request context, now containing the repository object and user's permissions, is passed along the chain to the main request handler.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "services/context/repo.go",
+ "startLine": "600",
+ "endLine": "600",
+ "relevantVariables": [
+ "ctx.Next()"
+ ]
+ },
+ "inputDataExample": "{\"Context\": {\"Repo\": {\"Repository\": {\"ID\": 1, \"Name\": \"repo1\", \"OwnerName\": \"user2\"}, \"Permission\": {\"AccessMode\": 4}}}}",
+ "outputDataExample": "{\"Context\": {\"Repo\": {\"Repository\": {\"ID\": 1, \"Name\": \"repo1\", \"OwnerName\": \"user2\"}, \"Permission\": {\"AccessMode\": 4}}}}"
+ },
+ {
+ "simStepId": "b66ab550-b9d6-47a9-8c00-f8db35d2110b",
+ "diagramNodeId": "19fbded3-6ebb-428a-8e42-e44a7099340b",
+ "simStepLabel": "[Browse Repo Flow] Handler: Fetch Repository Contents",
+ "simStepDescription": "The `Home` handler uses the populated context to open the physical Git repository. It then fetches the file and directory listing (the Git tree) for the root of the default branch and looks for a README file to display.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "routers/web/repo/view_home.go",
+ "startLine": "359",
+ "endLine": "408",
+ "relevantVariables": [
+ "Home",
+ "renderFileListPage",
+ "renderReadme",
+ "ctx.Repo.Commit",
+ "ctx.Repo.GitRepo"
+ ]
+ },
+ "inputDataExample": "{\"Context\": {\"Repo\": {\"Repository\": {\"ID\": 1, \"Name\": \"repo1\"}, \"CommitID\": \"abcdef123...\"}}}",
+ "outputDataExample": "{\"Files\": [{\"Name\": \"README.md\", \"Type\": \"blob\", \"Size\": 1024}, {\"Name\": \"src\", \"Type\": \"tree\"}], \"Readme\": {\"Content\": \"# Hello World\", \"FileName\": \"README.md\"}}"
+ },
+ {
+ "simStepId": "990ceda7-8e8c-42e5-98bb-ffbc7a54a017",
+ "diagramNodeId": "c552696a-6be4-4a4f-b24c-ca7eb3ff16b4",
+ "simStepLabel": "[Browse Repo Flow] Data Flow: Data to Template Engine",
+ "simStepDescription": "The fetched repository data, including the file list, README content, and latest commit information, is passed to the template engine for rendering the HTML view.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "routers/web/repo/view.go",
+ "startLine": "154",
+ "endLine": "154",
+ "relevantVariables": [
+ "ctx.HTML",
+ "ctx.Data"
+ ]
+ },
+ "inputDataExample": "{\"Data\": {\"Title\": \"user2/repo1\", \"Files\": [{\"Name\": \"README.md\"}], \"Readme\": \"# Hello World\"}}",
+ "outputDataExample": "{\"Data\": {\"Title\": \"user2/repo1\", \"Files\": [{\"Name\": \"README.md\"}], \"Readme\": \"# Hello World\"}}"
+ },
+ {
+ "simStepId": "a9744f20-8855-44e8-b85d-8967be3baadf",
+ "diagramNodeId": "7c9a6d94-f600-42db-ac03-72fc3cff7bc9",
+ "simStepLabel": "[Browse Repo Flow] UI: Render Repository Home Page",
+ "simStepDescription": "The `repo/home.tmpl` template uses the provided data to generate the final HTML page, displaying the file browser, the rendered README, and repository metadata.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "templates/repo/home.tmpl",
+ "startLine": "1",
+ "endLine": "180",
+ "relevantVariables": [
+ "{{template \"repo/view_file_list\" .}}",
+ "{{if .Readme}}",
+ "{{template \"repo/view_readme\" .}}"
+ ]
+ },
+ "inputDataExample": "{\"Data\": {\"Title\": \"user2/repo1\", \"Files\": [{\"Name\": \"README.md\"}], \"Readme\": \"# Hello World\"}}",
+ "outputDataExample": "
user2/repo1..."
+ },
+ {
+ "simStepId": "052a7d45-56b2-48f0-a56d-fb7d01d53c1d",
+ "diagramNodeId": "67900620-14d5-41f7-b198-19e134376df0",
+ "simStepLabel": "[Browse Repo Flow] User Action: Click on a File",
+ "simStepDescription": "A user clicks on a file in the repository file list, triggering a GET request to view the content of that specific file.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "templates/repo/view_file_list.tmpl",
+ "startLine": "23",
+ "endLine": "23",
+ "relevantVariables": [
+ ".Entry.GetSubJumpablePathName"
+ ]
+ },
+ "inputDataExample": "{\"method\": \"GET\", \"url\": \"/user2/repo1/src/branch/main/README.md\"}",
+ "outputDataExample": "{\"method\": \"GET\", \"url\": \"/user2/repo1/src/branch/main/README.md\"}"
+ },
+ {
+ "simStepId": "a8a09c64-d962-40f3-b4d1-9b0941533a46",
+ "diagramNodeId": "7e1917b3-8473-4278-8995-4680d9464618",
+ "simStepLabel": "[Browse Repo Flow] Handler: Get File Content",
+ "simStepDescription": "The `renderFile` function handles the request to view a file. It retrieves the Git blob for the requested file path from the specified commit/branch, reads its content, and determines how to render it (e.g., plain text, markup, image).",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "routers/web/repo/view_file.go",
+ "startLine": "29",
+ "endLine": "216",
+ "relevantVariables": [
+ "renderFile",
+ "entry.Blob()",
+ "dataRc.Readall()",
+ "markup.Render"
+ ]
+ },
+ "inputDataExample": "{\"Repo\": {\"Repository\": {\"ID\": 1}, \"CommitID\": \"abcdef123...\"}, \"TreePath\": \"README.md\"}",
+ "outputDataExample": "{\"FileName\": \"README.md\", \"FileContent\": \"# My Project\\nThis is the readme.\", \"IsMarkup\": true, \"Language\": \"markdown\"}"
+ },
+ {
+ "simStepId": "e404c283-c030-432c-ac08-f8adbbb9155f",
+ "diagramNodeId": "08b077bf-97e7-4065-9d41-826b190a6d99",
+ "simStepLabel": "[Browse Repo Flow] Data Flow: File Data to Template Engine",
+ "simStepDescription": "The processed file content, along with metadata like file size and language for syntax highlighting, is passed to the template engine.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "routers/web/repo/view_file.go",
+ "startLine": "215",
+ "endLine": "215",
+ "relevantVariables": [
+ "ctx.HTML",
+ "ctx.Data"
+ ]
+ },
+ "inputDataExample": "{\"Data\": {\"Title\": \"README.md\", \"FileContent\": \"# My Project...\", \"IsMarkup\": true}}",
+ "outputDataExample": "{\"Data\": {\"Title\": \"README.md\", \"FileContent\": \"# My Project...\", \"IsMarkup\": true}}"
+ },
+ {
+ "simStepId": "5ccb6703-b546-4b9b-9647-cb9dc611fd3c",
+ "diagramNodeId": "5f394888-0458-458e-bc71-350516b1a8fd",
+ "simStepLabel": "[Browse Repo Flow] UI: Render File View Page",
+ "simStepDescription": "The `repo/view_file.tmpl` template renders the final HTML page, displaying the file's content with syntax highlighting or as rendered markup.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "templates/repo/view_file.tmpl",
+ "startLine": "1",
+ "endLine": "60",
+ "relevantVariables": [
+ ".FileContent",
+ ".IsMarkup"
+ ]
+ },
+ "inputDataExample": "{\"Data\": {\"Title\": \"README.md\", \"FileContent\": \"# My Project...\", \"IsMarkup\": true}}",
+ "outputDataExample": "...
"
+ }
+ ],
+ "description": "- Core functionality for hosting and interacting with Git repositories
- - Users can create, migrate, or fork Git repositories through the web UI
- - Provides a web interface to browse source code, view commit history, branches, tags, and file content
- - Supports cloning, fetching, and pushing code over HTTP(S) and SSH protocols
- - Includes features like viewing diffs between commits, blame information, and repository activity
",
+ "simulationNodesAndEdges": {
+ "5dc7c5cf-cab6-4053-a804-59d4140be48c": {
+ "simStepIds": [
+ "53901967-77be-42fa-9b62-2bc14def484f"
+ ]
+ },
+ "66b8e539-a8c1-431b-80bd-1f01703d3d0d": {
+ "simStepIds": [
+ "e53953bb-173b-4a7c-8798-7a292ed34210"
+ ]
+ },
+ "c62a8467-c20f-48bf-baad-83a65c177225": {
+ "simStepIds": [
+ "f1b0adeb-8b7e-43c5-8f1c-2f57935563f1"
+ ]
+ },
+ "f4ecbce4-0dad-48e1-92fc-373392e18d72": {
+ "simStepIds": [
+ "1601b44c-14d8-4513-8c48-ca8155f37053"
+ ]
+ },
+ "19fbded3-6ebb-428a-8e42-e44a7099340b": {
+ "simStepIds": [
+ "b66ab550-b9d6-47a9-8c00-f8db35d2110b"
+ ]
+ },
+ "7c9a6d94-f600-42db-ac03-72fc3cff7bc9": {
+ "simStepIds": [
+ "a9744f20-8855-44e8-b85d-8967be3baadf"
+ ]
+ },
+ "7e1917b3-8473-4278-8995-4680d9464618": {
+ "simStepIds": [
+ "a8a09c64-d962-40f3-b4d1-9b0941533a46"
+ ]
+ },
+ "5f394888-0458-458e-bc71-350516b1a8fd": {
+ "simStepIds": [
+ "5ccb6703-b546-4b9b-9647-cb9dc611fd3c"
+ ]
+ },
+ "3c173167-a47f-4e9d-9269-210cd7056b61": {
+ "simStepIds": [
+ "2cec9676-4fa2-4880-ae98-8499dfe5d73d"
+ ]
+ },
+ "4ff771e1-09e3-477f-97f1-032198e031d1": {
+ "simStepIds": [
+ "4bb58ff9-5969-4ea1-9d90-6af267c88852"
+ ]
+ },
+ "c853623e-b02f-4551-9b5b-aed279344787": {
+ "simStepIds": [
+ "fc752333-bd0d-4bcb-bec9-bd07b7a0e201"
+ ]
+ },
+ "fe63164b-9973-42fc-8544-b192110a4fca": {
+ "simStepIds": [
+ "bf9ec22b-a6f7-4797-93bb-4ff38f4cf426"
+ ]
+ },
+ "c552696a-6be4-4a4f-b24c-ca7eb3ff16b4": {
+ "simStepIds": [
+ "990ceda7-8e8c-42e5-98bb-ffbc7a54a017"
+ ]
+ },
+ "67900620-14d5-41f7-b198-19e134376df0": {
+ "simStepIds": [
+ "052a7d45-56b2-48f0-a56d-fb7d01d53c1d"
+ ]
+ },
+ "08b077bf-97e7-4065-9d41-826b190a6d99": {
+ "simStepIds": [
+ "e404c283-c030-432c-ac08-f8adbbb9155f"
+ ]
+ }
+ },
+ "isAIGenerated": true,
+ "keywords": "Repository, CreateRepository, repo/view.go",
+ "generationPrompt": "Git Repository Management and Code Browsing",
+ "generationKeywords": "Repository, CreateRepository, repo/view.go"
+ },
+ "Collaborative Code Review via Pull Requests": {
+ "name": "Collaborative Code Review via Pull Requests",
+ "simSteps": [
+ {
+ "simStepId": "ad391192-a9ab-42f5-8966-f6628aeded05",
+ "diagramNodeId": "b5e61883-df8d-4f17-8f87-aa74d16df77b",
+ "simStepLabel": "Handle PR Creation Request",
+ "simStepDescription": "The web server receives a POST request from the '/compare' page to create a new pull request. This handler validates the submitted form data (title, body, labels, assignees), resolves the head and base branches, and prepares the data structures needed to create the pull request.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "routers/web/repo/pull.go",
+ "startLine": "1314",
+ "endLine": "1345",
+ "relevantVariables": [
+ "CompareAndPullRequest",
+ "form",
+ "pullIssue",
+ "pullRequest",
+ "prOpts",
+ "pull_service.NewPullRequest"
+ ]
+ },
+ "inputDataExample": "{\"_csrf\": \"aAbBcC123\", \"title\": \"Add new awesome feature\", \"body\": \"This PR adds a cool new feature that does X and Y.\", \"head_branch\": \"feature/new-thing\", \"base_branch\": \"main\", \"assignees\": [\"user2\"], \"labels\": [10, 12]}",
+ "outputDataExample": "{\"Repo\": {\"ID\": 1, \"Name\": \"my-repo\"}, \"Issue\": {\"Title\": \"Add new awesome feature\", \"Content\": \"This PR adds a cool new feature...\"}, \"LabelIDs\": [10, 12], \"AssigneeIDs\": [2], \"PullRequest\": {\"HeadRepoID\": 1, \"BaseRepoID\": 1, \"HeadBranch\": \"feature/new-thing\", \"BaseBranch\": \"main\"}}"
+ },
+ {
+ "simStepId": "4cab6466-093b-43c9-88ad-28484e60d6c4",
+ "diagramNodeId": "88810df3-fc69-4b7f-b6c8-e46446ce3696",
+ "simStepLabel": "Data Transmission: Call Pull Request Service",
+ "simStepDescription": "The route handler passes the prepared `NewPullRequestOptions` struct, containing all necessary information like the issue details, labels, and branch information, to the `pull_service.NewPullRequest` function to orchestrate the creation process.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "routers/web/repo/pull.go",
+ "startLine": "1345",
+ "endLine": "1345",
+ "relevantVariables": [
+ "pull_service.NewPullRequest(ctx, prOpts)"
+ ]
+ },
+ "inputDataExample": "{\"Repo\": {\"ID\": 1, \"Name\": \"my-repo\"}, \"Issue\": {\"Title\": \"Add new awesome feature\", \"Content\": \"This PR adds a cool new feature...\", \"PosterID\": 1}, \"LabelIDs\": [10, 12], \"AssigneeIDs\": [2], \"PullRequest\": {\"HeadRepoID\": 1, \"BaseRepoID\": 1, \"HeadBranch\": \"feature/new-thing\", \"BaseBranch\": \"main\"}}",
+ "outputDataExample": "{\"Repo\": {\"ID\": 1, \"Name\": \"my-repo\"}, \"Issue\": {\"Title\": \"Add new awesome feature\", \"Content\": \"This PR adds a cool new feature...\", \"PosterID\": 1}, \"LabelIDs\": [10, 12], \"AssigneeIDs\": [2], \"PullRequest\": {\"HeadRepoID\": 1, \"BaseRepoID\": 1, \"HeadBranch\": \"feature/new-thing\", \"BaseBranch\": \"main\"}}"
+ },
+ {
+ "simStepId": "e5ba05df-a66c-4931-9faa-926f5a23d6ae",
+ "diagramNodeId": "bfa1c7f3-8d1a-4ffe-a65f-b5c87c095cb7",
+ "simStepLabel": "Create PR in Service Layer",
+ "simStepDescription": "This service function handles the business logic of creating a pull request. It wraps the database operations in a transaction, creates the issue and pull request records, pushes the PR's head ref to the base repository, and triggers notifications for webhooks and other services.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/pull/pull.go",
+ "startLine": "54",
+ "endLine": "61",
+ "relevantVariables": [
+ "NewPullRequest",
+ "opts",
+ "db.WithTx",
+ "issues_model.NewPullRequest"
+ ]
+ },
+ "inputDataExample": "{\"Repo\": {\"ID\": 1, \"Name\": \"my-repo\"}, \"Issue\": {\"Title\": \"Add new awesome feature\", \"Content\": \"...\"}, \"PullRequest\": {\"HeadBranch\": \"feature/new-thing\", \"BaseBranch\": \"main\"}, ...}",
+ "outputDataExample": "{\"ID\": 55, \"Index\": 123, \"IssueID\": 150, \"HeadRepoID\": 1, \"BaseRepoID\": 1, \"HeadBranch\": \"feature/new-thing\", \"BaseBranch\": \"main\", \"HasMerged\": false, ...}"
+ },
+ {
+ "simStepId": "0ab8dd7f-05f5-4462-bf64-1985f392f78d",
+ "diagramNodeId": "aaadac8d-1aba-451a-bba4-794a4221c886",
+ "simStepLabel": "Data Transmission: Prepare DB Records",
+ "simStepDescription": "The service function passes the repository, issue, labels, and pull request data models to the database layer to be persisted within a database transaction.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "services/pull/pull.go",
+ "startLine": "105",
+ "endLine": "105",
+ "relevantVariables": [
+ "issues_model.NewPullRequest(ctx, repo, issue, labelIDs, uuids, pr)"
+ ]
+ },
+ "inputDataExample": "{\"repo\": {\"ID\": 1}, \"issue\": {\"Title\": \"Add new awesome feature\"}, \"pr\": {\"HeadBranch\": \"feature/new-thing\"}}",
+ "outputDataExample": "{\"repo\": {\"ID\": 1}, \"issue\": {\"Title\": \"Add new awesome feature\"}, \"pr\": {\"HeadBranch\": \"feature/new-thing\"}}"
+ },
+ {
+ "simStepId": "5092d84c-c9ea-4367-8615-a4824895029c",
+ "diagramNodeId": "fee62c98-5a6d-4979-830d-4db9909c6a98",
+ "simStepLabel": "Insert PR into Database",
+ "simStepDescription": "This function executes the database queries to insert a new row into the `issue` table and a corresponding row into the `pull_request` table, linking them together.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "models/issues/pull.go",
+ "startLine": "457",
+ "endLine": "465",
+ "relevantVariables": [
+ "NewPullRequest",
+ "db.WithTx",
+ "insertIssue",
+ "db.Insert(ctx, pr)"
+ ]
+ },
+ "inputDataExample": "{\"repo\": {\"ID\": 1}, \"issue\": {\"Title\": \"Add new awesome feature\"}, \"pr\": {\"HeadBranch\": \"feature/new-thing\"}}",
+ "outputDataExample": "{\"ID\": 55, \"IssueID\": 150, ...}"
+ },
+ {
+ "simStepId": "22b464f6-b543-4ac2-8b6b-e26efa91e1b5",
+ "diagramNodeId": "8fd4a69e-be65-4ade-9ced-047c7ebd6c0d",
+ "simStepLabel": "Data Transmission: Trigger Notifications",
+ "simStepDescription": "After the pull request is successfully created in the database, the `NewPullRequest` function in the notification service is called to inform other parts of the system (like webhooks and actions) about the new PR.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "services/pull/pull.go",
+ "startLine": "161",
+ "endLine": "161",
+ "relevantVariables": [
+ "notify_service.NewPullRequest(ctx, pr, mentions)"
+ ]
+ },
+ "inputDataExample": "{\"ID\": 55, \"Index\": 123, \"IssueID\": 150, \"HeadRepoID\": 1, \"BaseRepoID\": 1, \"HeadBranch\": \"feature/new-thing\", \"BaseBranch\": \"main\"}",
+ "outputDataExample": "{\"ID\": 55, \"Index\": 123, \"IssueID\": 150, \"HeadRepoID\": 1, \"BaseRepoID\": 1, \"HeadBranch\": \"feature/new-thing\", \"BaseBranch\": \"main\"}"
+ },
+ {
+ "simStepId": "56fda301-e5b4-440a-8db2-4c4ed2bd649a",
+ "diagramNodeId": "a94cfe55-a85f-4f92-a28d-e58f004b12b3",
+ "simStepLabel": "Dispatch PR Creation Notifications",
+ "simStepDescription": "This function acts as a dispatcher. It iterates over all registered notifiers (e.g., webhook, actions, mailer, UI notifications) and calls the `NewPullRequest` method on each one, passing along the PR data.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/notify/notify.go",
+ "startLine": "110",
+ "endLine": "119",
+ "relevantVariables": [
+ "NewPullRequest",
+ "notifiers"
+ ]
+ },
+ "inputDataExample": "{\"ID\": 55, \"Index\": 123, \"IssueID\": 150, ...}",
+ "outputDataExample": "{}"
+ },
+ {
+ "simStepId": "b564efb1-92b6-4978-8c83-c278707dc375",
+ "diagramNodeId": "af2b35e5-e443-42dc-8bef-a9183a7c13f8",
+ "simStepLabel": "Data Transmission: Queue Mergability Check",
+ "simStepDescription": "After creation, the PR's mergeability status is unknown. This step calls a function to enqueue a background job that will check for merge conflicts and update the PR's status accordingly.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "services/pull/pull.go",
+ "startLine": "130",
+ "endLine": "130",
+ "relevantVariables": [
+ "StartPullRequestCheckImmediately(ctx, pr)"
+ ]
+ },
+ "inputDataExample": "{\"ID\": 55, \"Index\": 123, ...}",
+ "outputDataExample": "{\"ID\": 55, \"Index\": 123, ...}"
+ },
+ {
+ "simStepId": "b7c0578c-e1e5-47e4-978c-cc79753235f0",
+ "diagramNodeId": "a35e90c9-3fc2-4891-9dd8-d3690b17ff54",
+ "simStepLabel": "Update PR Status and Enqueue Check",
+ "simStepDescription": "This function first updates the pull request's status in the database to `PullRequestStatusChecking`. It then pushes the pull request's ID onto a queue that is processed by background workers to perform the merge check.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/pull/check.go",
+ "startLine": "76",
+ "endLine": "81",
+ "relevantVariables": [
+ "StartPullRequestCheckImmediately",
+ "markPullRequestStatusAsChecking",
+ "AddPullRequestToCheckQueue"
+ ]
+ },
+ "inputDataExample": "{\"ID\": 55, \"Index\": 123, ...}",
+ "outputDataExample": "{\"status\": \"PullRequestStatusChecking\"}"
+ },
+ {
+ "simStepId": "a12e4843-9815-455c-a6d8-d62a3022639b",
+ "diagramNodeId": "52c36476-f770-4a34-b3db-87f7f134802f",
+ "simStepLabel": "User Interaction: Triggers Merge",
+ "simStepDescription": "A user with appropriate permissions clicks the 'Merge' button on the pull request page, submitting a form to the server.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "web_src/js/components/PullRequestMergeForm.vue",
+ "startLine": "4",
+ "endLine": "12",
+ "relevantVariables": [
+ "mergeForm"
+ ]
+ },
+ "inputDataExample": "{\"do\": \"merge\", \"merge_title_field\": \"Merge pull request #123 from user/feature-branch\", \"merge_message_field\": \"\"}",
+ "outputDataExample": "{\"do\": \"merge\", \"merge_title_field\": \"Merge pull request #123 from user/feature-branch\", \"merge_message_field\": \"\"}"
+ },
+ {
+ "simStepId": "7f11138f-6ee9-4918-b3ca-78da3871caea",
+ "diagramNodeId": "1f9b64f0-5508-4177-887f-14556a0628b0",
+ "simStepLabel": "Handle PR Merge Request",
+ "simStepDescription": "The web server receives a POST request to merge a pull request. This handler validates the user's permissions, confirms the PR is in a mergeable state, and retrieves the merge strategy and commit message from the submitted form.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "routers/web/repo/pull.go",
+ "startLine": "1016",
+ "endLine": "1024",
+ "relevantVariables": [
+ "MergePullRequest",
+ "form",
+ "issue.PullRequest",
+ "pull_service.Merge"
+ ]
+ },
+ "inputDataExample": "{\"_csrf\": \"...\", \"do\": \"merge\", \"merge_title_field\": \"Merge pull request #123...\"}",
+ "outputDataExample": "{\"pr\": {\"ID\": 55, ...}, \"doer\": {\"ID\": 1, \"Name\": \"user1\"}, \"mergeStyle\": \"merge\", \"message\": \"Merge pull request #123...\"}"
+ },
+ {
+ "simStepId": "5804dffe-4772-4a09-a711-15938dea8430",
+ "diagramNodeId": "a44ff35a-ae0f-4846-99c3-dcc26c469dff",
+ "simStepLabel": "Data Transmission: Call Merge Service",
+ "simStepDescription": "The route handler calls the `pull_service.Merge` function, passing the pull request object, the user performing the merge, the chosen merge style, and the commit message.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "routers/web/repo/pull.go",
+ "startLine": "1089",
+ "endLine": "1089",
+ "relevantVariables": [
+ "pull_service.Merge(graceful.GetManager().HammerContext(), issue.PullRequest, ctx.Doer, repo_model.MergeStyle(form.Do), form.HeadCommitID, message, false)"
+ ]
+ },
+ "inputDataExample": "{\"pr\": {\"ID\": 55, ...}, \"doer\": {\"ID\": 1, \"Name\": \"user1\"}, \"mergeStyle\": \"merge\", \"message\": \"Merge pull request #123...\"}",
+ "outputDataExample": "{\"pr\": {\"ID\": 55, ...}, \"doer\": {\"ID\": 1, \"Name\": \"user1\"}, \"mergeStyle\": \"merge\", \"message\": \"Merge pull request #123...\"}"
+ },
+ {
+ "simStepId": "1551889d-7fcd-4b22-9962-d4174a18ddd6",
+ "diagramNodeId": "882a8fca-a108-4651-abb9-20a43eb9f64d",
+ "simStepLabel": "Execute Merge in Service Layer",
+ "simStepDescription": "This function orchestrates the merge process. It checks branch protections, prepares a temporary repository, performs the actual Git merge operation based on the selected style, pushes the result to the base branch, and finally updates the PR's status in the database.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/pull/merge.go",
+ "startLine": "219",
+ "endLine": "227",
+ "relevantVariables": [
+ "Merge",
+ "pr",
+ "doer",
+ "mergeStyle",
+ "doMergeAndPush",
+ "SetMerged"
+ ]
+ },
+ "inputDataExample": "{\"pr\": {\"ID\": 55, ...}, \"doer\": {\"ID\": 1, \"Name\": \"user1\"}, \"mergeStyle\": \"merge\", \"message\": \"Merge pull request #123...\"}",
+ "outputDataExample": "{\"mergedCommitID\": \"a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2\"}"
+ },
+ {
+ "simStepId": "b2b55ac7-e6cf-45f1-a94f-edf2b463bcaf",
+ "diagramNodeId": "8dfd279d-9e21-4855-b71d-bf3e167eab19",
+ "simStepLabel": "Data Transmission: Pass Merged Commit ID for DB Update",
+ "simStepDescription": "After the Git merge and push operations are completed successfully, the resulting merge commit SHA is passed to the `SetMerged` function to update the pull request's state in the database.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "services/pull/merge.go",
+ "startLine": "286",
+ "endLine": "286",
+ "relevantVariables": [
+ "SetMerged(ctx, pr, mergedCommitID, timeutil.TimeStampNow(), doer, issues_model.PullRequestStatusManuallyMerged)"
+ ]
+ },
+ "inputDataExample": "{\"pr\": {\"ID\": 55}, \"mergedCommitID\": \"a1b2c3d4...\", \"merger\": {\"ID\": 1}}",
+ "outputDataExample": "{\"pr\": {\"ID\": 55}, \"mergedCommitID\": \"a1b2c3d4...\", \"merger\": {\"ID\": 1}}"
+ },
+ {
+ "simStepId": "1b760baa-c919-4660-9e0c-b6137e1c2721",
+ "diagramNodeId": "0ef482fa-8bc1-446d-baa4-fded92d124f3",
+ "simStepLabel": "Update PR Status to Merged",
+ "simStepDescription": "This function updates the pull request's record in the database. It sets `has_merged` to true, records the `merged_commit_id`, `merger_id`, and `merged_unix` timestamp. It also closes the associated issue.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/pull/merge.go",
+ "startLine": "669",
+ "endLine": "679",
+ "relevantVariables": [
+ "SetMerged",
+ "pr",
+ "mergedCommitID",
+ "merger"
+ ]
+ },
+ "inputDataExample": "{\"pr\": {\"ID\": 55}, \"mergedCommitID\": \"a1b2c3d4...\", \"merger\": {\"ID\": 1}}",
+ "outputDataExample": "{\"success\": true}"
+ },
+ {
+ "simStepId": "5c7c61d7-c7a3-42e5-8991-f30f383d00da",
+ "diagramNodeId": "c271830f-aca0-4976-b30a-49c7480d2d5f",
+ "simStepLabel": "Data Transmission: Trigger Merge Notifications",
+ "simStepDescription": "Once the PR is marked as merged in the database, the `MergePullRequest` function in the notification service is called to inform other parts of the system about the merge event.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "services/pull/merge.go",
+ "startLine": "287",
+ "endLine": "287",
+ "relevantVariables": [
+ "notify_service.MergePullRequest(ctx, doer, pr)"
+ ]
+ },
+ "inputDataExample": "{\"ID\": 55, \"HasMerged\": true, \"MergedCommitID\": \"a1b2c3d4...\", ...}",
+ "outputDataExample": "{\"ID\": 55, \"HasMerged\": true, \"MergedCommitID\": \"a1b2c3d4...\", ...}"
+ },
+ {
+ "simStepId": "0a08a7a7-4813-4700-9b6b-0787163e9fd9",
+ "diagramNodeId": "b66f2694-f430-4fd0-808a-5e5279c50dd7",
+ "simStepLabel": "Dispatch Merge Notifications",
+ "simStepDescription": "This function dispatches the merge event to all registered notifiers (e.g., webhook, actions). Each notifier will then handle the event, such as sending a 'pull request closed' webhook payload with a 'merged' state.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/notify/notify.go",
+ "startLine": "91",
+ "endLine": "95",
+ "relevantVariables": [
+ "MergePullRequest",
+ "notifiers"
+ ]
+ },
+ "inputDataExample": "{\"ID\": 55, \"HasMerged\": true, ...}",
+ "outputDataExample": "{}"
+ }
+ ],
+ "description": "- Facilitates team collaboration by proposing, reviewing, and merging code changes
- - Users can create Pull Requests (PRs) from branches within the same repository or from forks
- - A diff view allows team members to review changes and leave inline comments on specific lines of code
- - Reviewers can approve changes or request further modifications before a PR is merged
- - Supports various merge strategies, including creating a merge commit, squashing, or rebasing
",
+ "simulationNodesAndEdges": {
+ "b5e61883-df8d-4f17-8f87-aa74d16df77b": {
+ "simStepIds": [
+ "ad391192-a9ab-42f5-8966-f6628aeded05"
+ ]
+ },
+ "bfa1c7f3-8d1a-4ffe-a65f-b5c87c095cb7": {
+ "simStepIds": [
+ "e5ba05df-a66c-4931-9faa-926f5a23d6ae"
+ ]
+ },
+ "fee62c98-5a6d-4979-830d-4db9909c6a98": {
+ "simStepIds": [
+ "5092d84c-c9ea-4367-8615-a4824895029c"
+ ]
+ },
+ "a94cfe55-a85f-4f92-a28d-e58f004b12b3": {
+ "simStepIds": [
+ "56fda301-e5b4-440a-8db2-4c4ed2bd649a"
+ ]
+ },
+ "a35e90c9-3fc2-4891-9dd8-d3690b17ff54": {
+ "simStepIds": [
+ "b7c0578c-e1e5-47e4-978c-cc79753235f0"
+ ]
+ },
+ "1f9b64f0-5508-4177-887f-14556a0628b0": {
+ "simStepIds": [
+ "7f11138f-6ee9-4918-b3ca-78da3871caea"
+ ]
+ },
+ "882a8fca-a108-4651-abb9-20a43eb9f64d": {
+ "simStepIds": [
+ "1551889d-7fcd-4b22-9962-d4174a18ddd6"
+ ]
+ },
+ "0ef482fa-8bc1-446d-baa4-fded92d124f3": {
+ "simStepIds": [
+ "1b760baa-c919-4660-9e0c-b6137e1c2721"
+ ]
+ },
+ "b66f2694-f430-4fd0-808a-5e5279c50dd7": {
+ "simStepIds": [
+ "0a08a7a7-4813-4700-9b6b-0787163e9fd9"
+ ]
+ },
+ "88810df3-fc69-4b7f-b6c8-e46446ce3696": {
+ "simStepIds": [
+ "4cab6466-093b-43c9-88ad-28484e60d6c4"
+ ]
+ },
+ "aaadac8d-1aba-451a-bba4-794a4221c886": {
+ "simStepIds": [
+ "0ab8dd7f-05f5-4462-bf64-1985f392f78d"
+ ]
+ },
+ "8fd4a69e-be65-4ade-9ced-047c7ebd6c0d": {
+ "simStepIds": [
+ "22b464f6-b543-4ac2-8b6b-e26efa91e1b5"
+ ]
+ },
+ "af2b35e5-e443-42dc-8bef-a9183a7c13f8": {
+ "simStepIds": [
+ "b564efb1-92b6-4978-8c83-c278707dc375"
+ ]
+ },
+ "52c36476-f770-4a34-b3db-87f7f134802f": {
+ "simStepIds": [
+ "a12e4843-9815-455c-a6d8-d62a3022639b"
+ ]
+ },
+ "a44ff35a-ae0f-4846-99c3-dcc26c469dff": {
+ "simStepIds": [
+ "5804dffe-4772-4a09-a711-15938dea8430"
+ ]
+ },
+ "8dfd279d-9e21-4855-b71d-bf3e167eab19": {
+ "simStepIds": [
+ "b2b55ac7-e6cf-45f1-a94f-edf2b463bcaf"
+ ]
+ },
+ "c271830f-aca0-4976-b30a-49c7480d2d5f": {
+ "simStepIds": [
+ "5c7c61d7-c7a3-42e5-8991-f30f383d00da"
+ ]
+ }
+ },
+ "isAIGenerated": true,
+ "keywords": "PullRequest, NewPullRequest, services/pull/merge.go",
+ "generationPrompt": "Collaborative Code Review via Pull Requests",
+ "generationKeywords": "PullRequest, NewPullRequest, services/pull/merge.go"
+ },
+ "Project and Task Management with Issue Tracking": {
+ "name": "Project and Task Management with Issue Tracking",
+ "simSteps": [
+ {
+ "simStepId": "ffce7d78-1ab1-49b1-b495-1416b1eadfc9",
+ "diagramNodeId": "0fdc02d5-1b92-4a8c-91f5-7a43eae87236",
+ "simStepLabel": "Web: Handle New Issue Form Submission",
+ "simStepDescription": "A user submits the 'New Issue' form via a POST request. The `NewIssuePost` handler in the web router receives this request, validates the submitted form data (title, content, labels, assignees), and prepares the data for the issue creation service.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "routers/web/repo/issue_new.go",
+ "startLine": "130",
+ "endLine": "240",
+ "relevantVariables": [
+ "NewIssuePost",
+ "form",
+ "issue"
+ ]
+ },
+ "inputDataExample": "{\n \"form_post_request\": {\n \"title\": \"Fix button alignment on login page\",\n \"content\": \"The login button is misaligned on mobile devices.\",\n \"label_ids\": [1, 5],\n \"assignee_ids\": [3],\n \"milestone_id\": 2\n },\n \"context\": {\n \"user\": {\"id\": 2, \"username\": \"john_doe\"},\n \"repository\": {\"id\": 10, \"name\": \"my-awesome-project\", \"owner_name\": \"gitea_user\"}\n }\n}",
+ "outputDataExample": "{\n \"issue\": {\n \"RepoID\": 10,\n \"Title\": \"Fix button alignment on login page\",\n \"PosterID\": 2,\n \"Content\": \"The login button is misaligned on mobile devices.\",\n \"MilestoneID\": 2,\n \"IsPull\": false\n },\n \"assigneeIDs\": [3],\n \"labelIDs\": [1, 5]\n}"
+ },
+ {
+ "simStepId": "91a514b9-1466-4433-93a9-a1ff6c6c8f37",
+ "diagramNodeId": "c8cdf497-8db8-4cce-b1b2-57765ae78e03",
+ "simStepLabel": "Data Flow: Pass Issue Data to Service",
+ "simStepDescription": "The web handler calls the `issue_service.NewIssue` function, passing the prepared `Issue` object along with other details like content, attachments, and assignee IDs to the core issue creation service.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "routers/web/repo/issue_new.go",
+ "startLine": "240",
+ "endLine": "240",
+ "relevantVariables": [
+ "issue_service.NewIssue"
+ ]
+ },
+ "inputDataExample": "{\n \"repo\": {\"id\": 10, \"name\": \"my-awesome-project\"},\n \"issue\": {\n \"RepoID\": 10,\n \"Title\": \"Fix button alignment on login page\",\n \"PosterID\": 2,\n \"Content\": \"(placeholder for separate content arg)\",\n \"MilestoneID\": 2,\n \"IsPull\": false\n },\n \"content\": \"The login button is misaligned on mobile devices.\",\n \"assigneeIDs\": [3],\n \"labelIDs\": [1, 5],\n \"attachments\": []\n}",
+ "outputDataExample": "{\n \"repo\": {\"id\": 10, \"name\": \"my-awesome-project\"},\n \"issue\": {\n \"RepoID\": 10,\n \"Title\": \"Fix button alignment on login page\",\n \"PosterID\": 2,\n \"Content\": \"(placeholder for separate content arg)\",\n \"MilestoneID\": 2,\n \"IsPull\": false\n },\n \"content\": \"The login button is misaligned on mobile devices.\",\n \"assigneeIDs\": [3],\n \"labelIDs\": [1, 5],\n \"attachments\": []\n}"
+ },
+ {
+ "simStepId": "23e3c1d3-be55-497a-ab55-03195d821e10",
+ "diagramNodeId": "c5e558c9-f7f1-48c0-b35d-20852848a419",
+ "simStepLabel": "Service: Orchestrate Issue Creation",
+ "simStepDescription": "The `NewIssue` service function manages the entire creation process. It starts a database transaction, populates the issue object with necessary details, and calls the model layer to persist the data. It also handles creating the initial comment from the issue content.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/issue/issue.go",
+ "startLine": "142",
+ "endLine": "242",
+ "relevantVariables": [
+ "NewIssue",
+ "issue",
+ "issues_model.InsertIssues",
+ "notify.NewIssue"
+ ]
+ },
+ "inputDataExample": "{\n \"repo\": {\"id\": 10, \"name\": \"my-awesome-project\"},\n \"issue\": {\n \"RepoID\": 10,\n \"Title\": \"Fix button alignment on login page\",\n \"PosterID\": 2,\n \"MilestoneID\": 2,\n \"IsPull\": false\n },\n \"content\": \"The login button is misaligned on mobile devices.\",\n \"labelIDs\": [1, 5],\n \"assigneeIDs\": [3]\n}",
+ "outputDataExample": "{\n \"issue_to_insert\": {\n \"RepoID\": 10,\n \"Index\": 42,\n \"Title\": \"Fix button alignment on login page\",\n \"PosterID\": 2,\n \"Content\": \"The login button is misaligned on mobile devices.\",\n \"MilestoneID\": 2,\n \"Labels\": [{\"id\": 1, \"name\": \"bug\"}, {\"id\": 5, \"name\": \"ui\"}],\n \"AssigneeIDs\": [3]\n }\n}"
+ },
+ {
+ "simStepId": "dd1c8491-415a-470b-bd31-573e7f2383ff",
+ "diagramNodeId": "1da93353-da10-4d79-b4a5-5e45280dd1e8",
+ "simStepLabel": "Data Flow: Pass Issue Object to Model",
+ "simStepDescription": "The `NewIssue` service function calls `issues_model.InsertIssues` to persist the fully formed issue object to the database within the active transaction.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "services/issue/issue.go",
+ "startLine": "161",
+ "endLine": "161",
+ "relevantVariables": [
+ "issues_model.InsertIssues"
+ ]
+ },
+ "inputDataExample": "{\n \"issue\": {\n \"RepoID\": 10,\n \"Index\": 42,\n \"Title\": \"Fix button alignment on login page\",\n \"PosterID\": 2,\n \"Content\": \"The login button is misaligned on mobile devices.\",\n \"MilestoneID\": 2,\n \"IsPull\": false,\n \"Labels\": [{\"id\": 1, \"name\": \"bug\"}, {\"id\": 5, \"name\": \"ui\"}]\n }\n}",
+ "outputDataExample": "{\n \"issue\": {\n \"RepoID\": 10,\n \"Index\": 42,\n \"Title\": \"Fix button alignment on login page\",\n \"PosterID\": 2,\n \"Content\": \"The login button is misaligned on mobile devices.\",\n \"MilestoneID\": 2,\n \"IsPull\": false,\n \"Labels\": [{\"id\": 1, \"name\": \"bug\"}, {\"id\": 5, \"name\": \"ui\"}]\n }\n}"
+ },
+ {
+ "simStepId": "77c253a8-80a6-4e84-965f-c37320babc81",
+ "diagramNodeId": "97fb5926-0c38-47ad-8591-399006209210",
+ "simStepLabel": "Database: Insert Issue Record",
+ "simStepDescription": "The `insertIssue` function (called by `InsertIssues`) executes the database queries to create the new issue. It inserts the main record into the `issue` table and then inserts associated records for labels into the `issue_label` table within a transaction.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "models/issues/issue.go",
+ "startLine": "768",
+ "endLine": "794",
+ "relevantVariables": [
+ "insertIssue",
+ "sess.Insert",
+ "issueLabels",
+ "issue"
+ ]
+ },
+ "inputDataExample": "{\n \"issue_to_insert\": {\n \"RepoID\": 10,\n \"Index\": 42,\n \"Title\": \"Fix button alignment on login page\",\n \"PosterID\": 2,\n \"Content\": \"The login button is misaligned on mobile devices.\",\n \"MilestoneID\": 2,\n \"Labels\": [{\"id\": 1, \"name\": \"bug\"}, {\"id\": 5, \"name\": \"ui\"}]\n }\n}",
+ "outputDataExample": "{\n \"inserted_issue\": {\n \"ID\": 123,\n \"RepoID\": 10,\n \"Index\": 42,\n \"Title\": \"Fix button alignment on login page\",\n \"PosterID\": 2,\n \"Content\": \"The login button is misaligned on mobile devices.\",\n \"MilestoneID\": 2,\n \"CreatedUnix\": 1672531200\n }\n}"
+ },
+ {
+ "simStepId": "202f0b40-d7cf-40d6-b794-229b0f38d1b4",
+ "diagramNodeId": "10a06681-af82-48d0-b42b-52498d398caf",
+ "simStepLabel": "Event: Notify Webhook Service of New Issue",
+ "simStepDescription": "After the issue is successfully created in the database and the transaction is committed, the issue service calls the webhook notifier to trigger any relevant webhooks.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "services/issue/issue.go",
+ "startLine": "221",
+ "endLine": "221",
+ "relevantVariables": [
+ "notify.NewIssue"
+ ]
+ },
+ "inputDataExample": "{\n \"created_issue\": {\n \"ID\": 123,\n \"RepoID\": 10,\n \"Index\": 42,\n \"Title\": \"Fix button alignment on login page\",\n \"PosterID\": 2,\n \"IsPull\": false\n }\n}",
+ "outputDataExample": "{\n \"created_issue\": {\n \"ID\": 123,\n \"RepoID\": 10,\n \"Index\": 42,\n \"Title\": \"Fix button alignment on login page\",\n \"PosterID\": 2,\n \"IsPull\": false\n }\n}"
+ },
+ {
+ "simStepId": "756e8552-8547-4936-982a-f6adb7aefd97",
+ "diagramNodeId": "efbd431a-4332-4576-8367-04b50ee53a2a",
+ "simStepLabel": "Webhook: Prepare and Send Notification",
+ "simStepDescription": "The `webhookNotifier.NewIssue` function is triggered. It loads the necessary repository and user data, constructs an `api.IssuePayload` containing information about the new issue, and prepares it for delivery to all matching webhooks.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/webhook/notifier.go",
+ "startLine": "275",
+ "endLine": "294",
+ "relevantVariables": [
+ "NewIssue",
+ "PrepareWebhooks",
+ "api.IssuePayload"
+ ]
+ },
+ "inputDataExample": "{\n \"issue\": {\n \"ID\": 123,\n \"RepoID\": 10,\n \"Index\": 42,\n \"Title\": \"Fix button alignment on login page\",\n \"PosterID\": 2\n }\n}",
+ "outputDataExample": "{\n \"payload\": {\n \"action\": \"opened\",\n \"index\": 42,\n \"issue\": {\n \"id\": 123,\n \"number\": 42,\n \"title\": \"Fix button alignment on login page\",\n \"user\": {\"login\": \"john_doe\"}\n },\n \"repository\": {\"full_name\": \"gitea_user/my-awesome-project\"}\n }\n}"
+ },
+ {
+ "simStepId": "179e5cc9-bbc1-4f87-a1c7-c19324545695",
+ "diagramNodeId": "fa2e1092-e208-4362-b048-ee6ad9443576",
+ "simStepLabel": "Data Flow: Return to Web Handler",
+ "simStepDescription": "Control and the newly created issue object are returned from the service layer back to the `NewIssuePost` web handler.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "services/issue/issue.go",
+ "startLine": "241",
+ "endLine": "241",
+ "relevantVariables": [
+ "issue"
+ ]
+ },
+ "inputDataExample": "{\n \"created_issue\": {\n \"ID\": 123,\n \"RepoID\": 10,\n \"Index\": 42,\n \"Link\": \"/gitea_user/my-awesome-project/issues/42\"\n }\n}",
+ "outputDataExample": "{\n \"created_issue\": {\n \"ID\": 123,\n \"RepoID\": 10,\n \"Index\": 42,\n \"Link\": \"/gitea_user/my-awesome-project/issues/42\"\n }\n}"
+ },
+ {
+ "simStepId": "97731684-60e8-4305-9098-6027b64190bd",
+ "diagramNodeId": "bb14c890-2c21-47a0-9a96-ba933c84c606",
+ "simStepLabel": "Web: Redirect User to New Issue Page",
+ "simStepDescription": "The `NewIssuePost` handler, having successfully created the issue, sends an HTTP 302 Redirect response to the user's browser, directing them to the URL of the newly created issue.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "routers/web/repo/issue_new.go",
+ "startLine": "252",
+ "endLine": "253",
+ "relevantVariables": [
+ "ctx.Redirect",
+ "issue.Link()"
+ ]
+ },
+ "inputDataExample": "{\n \"issue\": {\n \"ID\": 123,\n \"Link\": \"/gitea_user/my-awesome-project/issues/42\"\n }\n}",
+ "outputDataExample": "{\n \"http_response\": {\n \"status_code\": 302,\n \"headers\": {\n \"Location\": \"/gitea_user/my-awesome-project/issues/42\"\n }\n }\n}"
+ }
+ ],
+ "description": "- An integrated system for tracking bugs, tasks, and feature requests
- - Users can create and manage issues within each repository, complete with descriptions, comments, and attachments
- - Issues can be organized using labels, assigned to users, and grouped into milestones for release planning
- - Supports features like time tracking, due dates, and dependencies between issues
- - Issues can be referenced and automatically closed from commit messages or pull requests
",
+ "simulationNodesAndEdges": {
+ "0fdc02d5-1b92-4a8c-91f5-7a43eae87236": {
+ "simStepIds": [
+ "ffce7d78-1ab1-49b1-b495-1416b1eadfc9"
+ ]
+ },
+ "c5e558c9-f7f1-48c0-b35d-20852848a419": {
+ "simStepIds": [
+ "23e3c1d3-be55-497a-ab55-03195d821e10"
+ ]
+ },
+ "97fb5926-0c38-47ad-8591-399006209210": {
+ "simStepIds": [
+ "77c253a8-80a6-4e84-965f-c37320babc81"
+ ]
+ },
+ "efbd431a-4332-4576-8367-04b50ee53a2a": {
+ "simStepIds": [
+ "756e8552-8547-4936-982a-f6adb7aefd97"
+ ]
+ },
+ "bb14c890-2c21-47a0-9a96-ba933c84c606": {
+ "simStepIds": [
+ "97731684-60e8-4305-9098-6027b64190bd"
+ ]
+ },
+ "c8cdf497-8db8-4cce-b1b2-57765ae78e03": {
+ "simStepIds": [
+ "91a514b9-1466-4433-93a9-a1ff6c6c8f37"
+ ]
+ },
+ "1da93353-da10-4d79-b4a5-5e45280dd1e8": {
+ "simStepIds": [
+ "dd1c8491-415a-470b-bd31-573e7f2383ff"
+ ]
+ },
+ "10a06681-af82-48d0-b42b-52498d398caf": {
+ "simStepIds": [
+ "202f0b40-d7cf-40d6-b794-229b0f38d1b4"
+ ]
+ },
+ "fa2e1092-e208-4362-b048-ee6ad9443576": {
+ "simStepIds": [
+ "179e5cc9-bbc1-4f87-a1c7-c19324545695"
+ ]
+ }
+ },
+ "isAIGenerated": true,
+ "keywords": "Issue, NewIssue, routers/web/repo/issue.go",
+ "generationPrompt": "Project and Task Management with Issue Tracking",
+ "generationKeywords": "Issue, NewIssue, routers/web/repo/issue.go"
+ },
+ "CI/CD with Gitea Actions": {
+ "name": "CI/CD with Gitea Actions",
+ "simSteps": [
+ {
+ "simStepId": "54c475cd-aa1c-4381-9d38-a54792886af9",
+ "diagramNodeId": "d022d6fa-5c86-4fa0-a0be-31236a28c8d4",
+ "simStepLabel": "Git Push Event Trigger",
+ "simStepDescription": "A git push event triggers the notification system, which in turn invokes the actions service to handle the event. This is the entry point for detecting and running workflows.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/actions/notifier_helper.go",
+ "startLine": "320",
+ "endLine": "395",
+ "relevantVariables": [
+ "handle",
+ "newNotifyInput",
+ "DetectWorkflows",
+ "InsertRun"
+ ]
+ },
+ "inputDataExample": "{\n \"ref\": \"refs/heads/main\",\n \"after\": \"4f9b03657155140b64f3317c24479e133a8716b9\",\n \"pusher\": {\n \"id\": 1,\n \"login\": \"user1\",\n \"full_name\": \"User One\",\n \"email\": \"user1@example.com\"\n },\n \"repository\": {\n \"id\": 1,\n \"owner\": {\n \"id\": 1,\n \"login\": \"user1\"\n },\n \"name\": \"my-repo\",\n \"full_name\": \"user1/my-repo\"\n }\n}",
+ "outputDataExample": "{\n \"repo\": {\n \"id\": 1,\n \"name\": \"my-repo\"\n },\n \"doer\": {\n \"id\": 1,\n \"name\": \"user1\"\n },\n \"payload\": \"{\\\"ref\\\":\\\"refs/heads/main\\\", ...}\"\n}"
+ },
+ {
+ "simStepId": "2405bd87-f38a-4df3-abcd-25cfc0af4398",
+ "diagramNodeId": "ac3433e9-9244-42ed-be46-d927aee90d41",
+ "simStepLabel": "Transmit Workflow Definitions",
+ "simStepDescription": "The content of the matched workflow files (e.g., `test.yml`) are read from the commit and passed to the run creation logic.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "modules/actions/workflows.go",
+ "startLine": "46",
+ "endLine": "66",
+ "relevantVariables": [
+ "ListWorkflows",
+ "commit.SubTree",
+ "tree.ListEntriesRecursiveFast"
+ ]
+ },
+ "inputDataExample": "{\n \"workflows\": [\n {\n \"entryName\": \"test.yml\",\n \"content\": \"name: test\\non: [push]\\njobs:\\n build:\\n runs-on: ubuntu-latest\\n steps:\\n - run: echo Hello World\"\n }\n ]\n}",
+ "outputDataExample": "{\n \"workflows\": [\n {\n \"entryName\": \"test.yml\",\n \"content\": \"name: test\\non: [push]\\njobs:\\n build:\\n runs-on: ubuntu-latest\\n steps:\\n - run: echo Hello World\"\n }\n ]\n}"
+ },
+ {
+ "simStepId": "c96bb1be-02e4-4023-bc30-19d4ba081da8",
+ "diagramNodeId": "d1143895-5d48-4593-813f-b281b6145fdb",
+ "simStepLabel": "Create Action Run and Jobs",
+ "simStepDescription": "Based on the parsed workflow file, an `ActionRun` record is created for the overall workflow, and individual `ActionRunJob` records are created for each job defined within it. These are persisted to the database in a transaction.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "models/actions/run.go",
+ "startLine": "284",
+ "endLine": "358",
+ "relevantVariables": [
+ "InsertRun",
+ "db.WithTx",
+ "db.GetNextResourceIndex",
+ "ActionRunJob"
+ ]
+ },
+ "inputDataExample": "{\n \"run\": {\n \"Title\": \"Initial commit\",\n \"RepoID\": 1,\n \"WorkflowID\": \"test.yml\",\n \"CommitSHA\": \"4f9b03657155140b64f3317c24479e133a8716b9\",\n \"TriggerEvent\": \"push\"\n },\n \"jobs\": [\n {\n \"Job\": {\n \"Name\": \"build\",\n \"RunsOn\": [\"ubuntu-latest\"],\n \"Needs\": []\n }\n }\n ]\n}",
+ "outputDataExample": "{\n \"ActionRun\": {\n \"ID\": 101,\n \"Index\": 5,\n \"RepoID\": 1,\n \"Status\": \"waiting\"\n },\n \"ActionRunJobs\": [\n {\n \"ID\": 201,\n \"RunID\": 101,\n \"Name\": \"build\",\n \"Status\": \"waiting\"\n }\n ]\n}"
+ },
+ {
+ "simStepId": "48f44711-30e0-4b75-9fc2-56c98bce1fa7",
+ "diagramNodeId": "5ae1e1da-794d-4152-88da-5ba4e75f5bee",
+ "simStepLabel": "Queue Run for Job Emission",
+ "simStepDescription": "The ID of the newly created `ActionRun` is pushed to a background queue. This queue is responsible for checking which jobs are ready to be executed.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "services/actions/job_emitter.go",
+ "startLine": "27",
+ "endLine": "33",
+ "relevantVariables": [
+ "EmitJobsIfReady",
+ "jobEmitterQueue.Push"
+ ]
+ },
+ "inputDataExample": "{\n \"RunID\": 101\n}",
+ "outputDataExample": "{\n \"RunID\": 101\n}"
+ },
+ {
+ "simStepId": "b2c4908e-d37d-4606-a880-31babd962d71",
+ "diagramNodeId": "cf18404b-f3c3-4e0a-ba42-80c0b9eee16f",
+ "simStepLabel": "Job Emitter Checks Dependencies",
+ "simStepDescription": "A background worker picks up the Run ID from the queue. It inspects all jobs for that run, determines which ones have their `needs` dependencies satisfied, and updates their status to `waiting` so they can be picked up by a runner.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/actions/job_emitter.go",
+ "startLine": "48",
+ "endLine": "92",
+ "relevantVariables": [
+ "checkJobsOfRun",
+ "db.Find",
+ "UpdateRunJob"
+ ]
+ },
+ "inputDataExample": "{\n \"RunID\": 101\n}",
+ "outputDataExample": "{\n \"updatedJobs\": [\n {\n \"ID\": 201,\n \"Status\": \"waiting\"\n }\n ]\n}"
+ },
+ {
+ "simStepId": "295d2174-45bc-4e48-b88e-f0fa71fceb9a",
+ "diagramNodeId": "7ad46963-6001-4cba-9021-a22187da39b7",
+ "simStepLabel": "Job Becomes Ready for Pickup",
+ "simStepDescription": "A job is now in the `waiting` state, available for any compatible runner to claim and execute.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "services/actions/job_emitter.go",
+ "startLine": "78",
+ "endLine": "83",
+ "relevantVariables": [
+ "UpdateRunJob"
+ ]
+ },
+ "inputDataExample": "{\n \"JobID\": 201,\n \"Status\": \"waiting\",\n \"RunsOn\": [\"ubuntu-latest\"]\n}",
+ "outputDataExample": "{\n \"JobID\": 201,\n \"Status\": \"waiting\",\n \"RunsOn\": [\"ubuntu-latest\"]\n}"
+ },
+ {
+ "simStepId": "01f6079d-0a18-402a-9778-a571b661a3e6",
+ "diagramNodeId": "4d3a7ffc-e4d8-43b4-b098-a7ef886630ca",
+ "simStepLabel": "Runner Fetches Task",
+ "simStepDescription": "A self-hosted runner polls the Gitea instance for available tasks. The server finds a `waiting` job that matches the runner's labels (e.g., 'ubuntu-latest'), creates an `ActionTask` for it, and assigns it to the runner.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/actions/task.go",
+ "startLine": "18",
+ "endLine": "113",
+ "relevantVariables": [
+ "PickTask",
+ "CreateTaskForRunner",
+ "getSecrets",
+ "GenerateGiteaContext"
+ ]
+ },
+ "inputDataExample": "{\n \"runner\": {\n \"ID\": 5,\n \"Name\": \"my-runner\",\n \"AgentLabels\": [\"ubuntu-latest\"]\n }\n}",
+ "outputDataExample": "{\n \"task\": {\n \"id\": 301,\n \"job_id\": 201,\n \"secrets\": {\n \"GITEA_TOKEN\": \"...\"\n },\n \"context\": {\n \"gitea\": {\n \"actor\": \"user1\"\n }\n }\n }\n}"
+ },
+ {
+ "simStepId": "da76dc6b-1315-4863-afad-c68b80f75671",
+ "diagramNodeId": "da88243b-558a-438b-870e-9da2c643e90d",
+ "simStepLabel": "Task Details Sent to Runner",
+ "simStepDescription": "The comprehensive task details, including the workflow steps, secrets, and context variables, are transmitted to the runner to begin execution.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "routers/api/actions/runner/runner.go",
+ "startLine": "109",
+ "endLine": "136",
+ "relevantVariables": [
+ "s.FetchTask"
+ ]
+ },
+ "inputDataExample": "{\n \"id\": 301,\n \"job_id\": 201,\n \"secrets\": {\n \"GITEA_TOKEN\": \"...\"\n },\n \"context\": {\n \"gitea\": {\n \"actor\": \"user1\"\n }\n },\n \"steps\": [\n {\n \"run\": \"echo Hello World\"\n }\n ]\n}",
+ "outputDataExample": "{\n \"id\": 301,\n \"job_id\": 201,\n \"secrets\": {\n \"GITEA_TOKEN\": \"...\"\n },\n \"context\": {\n \"gitea\": {\n \"actor\": \"user1\"\n }\n },\n \"steps\": [\n {\n \"run\": \"echo Hello World\"\n }\n ]\n}"
+ },
+ {
+ "simStepId": "a9a8aad6-c51e-4d1d-83bd-1a716cc18de1",
+ "diagramNodeId": "f4a68738-6a58-4424-8090-85b1f5d14d23",
+ "simStepLabel": "Runner Reports Job Completion",
+ "simStepDescription": "After executing all steps, the runner reports the final job status back to Gitea via an RPC call. This endpoint handles updating the task and the associated job.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "routers/api/actions/runner/runner.go",
+ "startLine": "165",
+ "endLine": "199",
+ "relevantVariables": [
+ "s.UpdateTask",
+ "actions_model.UpdateTask",
+ "actions_model.UpdateRunJob"
+ ]
+ },
+ "inputDataExample": "{\n \"task_id\": 301,\n \"state\": {\n \"result\": \"RESULT_SUCCESS\",\n \"stopped_at\": \"2023-10-27T10:05:00Z\"\n }\n}",
+ "outputDataExample": "{\n \"task\": {\n \"ID\": 301,\n \"Status\": \"success\"\n },\n \"job\": {\n \"ID\": 201,\n \"Status\": \"success\"\n }\n}"
+ },
+ {
+ "simStepId": "c80b44b7-e91a-4b61-a095-c1cf10dbb585",
+ "diagramNodeId": "bd25ec2e-95b9-47c2-89e3-15fa8ca4eae2",
+ "simStepLabel": "Job Status Change Propagated",
+ "simStepDescription": "The final status of the job is propagated through the system to trigger subsequent actions like commit status updates and webhook notifications.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "services/actions/job_emitter.go",
+ "startLine": "95",
+ "endLine": "104",
+ "relevantVariables": [
+ "NotifyWorkflowJobStatusUpdate",
+ "notify_service.WorkflowJobStatusUpdate"
+ ]
+ },
+ "inputDataExample": "{\n \"job\": {\n \"ID\": 201,\n \"RunID\": 101,\n \"CommitSHA\": \"4f9b03657155140b64f3317c24479e133a8716b9\",\n \"Name\": \"build\",\n \"Status\": \"success\"\n }\n}",
+ "outputDataExample": "{\n \"job\": {\n \"ID\": 201,\n \"RunID\": 101,\n \"CommitSHA\": \"4f9b03657155140b64f3317c24479e133a8716b9\",\n \"Name\": \"build\",\n \"Status\": \"success\"\n }\n}"
+ },
+ {
+ "simStepId": "1850ee33-6937-4414-8809-657c49ab8c24",
+ "diagramNodeId": "54715d5b-dbe6-405c-b591-0c4fc4f211eb",
+ "simStepLabel": "Update Commit Status",
+ "simStepDescription": "The system updates the commit status for the specific commit SHA of the workflow run. This provides visual feedback in the Gitea UI (e.g., a green checkmark on the commit list).",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/actions/commit_status.go",
+ "startLine": "26",
+ "endLine": "40",
+ "relevantVariables": [
+ "CreateCommitStatus",
+ "createCommitStatus"
+ ]
+ },
+ "inputDataExample": "{\n \"job\": {\n \"ID\": 201,\n \"Run\": {\n \"Repo\": { \"ID\": 1, \"OwnerName\": \"user1\", \"Name\": \"my-repo\" },\n \"CommitSHA\": \"4f9b03657155140b64f3317c24479e133a8716b9\"\n },\n \"Status\": \"success\"\n }\n}",
+ "outputDataExample": "{\n \"commit_status\": {\n \"sha\": \"4f9b03657155140b64f3317c24479e133a8716b9\",\n \"state\": \"success\",\n \"context\": \"gitea-actions/build\",\n \"target_url\": \"https://gitea.example.com/user1/my-repo/actions/runs/5/jobs/0\"\n }\n}"
+ },
+ {
+ "simStepId": "c5ff05a3-ed72-407a-a3e8-9764acd20134",
+ "diagramNodeId": "0e991a9b-0712-41d9-9a67-7f3de1da39dc",
+ "simStepLabel": "Run Completion Notification",
+ "simStepDescription": "Once all jobs in a run are complete, the final status of the `ActionRun` is determined, and this information is passed to the notification service.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "services/notify/notify.go",
+ "startLine": "402",
+ "endLine": "406",
+ "relevantVariables": [
+ "WorkflowRunStatusUpdate"
+ ]
+ },
+ "inputDataExample": "{\n \"run\": {\n \"ID\": 101,\n \"RepoID\": 1,\n \"Status\": \"success\",\n \"Repo\": { \"OwnerName\": \"user1\", \"Name\": \"my-repo\" },\n \"TriggerUser\": { \"Name\": \"user1\" }\n }\n}",
+ "outputDataExample": "{\n \"run\": {\n \"ID\": 101,\n \"RepoID\": 1,\n \"Status\": \"success\",\n \"Repo\": { \"OwnerName\": \"user1\", \"Name\": \"my-repo\" },\n \"TriggerUser\": { \"Name\": \"user1\" }\n }\n}"
+ },
+ {
+ "simStepId": "819644f6-a9d1-489c-a1e9-8a7f607d8db6",
+ "diagramNodeId": "b0ef37fb-198b-46a5-bdf6-0544a12abc08",
+ "simStepLabel": "Send Webhook Notifications",
+ "simStepDescription": "The notification service prepares and sends webhook payloads for the `workflow_run` event to any configured endpoints, informing external systems of the workflow's completion.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/webhook/notifier.go",
+ "startLine": "1013",
+ "endLine": "1052",
+ "relevantVariables": [
+ "webhookNotifier.WorkflowRunStatusUpdate",
+ "PrepareWebhooks"
+ ]
+ },
+ "inputDataExample": "{\n \"run\": {\n \"id\": 101,\n \"status\": \"success\",\n \"conclusion\": \"success\"\n },\n \"repository\": {\n \"full_name\": \"user1/my-repo\"\n }\n}",
+ "outputDataExample": "{\n \"webhook_payload\": {\n \"action\": \"completed\",\n \"workflow_run\": {\n \"id\": 101,\n \"status\": \"completed\",\n \"conclusion\": \"success\"\n },\n \"repository\": { ... }\n }\n}"
+ }
+ ],
+ "description": "- Automates software development workflows for building, testing, and deployment
- - Provides a CI/CD system heavily inspired by GitHub Actions, using YAML files for workflow definitions
- - Workflows are stored in the
- gitea/workflows directory of a repository
- - Jobs are executed by self-hosted runners in response to Git events like pushes and pull requests, or on a schedule
- - Users can view real-time logs, statuses, and artifacts of workflow runs through the web interface
",
+ "simulationNodesAndEdges": {
+ "d022d6fa-5c86-4fa0-a0be-31236a28c8d4": {
+ "simStepIds": [
+ "54c475cd-aa1c-4381-9d38-a54792886af9"
+ ]
+ },
+ "d1143895-5d48-4593-813f-b281b6145fdb": {
+ "simStepIds": [
+ "c96bb1be-02e4-4023-bc30-19d4ba081da8"
+ ]
+ },
+ "cf18404b-f3c3-4e0a-ba42-80c0b9eee16f": {
+ "simStepIds": [
+ "b2c4908e-d37d-4606-a880-31babd962d71"
+ ]
+ },
+ "4d3a7ffc-e4d8-43b4-b098-a7ef886630ca": {
+ "simStepIds": [
+ "01f6079d-0a18-402a-9778-a571b661a3e6"
+ ]
+ },
+ "f4a68738-6a58-4424-8090-85b1f5d14d23": {
+ "simStepIds": [
+ "a9a8aad6-c51e-4d1d-83bd-1a716cc18de1"
+ ]
+ },
+ "54715d5b-dbe6-405c-b591-0c4fc4f211eb": {
+ "simStepIds": [
+ "1850ee33-6937-4414-8809-657c49ab8c24"
+ ]
+ },
+ "b0ef37fb-198b-46a5-bdf6-0544a12abc08": {
+ "simStepIds": [
+ "819644f6-a9d1-489c-a1e9-8a7f607d8db6"
+ ]
+ },
+ "ac3433e9-9244-42ed-be46-d927aee90d41": {
+ "simStepIds": [
+ "2405bd87-f38a-4df3-abcd-25cfc0af4398"
+ ]
+ },
+ "5ae1e1da-794d-4152-88da-5ba4e75f5bee": {
+ "simStepIds": [
+ "48f44711-30e0-4b75-9fc2-56c98bce1fa7"
+ ]
+ },
+ "7ad46963-6001-4cba-9021-a22187da39b7": {
+ "simStepIds": [
+ "295d2174-45bc-4e48-b88e-f0fa71fceb9a"
+ ]
+ },
+ "da88243b-558a-438b-870e-9da2c643e90d": {
+ "simStepIds": [
+ "da76dc6b-1315-4863-afad-c68b80f75671"
+ ]
+ },
+ "bd25ec2e-95b9-47c2-89e3-15fa8ca4eae2": {
+ "simStepIds": [
+ "c80b44b7-e91a-4b61-a095-c1cf10dbb585"
+ ]
+ },
+ "0e991a9b-0712-41d9-9a67-7f3de1da39dc": {
+ "simStepIds": [
+ "c5ff05a3-ed72-407a-a3e8-9764acd20134"
+ ]
+ }
+ },
+ "isAIGenerated": true,
+ "keywords": "ActionRun, services/actions, .gitea/workflows",
+ "generationPrompt": "CI/CD with Gitea Actions",
+ "generationKeywords": "ActionRun, services/actions, .gitea/workflows"
+ },
+ "User, Team, and Organization Management": {
+ "name": "User, Team, and Organization Management",
+ "simSteps": [
+ {
+ "simStepId": "d3d50f13-d8b4-42b7-9c03-f5aecdd107c3",
+ "diagramNodeId": "5801e4ea-4e2b-472a-87ec-4284f690993c",
+ "simStepLabel": "API Call: Create an Organization",
+ "simStepDescription": "A user with appropriate permissions makes an API call to create a new organization. The request includes the organization's name, description, and visibility settings.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "routers/api/v1/org/org.go",
+ "startLine": "222",
+ "endLine": "275",
+ "relevantVariables": [
+ "Create",
+ "forms.CreateOrgOption",
+ "organization.CreateOrganization"
+ ]
+ },
+ "inputDataExample": "{\"username\": \"acme-corp\", \"full_name\": \"ACME Corporation\", \"description\": \"A company that makes everything.\", \"website\": \"https://www.acme.com\", \"location\": \"New York\", \"visibility\": \"public\"}",
+ "outputDataExample": "{\"org\": {\"name\": \"acme-corp\", \"description\": \"A company that makes everything.\", \"visibility\": \"public\"}, \"creator\": {\"id\": 2, \"login_name\": \"user2\"}}"
+ },
+ {
+ "simStepId": "c043edea-95e5-4a4d-9153-95d0adf7c4e8",
+ "diagramNodeId": "c07fa184-527d-444e-bf79-b0450d13b27c",
+ "simStepLabel": "Data Transmission: Pass Organization Data to Service",
+ "simStepDescription": "The API handler validates the input and passes the organization data along with the creator's user object to the organization creation service function.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "routers/api/v1/org/org.go",
+ "startLine": "267",
+ "endLine": "267",
+ "relevantVariables": [
+ "organization.CreateOrganization"
+ ]
+ },
+ "inputDataExample": "{\"org\": {\"name\": \"acme-corp\", \"description\": \"A company that makes everything.\", \"visibility\": \"public\"}, \"creator\": {\"id\": 2, \"login_name\": \"user2\"}}",
+ "outputDataExample": "{\"org\": {\"name\": \"acme-corp\", \"description\": \"A company that makes everything.\", \"visibility\": \"public\"}, \"creator\": {\"id\": 2, \"login_name\": \"user2\"}}"
+ },
+ {
+ "simStepId": "c87a4f37-7192-4dd9-a921-65701d2514da",
+ "diagramNodeId": "74565581-b2f0-4f07-a22e-b3ca8b2ca245",
+ "simStepLabel": "Database: Create Organization and Owner Team",
+ "simStepDescription": "The `CreateOrganization` function persists the new organization to the database. It creates a new user of type 'Organization', automatically creates a default 'Owners' team, assigns all repository unit permissions to this team, and adds the creating user as the first member of the organization and the 'Owners' team.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "models/organization/org.go",
+ "startLine": "282",
+ "endLine": "379",
+ "relevantVariables": [
+ "CreateOrganization",
+ "db.Insert",
+ "Team",
+ "TeamUnit",
+ "TeamUser"
+ ]
+ },
+ "inputDataExample": "{\"org\": {\"name\": \"acme-corp\", \"description\": \"A company that makes everything.\", \"visibility\": \"public\"}, \"owner\": {\"id\": 2, \"login_name\": \"user2\"}}",
+ "outputDataExample": "{\"id\": 26, \"name\": \"acme-corp\", \"full_name\": \"ACME Corporation\", \"email\": \"\", \"description\": \"A company that makes everything.\", \"website\": \"https://www.acme.com\", \"location\": \"New York\", \"visibility\": \"public\"}"
+ },
+ {
+ "simStepId": "a0797477-98f0-4487-bd6e-7abf47b86744",
+ "diagramNodeId": "987bbf28-002d-4fe1-863f-ec21c4f7824a",
+ "simStepLabel": "API Response: Organization Created",
+ "simStepDescription": "The newly created organization object is serialized to JSON and returned to the client with a 201 Created status.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "routers/api/v1/org/org.go",
+ "startLine": "274",
+ "endLine": "274",
+ "relevantVariables": [
+ "convert.ToOrganization"
+ ]
+ },
+ "inputDataExample": "{\"id\": 26, \"name\": \"acme-corp\", \"full_name\": \"ACME Corporation\", \"email\": \"\", \"description\": \"A company that makes everything.\", \"website\": \"https://www.acme.com\", \"location\": \"New York\", \"visibility\": \"public\"}",
+ "outputDataExample": "{\"id\": 26, \"name\": \"acme-corp\", \"full_name\": \"ACME Corporation\", \"email\": \"\", \"description\": \"A company that makes everything.\", \"website\": \"https://www.acme.com\", \"location\": \"New York\", \"visibility\": \"public\"}"
+ },
+ {
+ "simStepId": "27159163-bec3-4784-814c-39fbbabbe5c0",
+ "diagramNodeId": "e94a5358-862e-45d4-a9fc-44f3d404f9a2",
+ "simStepLabel": "API Call: Create a Team",
+ "simStepDescription": "An organization owner makes an API call to create a new team within the organization, specifying the team's name, permissions, and repository access settings.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "routers/api/v1/org/team.go",
+ "startLine": "181",
+ "endLine": "245",
+ "relevantVariables": [
+ "CreateTeam",
+ "api.CreateTeamOption",
+ "organization.Team",
+ "org_service.NewTeam"
+ ]
+ },
+ "inputDataExample": "{\"name\": \"developers\", \"description\": \"Software Developers\", \"permission\": \"write\", \"units\": [\"repo.code\", \"repo.issues\", \"repo.pulls\"]}",
+ "outputDataExample": "{\"team\": {\"OrgID\": 26, \"Name\": \"developers\", \"Description\": \"Software Developers\", \"AccessMode\": \"write\", \"CanCreateOrgRepo\": false, \"Units\": [\"repo.code\", \"repo.issues\", \"repo.pulls\"]}}"
+ },
+ {
+ "simStepId": "a8d868f5-ec8f-497d-9e46-e7741e51d2d2",
+ "diagramNodeId": "e31b5a55-8e34-469c-91c6-4d12d7b47bb6",
+ "simStepLabel": "Data Transmission: Pass Team Data to Service",
+ "simStepDescription": "The API handler constructs a `Team` object from the request body and passes it to the `NewTeam` service function for creation.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "routers/api/v1/org/team.go",
+ "startLine": "232",
+ "endLine": "232",
+ "relevantVariables": [
+ "org_service.NewTeam"
+ ]
+ },
+ "inputDataExample": "{\"team\": {\"OrgID\": 26, \"Name\": \"developers\", \"Description\": \"Software Developers\", \"AccessMode\": \"write\", \"CanCreateOrgRepo\": false, \"Units\": [\"repo.code\", \"repo.issues\", \"repo.pulls\"]}}",
+ "outputDataExample": "{\"team\": {\"OrgID\": 26, \"Name\": \"developers\", \"Description\": \"Software Developers\", \"AccessMode\": \"write\", \"CanCreateOrgRepo\": false, \"Units\": [\"repo.code\", \"repo.issues\", \"repo.pulls\"]}}"
+ },
+ {
+ "simStepId": "c7a4932f-39c4-440f-bfb2-6e0f08961f03",
+ "diagramNodeId": "ab5d40fa-b506-44e3-af02-f493f3fa1062",
+ "simStepLabel": "Database: Create Team and Units",
+ "simStepDescription": "The `NewTeam` service function validates the team name and permissions, then inserts the new team record into the `team` table. It also creates associated `team_unit` records to define the team's access permissions for different repository sections (code, issues, etc.).",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/org/team.go",
+ "startLine": "26",
+ "endLine": "83",
+ "relevantVariables": [
+ "NewTeam",
+ "t",
+ "sess.Insert"
+ ]
+ },
+ "inputDataExample": "{\"OrgID\": 26, \"Name\": \"developers\", \"Description\": \"Software Developers\", \"AccessMode\": \"write\", \"CanCreateOrgRepo\": false, \"Units\": [{\"type\": 1}, {\"type\": 2}]}",
+ "outputDataExample": "{\"id\": 25, \"org_id\": 26, \"name\": \"developers\", \"description\": \"Software Developers\", \"authorize\": \"write\", \"num_repos\": 0, \"num_members\": 0}"
+ },
+ {
+ "simStepId": "b7de382b-0703-4570-93b6-0f58841ebf91",
+ "diagramNodeId": "2b874597-f207-44a5-8cde-031be7eb2b56",
+ "simStepLabel": "API Response: Team Created",
+ "simStepDescription": "The newly created team object is returned as a JSON response to the client.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "routers/api/v1/org/team.go",
+ "startLine": "241",
+ "endLine": "243",
+ "relevantVariables": [
+ "convert.ToTeam"
+ ]
+ },
+ "inputDataExample": "{\"id\": 25, \"name\": \"developers\", \"description\": \"Software Developers\", \"permission\": \"write\", \"can_create_org_repo\": false, \"units\": [\"repo.code\", \"repo.issues\", \"repo.pulls\"]}",
+ "outputDataExample": "{\"id\": 25, \"name\": \"developers\", \"description\": \"Software Developers\", \"permission\": \"write\", \"can_create_org_repo\": false, \"units\": [\"repo.code\", \"repo.issues\", \"repo.pulls\"]}"
+ },
+ {
+ "simStepId": "3ffb9dab-a06e-447e-ac05-83e821f4e38f",
+ "diagramNodeId": "b686c9a2-1300-4f86-9915-9b3bad7ecfb6",
+ "simStepLabel": "API Call: Add User to Team",
+ "simStepDescription": "An organization owner adds an existing user to the newly created 'developers' team via an API call.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "routers/api/v1/org/team.go",
+ "startLine": "453",
+ "endLine": "491",
+ "relevantVariables": [
+ "AddTeamMember",
+ "u",
+ "org_service.AddTeamMember"
+ ]
+ },
+ "inputDataExample": "{\"team_id\": 25, \"username\": \"user4\"}",
+ "outputDataExample": "{\"team\": {\"id\": 25, \"org_id\": 26}, \"user\": {\"id\": 4, \"login_name\": \"user4\"}}"
+ },
+ {
+ "simStepId": "7cd2fd9a-4b40-49c3-a288-e35db0272f3c",
+ "diagramNodeId": "8d94591b-aa0d-42da-af64-24eb53a28705",
+ "simStepLabel": "Data Transmission: Pass User and Team to Service",
+ "simStepDescription": "The API handler passes the target user and team objects to the `AddTeamMember` service function.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "routers/api/v1/org/team.go",
+ "startLine": "485",
+ "endLine": "485",
+ "relevantVariables": [
+ "org_service.AddTeamMember"
+ ]
+ },
+ "inputDataExample": "{\"team\": {\"id\": 25, \"org_id\": 26}, \"user\": {\"id\": 4, \"login_name\": \"user4\"}}",
+ "outputDataExample": "{\"team\": {\"id\": 25, \"org_id\": 26}, \"user\": {\"id\": 4, \"login_name\": \"user4\"}}"
+ },
+ {
+ "simStepId": "62554420-2e08-4eb8-ae5c-8664c95a27b2",
+ "diagramNodeId": "385f5d69-6b5e-452c-9b07-8774ded3e691",
+ "simStepLabel": "Database: Create Team Membership",
+ "simStepDescription": "The `AddTeamMember` service function first ensures the user is a member of the organization by creating an `org_user` record if one doesn't exist. Then, it creates a `team_user` record to link the user to the team, and increments the team's member count. Finally, it updates the user's access permissions to all repositories the team has access to.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/org/team.go",
+ "startLine": "213",
+ "endLine": "272",
+ "relevantVariables": [
+ "AddTeamMember",
+ "organization.AddOrgUser",
+ "db.Insert",
+ "organization.TeamUser",
+ "access_model.RecalculateUserAccess"
+ ]
+ },
+ "inputDataExample": "{\"team\": {\"id\": 25, \"org_id\": 26}, \"user\": {\"id\": 4, \"login_name\": \"user4\"}}",
+ "outputDataExample": "null"
+ },
+ {
+ "simStepId": "9174ea75-a7d4-4c3b-928a-ca8849adc991",
+ "diagramNodeId": "951d6bc3-97ee-4898-b6a0-c3e4b5d4f443",
+ "simStepLabel": "API Response: User Added to Team",
+ "simStepDescription": "A 204 No Content response is sent back, confirming that the user has been added to the team.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "routers/api/v1/org/team.go",
+ "startLine": "489",
+ "endLine": "489",
+ "relevantVariables": [
+ "ctx.Status(http.StatusNoContent)"
+ ]
+ },
+ "inputDataExample": "null",
+ "outputDataExample": "null"
+ },
+ {
+ "simStepId": "63bb7359-8e00-459a-9be7-a4cb596a2ac4",
+ "diagramNodeId": "a8fb5076-2684-418a-86dd-e1a81ef6dcd5",
+ "simStepLabel": "API Call: Add Repository to Team",
+ "simStepDescription": "An organization owner grants the 'developers' team access to an organization repository via an API call.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "routers/api/v1/org/team.go",
+ "startLine": "645",
+ "endLine": "692",
+ "relevantVariables": [
+ "AddTeamRepository",
+ "repo_service.TeamAddRepository"
+ ]
+ },
+ "inputDataExample": "{\"team_id\": 25, \"org\": \"acme-corp\", \"repo\": \"website\"}",
+ "outputDataExample": "{\"team\": {\"id\": 25}, \"repo\": {\"id\": 32, \"name\": \"website\"}}"
+ },
+ {
+ "simStepId": "2fff8506-9cf7-4560-8963-857e670940d7",
+ "diagramNodeId": "511cb761-ed7f-44d9-9a4d-00d12b23b846",
+ "simStepLabel": "Data Transmission: Pass Repo and Team to Service",
+ "simStepDescription": "The API handler passes the target repository and team objects to the `TeamAddRepository` service function.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "routers/api/v1/org/team.go",
+ "startLine": "689",
+ "endLine": "689",
+ "relevantVariables": [
+ "repo_service.TeamAddRepository"
+ ]
+ },
+ "inputDataExample": "{\"team\": {\"id\": 25}, \"repo\": {\"id\": 32, \"name\": \"website\"}}",
+ "outputDataExample": "{\"team\": {\"id\": 25}, \"repo\": {\"id\": 32, \"name\": \"website\"}}"
+ },
+ {
+ "simStepId": "b6cf2f5e-8a56-4e3a-84f0-5259abcb93a0",
+ "diagramNodeId": "e8f83196-c831-49b1-bdf9-f8747469b62c",
+ "simStepLabel": "Database: Grant Repository Access to Team",
+ "simStepDescription": "The `TeamAddRepository` service function creates a `team_repo` record linking the team to the repository. It then calls `RecalculateTeamAccesses` to update the `access` table, ensuring all members of the team receive the correct permissions for the repository based on the team's access mode.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/repository/repo_team.go",
+ "startLine": "29",
+ "endLine": "55",
+ "relevantVariables": [
+ "addRepositoryToTeam",
+ "organization.AddTeamRepo",
+ "organization.IncrTeamRepoNum",
+ "access_model.RecalculateTeamAccesses"
+ ]
+ },
+ "inputDataExample": "{\"team\": {\"id\": 25}, \"repo\": {\"id\": 32, \"name\": \"website\"}}",
+ "outputDataExample": "null"
+ },
+ {
+ "simStepId": "582f4568-966f-4a89-b5d3-73fbff0899ee",
+ "diagramNodeId": "3eec94e4-2183-4f04-817c-6d464923e971",
+ "simStepLabel": "API Response: Repository Added to Team",
+ "simStepDescription": "A 204 No Content response is sent, confirming that the repository has been added to the team.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "routers/api/v1/org/team.go",
+ "startLine": "691",
+ "endLine": "691",
+ "relevantVariables": [
+ "ctx.Status(http.StatusNoContent)"
+ ]
+ },
+ "inputDataExample": "null",
+ "outputDataExample": "null"
+ },
+ {
+ "simStepId": "bf4d9374-88f2-4882-8c74-b393fe42964f",
+ "diagramNodeId": "4fc53056-f096-48e0-9866-5ce11e58e2d7",
+ "simStepLabel": "Logic: Verifying User Permissions",
+ "simStepDescription": "When a user attempts to access a repository, the system calls `GetUserRepoPermission`. This function determines the user's access level. For organization repositories, it checks if the user is a direct collaborator. If not, it aggregates permissions from all teams the user is a member of that have access to the repository. It checks the `team_user` and `team_repo` tables to establish this relationship, and then consolidates the access modes from the relevant `team` and `team_unit` records to grant the highest possible permission level.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "models/perm/access/access.go",
+ "startLine": "203",
+ "endLine": "220",
+ "relevantVariables": [
+ "userAccessMode",
+ "teams",
+ "e.Join",
+ "team_repo",
+ "team_user"
+ ]
+ },
+ "inputDataExample": "{\"userID\": 4, \"repoID\": 32}",
+ "outputDataExample": "{\"AccessMode\": \"write\", \"Units\": [\"repo.code\", \"repo.issues\", \"repo.pulls\"]}"
+ }
+ ],
+ "description": "- Manages users and provides structures for team-based collaboration
- - Supports individual user accounts with personal settings and profiles
- - Allows the creation of organizations to group repositories and manage team access centrally
- - Within organizations, users can be organized into teams with fine-grained repository permissions (read, write, admin)
- - Provides a clear structure for managing access control in both small teams and large enterprises
",
+ "simulationNodesAndEdges": {
+ "5801e4ea-4e2b-472a-87ec-4284f690993c": {
+ "simStepIds": [
+ "d3d50f13-d8b4-42b7-9c03-f5aecdd107c3"
+ ]
+ },
+ "74565581-b2f0-4f07-a22e-b3ca8b2ca245": {
+ "simStepIds": [
+ "c87a4f37-7192-4dd9-a921-65701d2514da"
+ ]
+ },
+ "e94a5358-862e-45d4-a9fc-44f3d404f9a2": {
+ "simStepIds": [
+ "27159163-bec3-4784-814c-39fbbabbe5c0"
+ ]
+ },
+ "ab5d40fa-b506-44e3-af02-f493f3fa1062": {
+ "simStepIds": [
+ "c7a4932f-39c4-440f-bfb2-6e0f08961f03"
+ ]
+ },
+ "b686c9a2-1300-4f86-9915-9b3bad7ecfb6": {
+ "simStepIds": [
+ "3ffb9dab-a06e-447e-ac05-83e821f4e38f"
+ ]
+ },
+ "385f5d69-6b5e-452c-9b07-8774ded3e691": {
+ "simStepIds": [
+ "62554420-2e08-4eb8-ae5c-8664c95a27b2"
+ ]
+ },
+ "a8fb5076-2684-418a-86dd-e1a81ef6dcd5": {
+ "simStepIds": [
+ "63bb7359-8e00-459a-9be7-a4cb596a2ac4"
+ ]
+ },
+ "e8f83196-c831-49b1-bdf9-f8747469b62c": {
+ "simStepIds": [
+ "b6cf2f5e-8a56-4e3a-84f0-5259abcb93a0"
+ ]
+ },
+ "4fc53056-f096-48e0-9866-5ce11e58e2d7": {
+ "simStepIds": [
+ "bf4d9374-88f2-4882-8c74-b393fe42964f"
+ ]
+ },
+ "c07fa184-527d-444e-bf79-b0450d13b27c": {
+ "simStepIds": [
+ "c043edea-95e5-4a4d-9153-95d0adf7c4e8"
+ ]
+ },
+ "987bbf28-002d-4fe1-863f-ec21c4f7824a": {
+ "simStepIds": [
+ "a0797477-98f0-4487-bd6e-7abf47b86744"
+ ]
+ },
+ "e31b5a55-8e34-469c-91c6-4d12d7b47bb6": {
+ "simStepIds": [
+ "a8d868f5-ec8f-497d-9e46-e7741e51d2d2"
+ ]
+ },
+ "2b874597-f207-44a5-8cde-031be7eb2b56": {
+ "simStepIds": [
+ "b7de382b-0703-4570-93b6-0f58841ebf91"
+ ]
+ },
+ "8d94591b-aa0d-42da-af64-24eb53a28705": {
+ "simStepIds": [
+ "7cd2fd9a-4b40-49c3-a288-e35db0272f3c"
+ ]
+ },
+ "951d6bc3-97ee-4898-b6a0-c3e4b5d4f443": {
+ "simStepIds": [
+ "9174ea75-a7d4-4c3b-928a-ca8849adc991"
+ ]
+ },
+ "511cb761-ed7f-44d9-9a4d-00d12b23b846": {
+ "simStepIds": [
+ "2fff8506-9cf7-4560-8963-857e670940d7"
+ ]
+ },
+ "3eec94e4-2183-4f04-817c-6d464923e971": {
+ "simStepIds": [
+ "582f4568-966f-4a89-b5d3-73fbff0899ee"
+ ]
+ }
+ },
+ "isAIGenerated": true,
+ "keywords": "Organization, Team, access_model",
+ "generationPrompt": "User, Team, and Organization Management",
+ "generationKeywords": "Organization, Team, access_model"
+ },
+ "Integrated Package Registry": {
+ "name": "Integrated Package Registry",
+ "simSteps": [
+ {
+ "simStepId": "80bd7665-22f0-4298-a595-441e3ac30519",
+ "diagramNodeId": "93a89fef-f5df-40a0-a9e5-a3bc04193b06",
+ "simStepLabel": "API Call: Route Package Upload Request",
+ "simStepDescription": "An incoming HTTP PUT request to upload a generic package is received. The router matches the URL pattern '/api/packages/{owner}/generic/{packagename}/{packageversion}/{filename}' and directs the request to the `generic.UploadPackage` handler.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "routers/api/packages/api.go",
+ "startLine": "308",
+ "endLine": "308",
+ "relevantVariables": [
+ "r.Put",
+ "generic.UploadPackage"
+ ]
+ },
+ "inputDataExample": "{\"method\":\"PUT\",\"url\":\"/api/packages/user2/generic/my-app/1.0.0/package.zip\",\"headers\":{\"Authorization\":\"Basic dXNlcjI6cGFzc3dvcmQ=\"}}",
+ "outputDataExample": "{\"handler\":\"generic.UploadPackage\",\"params\":{\"owner\":\"user2\",\"packagename\":\"my-app\",\"packageversion\":\"1.0.0\",\"filename\":\"package.zip\"}}"
+ },
+ {
+ "simStepId": "df58fa69-47ff-45b1-9e42-a0ff6501abeb",
+ "diagramNodeId": "0ba0d3db-8e3b-4454-b9f9-c770676a5de6",
+ "simStepLabel": "Data Transmission: Pass Request to Handler",
+ "simStepDescription": "The HTTP request context, containing headers, parameters, and the file content stream, is passed to the `UploadPackage` function.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "routers/api/packages/generic/generic.go",
+ "startLine": "72",
+ "endLine": "72",
+ "relevantVariables": [
+ "UploadPackage",
+ "ctx"
+ ]
+ },
+ "inputDataExample": "{\"method\":\"PUT\",\"url\":\"/api/packages/user2/generic/my-app/1.0.0/package.zip\",\"body\":\"\"}",
+ "outputDataExample": "{\"method\":\"PUT\",\"url\":\"/api/packages/user2/generic/my-app/1.0.0/package.zip\",\"body\":\"\"}"
+ },
+ {
+ "simStepId": "9e90ffc2-07f4-4084-b09e-bee9d373e5d7",
+ "diagramNodeId": "602f94d9-2d09-4bda-8700-5fd0e4ce0cb6",
+ "simStepLabel": "Data Transformation: Process Uploaded File Data",
+ "simStepDescription": "The handler reads the file content from the request body. It creates a `HashedBuffer` which simultaneously reads the stream into a temporary buffer and calculates multiple checksums (MD5, SHA1, SHA256, SHA512).",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "routers/api/packages/generic/generic.go",
+ "startLine": "101",
+ "endLine": "106",
+ "relevantVariables": [
+ "packages_module.CreateHashedBufferFromReader",
+ "buf"
+ ]
+ },
+ "inputDataExample": "{\"requestBody\":\"\"}",
+ "outputDataExample": "{\"HashedBuffer\":{\"size\":12345,\"sha256\":\"a1b2c3...\"}}"
+ },
+ {
+ "simStepId": "433dacf5-48f5-4c8b-8bd3-2afd7b5c03ad",
+ "diagramNodeId": "79140f26-f852-443c-8b81-26bafbf41a8d",
+ "simStepLabel": "Data Transmission: Pass Package Data to Service",
+ "simStepDescription": "The handler constructs `PackageCreationInfo` and `PackageFileCreationInfo` objects containing the owner, package details, and file data. These objects are passed to the `CreatePackageOrAddFileToExisting` service function.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "routers/api/packages/generic/generic.go",
+ "startLine": "111",
+ "endLine": "126",
+ "relevantVariables": [
+ "packages_service.CreatePackageOrAddFileToExisting",
+ "pvci",
+ "pfci"
+ ]
+ },
+ "inputDataExample": "{\"PackageCreationInfo\":{\"Owner\":{\"LoginName\":\"user2\"},\"PackageType\":\"generic\",\"Name\":\"my-app\",\"Version\":\"1.0.0\",\"Creator\":{\"LoginName\":\"user2\"}},\"PackageFileCreationInfo\":{\"Filename\":\"package.zip\",\"Data\":\"\"}}",
+ "outputDataExample": "{\"PackageCreationInfo\":{\"Owner\":{\"LoginName\":\"user2\"},\"PackageType\":\"generic\",\"Name\":\"my-app\",\"Version\":\"1.0.0\",\"Creator\":{\"LoginName\":\"user2\"}},\"PackageFileCreationInfo\":{\"Filename\":\"package.zip\",\"Data\":\"\"}}"
+ },
+ {
+ "simStepId": "3a18acb5-55a0-428f-9bb5-2cade38c753e",
+ "diagramNodeId": "60f8ff6c-06aa-4a3b-acb1-de1f90145878",
+ "simStepLabel": "Database Query: Create Package Records",
+ "simStepDescription": "The `CreatePackageOrAddFileToExisting` service function handles the database and storage operations. It starts a transaction, creates or retrieves the `Package` and `PackageVersion` records, saves the file content to the configured storage creating a `PackageBlob` record, and finally creates a `PackageFile` record linking the version to the content. The transaction is then committed.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/packages/packages.go",
+ "startLine": "72",
+ "endLine": "120",
+ "relevantVariables": [
+ "createPackageAndAddFile",
+ "db.TxContext",
+ "createPackageAndVersion",
+ "addFileToPackageVersion",
+ "committer.Commit"
+ ]
+ },
+ "inputDataExample": "{\"PackageCreationInfo\":{\"Owner\":{\"LoginName\":\"user2\"},\"PackageType\":\"generic\",\"Name\":\"my-app\",\"Version\":\"1.0.0\"},\"PackageFileCreationInfo\":{\"Filename\":\"package.zip\"}}",
+ "outputDataExample": "{\"PackageVersion\":{\"ID\":1,\"Version\":\"1.0.0\"},\"PackageFile\":{\"ID\":1,\"Name\":\"package.zip\"}}"
+ },
+ {
+ "simStepId": "6b367fd7-0316-477a-89a5-b339c79ba573",
+ "diagramNodeId": "61550a8c-6c85-4ec9-a9f3-dc0299c5ae3a",
+ "simStepLabel": "Data Transmission: Return Success to Handler",
+ "simStepDescription": "The package service function completes successfully and returns a `nil` error to the API handler, signaling that the package file was created.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "routers/api/packages/generic/generic.go",
+ "startLine": "111",
+ "endLine": "111",
+ "relevantVariables": [
+ "err"
+ ]
+ },
+ "inputDataExample": "{\"PackageVersion\":{\"ID\":1},\"PackageFile\":{\"ID\":1},\"error\":null}",
+ "outputDataExample": "{\"PackageVersion\":{\"ID\":1},\"PackageFile\":{\"ID\":1},\"error\":null}"
+ },
+ {
+ "simStepId": "1c045caa-8810-492e-97be-a8471a7605b2",
+ "diagramNodeId": "b52e0740-466f-4999-b5e2-40f2a59be4da",
+ "simStepLabel": "API Call: Send Success Response",
+ "simStepDescription": "After the service function returns successfully, the API handler sends an HTTP `201 Created` response back to the client to confirm that the package was uploaded.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "routers/api/packages/generic/generic.go",
+ "startLine": "135",
+ "endLine": "135",
+ "relevantVariables": [
+ "ctx.Status",
+ "http.StatusCreated"
+ ]
+ },
+ "inputDataExample": "{\"error\":null}",
+ "outputDataExample": "{\"HTTPResponse\":{\"status\":201,\"body\":\"Created\"}}"
+ }
+ ],
+ "description": "- Host and manage software packages and container images alongside source code
- - Provides a multi-format package registry supporting Docker/OCI, npm, Maven, NuGet, PyPI, and more
- - Packages are scoped to users or organizations, enabling a fully self-hosted DevOps ecosystem
- - Users can publish, install, and manage package versions using standard client tools
- - Integrates with Gitea Actions to automate publishing packages as part of the CI/CD pipeline
",
+ "simulationNodesAndEdges": {
+ "93a89fef-f5df-40a0-a9e5-a3bc04193b06": {
+ "simStepIds": [
+ "80bd7665-22f0-4298-a595-441e3ac30519"
+ ]
+ },
+ "602f94d9-2d09-4bda-8700-5fd0e4ce0cb6": {
+ "simStepIds": [
+ "9e90ffc2-07f4-4084-b09e-bee9d373e5d7"
+ ]
+ },
+ "60f8ff6c-06aa-4a3b-acb1-de1f90145878": {
+ "simStepIds": [
+ "3a18acb5-55a0-428f-9bb5-2cade38c753e"
+ ]
+ },
+ "b52e0740-466f-4999-b5e2-40f2a59be4da": {
+ "simStepIds": [
+ "1c045caa-8810-492e-97be-a8471a7605b2"
+ ]
+ },
+ "0ba0d3db-8e3b-4454-b9f9-c770676a5de6": {
+ "simStepIds": [
+ "df58fa69-47ff-45b1-9e42-a0ff6501abeb"
+ ]
+ },
+ "79140f26-f852-443c-8b81-26bafbf41a8d": {
+ "simStepIds": [
+ "433dacf5-48f5-4c8b-8bd3-2afd7b5c03ad"
+ ]
+ },
+ "61550a8c-6c85-4ec9-a9f3-dc0299c5ae3a": {
+ "simStepIds": [
+ "6b367fd7-0316-477a-89a5-b339c79ba573"
+ ]
+ }
+ },
+ "isAIGenerated": true,
+ "keywords": "packages, PackageRegistry, routers/api/packages",
+ "generationPrompt": "Integrated Package Registry",
+ "generationKeywords": "packages, PackageRegistry, routers/api/packages"
+ },
+ "System Integration via Webhooks and API": {
+ "name": "System Integration via Webhooks and API",
+ "simSteps": [
+ {
+ "simStepId": "76ada736-60f1-4b60-ac04-2a06ce0f08eb",
+ "diagramNodeId": "90e0a729-5498-4df2-bfef-c4bf7f8ab73f",
+ "simStepLabel": "API Call: Create Webhook",
+ "simStepDescription": "Gitea's API server receives a POST request to the `/api/v1/repos/{owner}/{repo}/hooks` endpoint to create a new webhook. The request body contains the webhook configuration.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "routers/api/v1/repo/hook.go",
+ "startLine": "79",
+ "endLine": "96",
+ "relevantVariables": [
+ "CreateHook",
+ "form"
+ ]
+ },
+ "inputDataExample": "{\"http_method\": \"POST\", \"path\": \"/api/v1/repos/user2/repo1/hooks\", \"body\": {\"type\": \"gitea\", \"config\": {\"url\": \"https://my-webhook-consumer.com/payload\", \"content_type\": \"json\"}, \"events\": [\"push\"], \"active\": true}}",
+ "outputDataExample": "{\"form\": {\"type\": \"gitea\", \"config\": {\"url\": \"https://my-webhook-consumer.com/payload\", \"content_type\": \"json\"}, \"events\": [\"push\"], \"active\": true}}"
+ },
+ {
+ "simStepId": "40191feb-a811-489e-a0f1-ea3d39bb00f9",
+ "diagramNodeId": "9eaf2897-e259-4e1a-a138-3e6844cec166",
+ "simStepLabel": "Data Flow: Pass Webhook Options for Creation",
+ "simStepDescription": "The parsed and validated `CreateHookOption` data is passed from the API route handler to a utility function responsible for the business logic of creating the webhook.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "routers/api/v1/repo/hook.go",
+ "startLine": "84",
+ "endLine": "84",
+ "relevantVariables": [
+ "utils.AddRepoHook"
+ ]
+ },
+ "inputDataExample": "{\"type\": \"gitea\", \"config\": {\"url\": \"https://my-webhook-consumer.com/payload\", \"content_type\": \"json\"}, \"events\": [\"push\"], \"active\": true}",
+ "outputDataExample": "{\"type\": \"gitea\", \"config\": {\"url\": \"https://my-webhook-consumer.com/payload\", \"content_type\": \"json\"}, \"events\": [\"push\"], \"active\": true}"
+ },
+ {
+ "simStepId": "7d095ef9-2d9a-46ea-bd33-04da751e319f",
+ "diagramNodeId": "4efe568d-fb0e-4b73-bca4-93d8b23def0d",
+ "simStepLabel": "Logic: Construct Webhook Object",
+ "simStepDescription": "The `addHook` function validates the provided configuration and constructs a `webhook.Webhook` model object. It processes the event types, sets the URL, content type, secret, and other metadata based on the request.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "routers/api/v1/utils/hook.go",
+ "startLine": "210",
+ "endLine": "260",
+ "relevantVariables": [
+ "addHook",
+ "w",
+ "updateHookEvents",
+ "w.UpdateEvent"
+ ]
+ },
+ "inputDataExample": "{\"form\": {\"type\": \"gitea\", \"config\": {\"url\": \"https://my-webhook-consumer.com/payload\", \"content_type\": \"json\"}, \"events\": [\"push\"], \"active\": true}, \"ownerID\": 2, \"repoID\": 1}",
+ "outputDataExample": "{\"ID\": 0, \"RepoID\": 1, \"OwnerID\": 2, \"URL\": \"https://my-webhook-consumer.com/payload\", \"ContentType\": 1, \"Secret\": \"\", \"HTTPMethod\": \"POST\", \"IsActive\": true, \"Type\": \"gitea\", \"Events\": \"{\\\"push\\\":true}\"}"
+ },
+ {
+ "simStepId": "80c189b4-7eb6-4e9c-800e-e21447dfbf72",
+ "diagramNodeId": "87906207-d798-426c-8ec4-2b2fb40919ee",
+ "simStepLabel": "Database Query: Persist Webhook",
+ "simStepDescription": "The newly constructed `webhook.Webhook` object is passed to the database layer to be inserted into the database.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "routers/api/v1/utils/hook.go",
+ "startLine": "262",
+ "endLine": "262",
+ "relevantVariables": [
+ "webhook.CreateWebhook"
+ ]
+ },
+ "inputDataExample": "{\"ID\": 0, \"RepoID\": 1, \"OwnerID\": 2, \"URL\": \"https://my-webhook-consumer.com/payload\", \"ContentType\": 1, \"Secret\": \"\", \"HTTPMethod\": \"POST\", \"IsActive\": true, \"Type\": \"gitea\", \"Events\": \"{\\\"push\\\":true}\"}",
+ "outputDataExample": "{\"ID\": 0, \"RepoID\": 1, \"OwnerID\": 2, \"URL\": \"https://my-webhook-consumer.com/payload\", \"ContentType\": 1, \"Secret\": \"\", \"HTTPMethod\": \"POST\", \"IsActive\": true, \"Type\": \"gitea\", \"Events\": \"{\\\"push\\\":true}\"}"
+ },
+ {
+ "simStepId": "6cb0b191-90e3-4ddc-93d3-61a18c507e1a",
+ "diagramNodeId": "85b318b0-fc06-4e63-96e6-549a40657642",
+ "simStepLabel": "Database: Insert Webhook Record",
+ "simStepDescription": "The `CreateWebhook` function executes an SQL INSERT statement to save the new webhook's details into the `webhook` table.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "models/webhook/webhook.go",
+ "startLine": "228",
+ "endLine": "231",
+ "relevantVariables": [
+ "CreateWebhook",
+ "db.Insert"
+ ]
+ },
+ "inputDataExample": "{\"webhookObject\": {\"ID\": 0, \"RepoID\": 1, \"OwnerID\": 2, \"URL\": \"https://my-webhook-consumer.com/payload\", \"ContentType\": 1, \"Secret\": \"\", \"HTTPMethod\": \"POST\", \"IsActive\": true, \"Type\": \"gitea\", \"Events\": \"{\\\"push\\\":true}\"}}",
+ "outputDataExample": "{\"webhookObjectWithID\": {\"ID\": 7, \"RepoID\": 1, \"OwnerID\": 2, \"URL\": \"https://my-webhook-consumer.com/payload\", \"ContentType\": 1, \"Secret\": \"\", \"HTTPMethod\": \"POST\", \"IsActive\": true, \"Type\": \"gitea\", \"Events\": \"{\\\"push\\\":true}\"}}"
+ },
+ {
+ "simStepId": "16c11187-302e-4e92-a962-44d2cd8dbffe",
+ "diagramNodeId": "bd976180-7de9-43bd-8d1e-f58f93173cf2",
+ "simStepLabel": "Data Flow: Return Created Webhook",
+ "simStepDescription": "The newly created webhook object, now with a database-assigned ID, is returned from the database layer back to the API handler.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "routers/api/v1/utils/hook.go",
+ "startLine": "266",
+ "endLine": "266",
+ "relevantVariables": [
+ "w"
+ ]
+ },
+ "inputDataExample": "{\"ID\": 7, \"RepoID\": 1, \"OwnerID\": 2, \"URL\": \"https://my-webhook-consumer.com/payload\", \"ContentType\": 1, \"Secret\": \"\", \"HTTPMethod\": \"POST\", \"IsActive\": true, \"Type\": \"gitea\", \"Events\": \"{\\\"push\\\":true}\"}",
+ "outputDataExample": "{\"ID\": 7, \"RepoID\": 1, \"OwnerID\": 2, \"URL\": \"https://my-webhook-consumer.com/payload\", \"ContentType\": 1, \"Secret\": \"\", \"HTTPMethod\": \"POST\", \"IsActive\": true, \"Type\": \"gitea\", \"Events\": \"{\\\"push\\\":true}\"}"
+ },
+ {
+ "simStepId": "907040df-6d7e-4c66-b65e-97fd1e1fb7f7",
+ "diagramNodeId": "2bba0f9c-e4a6-4a85-9395-17a890477a91",
+ "simStepLabel": "API Response: Send Created Webhook",
+ "simStepDescription": "The API handler formats the webhook data into the appropriate API structure and sends a `201 Created` response to the client, including the JSON representation of the newly created webhook.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "routers/api/v1/repo/hook.go",
+ "startLine": "90",
+ "endLine": "95",
+ "relevantVariables": [
+ "webhook_service.ToHook",
+ "ctx.JSON"
+ ]
+ },
+ "inputDataExample": "{\"ID\": 7, \"RepoID\": 1, \"OwnerID\": 2, \"URL\": \"https://my-webhook-consumer.com/payload\", \"ContentType\": 1, \"Secret\": \"\", \"HTTPMethod\": \"POST\", \"IsActive\": true, \"Type\": \"gitea\", \"Events\": \"{\\\"push\\\":true}\"}",
+ "outputDataExample": "{\"http_status\": 201, \"body\": {\"id\": 7, \"type\": \"gitea\", \"config\": {\"content_type\": \"json\", \"url\": \"https://my-webhook-consumer.com/payload\"}, \"events\": [\"push\"], \"active\": true, \"created_at\": \"...\", \"updated_at\": \"...\"}}"
+ },
+ {
+ "simStepId": "aa2b12e0-ced0-40fd-9afe-d2dafe836790",
+ "diagramNodeId": "f7d0dc25-3cff-4920-b358-54b0e1eb2285",
+ "simStepLabel": "Event Trigger: Push Event Occurs",
+ "simStepDescription": "A user pushes commits to a repository, triggering Gitea's notification system. The `PushCommits` method in the webhook notifier is called to handle this event.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/webhook/notifier.go",
+ "startLine": "643",
+ "endLine": "666",
+ "relevantVariables": [
+ "webhookNotifier.PushCommits",
+ "p"
+ ]
+ },
+ "inputDataExample": "{\"pusher\": {\"ID\": 2, \"Name\": \"user2\"}, \"repo\": {\"ID\": 1, \"Name\": \"repo1\"}, \"opts\": {\"RefFullName\": \"refs/heads/main\", \"OldCommitID\": \"...\", \"NewCommitID\": \"...\"}}",
+ "outputDataExample": "{\"Ref\":\"refs/heads/main\",\"Before\":\"...\",\"After\":\"...\",\"Commits\":[...],\"Repo\":{...},\"Pusher\":{...},\"Sender\":{...}}"
+ },
+ {
+ "simStepId": "fc5cc0e7-04a7-4a73-8467-9f7fcf4fe658",
+ "diagramNodeId": "cc057b38-3d8f-48b1-a4e6-fda341e23c20",
+ "simStepLabel": "Notification Flow: Initiate Webhook Preparation",
+ "simStepDescription": "The push event payload is passed to the `PrepareWebhooks` function, which is responsible for finding all relevant webhooks and initiating the delivery process.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "services/webhook/notifier.go",
+ "startLine": "660",
+ "endLine": "660",
+ "relevantVariables": [
+ "PrepareWebhooks"
+ ]
+ },
+ "inputDataExample": "{\"Ref\":\"refs/heads/main\",\"Before\":\"...\",\"After\":\"...\",\"Commits\":[...],\"Repo\":{...},\"Pusher\":{...},\"Sender\":{...}}",
+ "outputDataExample": "{\"Ref\":\"refs/heads/main\",\"Before\":\"...\",\"After\":\"...\",\"Commits\":[...],\"Repo\":{...},\"Pusher\":{...},\"Sender\":{...}}"
+ },
+ {
+ "simStepId": "f12258ba-b683-4b8e-ae55-f9e9cb830e91",
+ "diagramNodeId": "d58f07ab-224c-45ad-8ec0-806dac605e87",
+ "simStepLabel": "Logic: Find Matching Webhooks",
+ "simStepDescription": "The `PrepareWebhooks` function queries the database to find all active webhooks (repository, organization, and system-level) that are configured to listen for the push event.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/webhook/webhook.go",
+ "startLine": "188",
+ "endLine": "217",
+ "relevantVariables": [
+ "PrepareWebhooks",
+ "ws"
+ ]
+ },
+ "inputDataExample": "{\"source\": {\"Repository\": {\"ID\": 1, \"OwnerID\": 2}}, \"event\": \"push\", \"payload\": {\"...\"}}",
+ "outputDataExample": "[{\"ID\": 7, \"RepoID\": 1, \"OwnerID\": 2, \"URL\": \"https://my-webhook-consumer.com/payload\", \"Events\": \"{\\\"push\\\":true}\", \"IsActive\": true}]"
+ },
+ {
+ "simStepId": "deb804e2-437d-4acc-94be-43f8afbf4f0f",
+ "diagramNodeId": "139f905a-97c8-4303-855a-ccf3a7882b46",
+ "simStepLabel": "Data Flow: Process Each Webhook",
+ "simStepDescription": "For each webhook found, the system passes it along with the event payload to the `PrepareWebhook` function to create a specific delivery task.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "services/webhook/webhook.go",
+ "startLine": "219",
+ "endLine": "223",
+ "relevantVariables": [
+ "w",
+ "p"
+ ]
+ },
+ "inputDataExample": "{\"webhook\": {\"ID\": 7, \"URL\": \"...\"}, \"payload\": {\"Ref\":\"refs/heads/main\", ...}}",
+ "outputDataExample": "{\"webhook\": {\"ID\": 7, \"URL\": \"...\"}, \"payload\": {\"Ref\":\"refs/heads/main\", ...}}"
+ },
+ {
+ "simStepId": "ca8b0022-2b6d-47f3-b750-132b50943f97",
+ "diagramNodeId": "7fda5f6b-b357-4c1c-b552-45b7146b697f",
+ "simStepLabel": "Logic: Create and Enqueue Hook Task",
+ "simStepDescription": "The `PrepareWebhook` function verifies the event and branch filters. If they match, it serializes the payload and creates a `HookTask` record in the database. It then enqueues the task ID for asynchronous delivery.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/webhook/webhook.go",
+ "startLine": "129",
+ "endLine": "172",
+ "relevantVariables": [
+ "PrepareWebhook",
+ "webhook_model.CreateHookTask",
+ "enqueueHookTask"
+ ]
+ },
+ "inputDataExample": "{\"webhook\": {\"ID\": 7, \"Events\": \"{\\\"push\\\":true}\"}, \"event\": \"push\", \"payload\": {\"Ref\":\"refs/heads/main\", ...}}",
+ "outputDataExample": "{\"taskID\": 123}"
+ },
+ {
+ "simStepId": "1bea30e4-8dd5-4d87-851c-51424da5ef6b",
+ "diagramNodeId": "789df1b7-e8cc-4bf0-9a85-c2dac7c64b00",
+ "simStepLabel": "Queue: Task ID Sent to Worker Queue",
+ "simStepDescription": "The ID of the newly created `HookTask` is pushed to a background job queue, waiting for a worker to pick it up for delivery.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "services/webhook/webhook.go",
+ "startLine": "50",
+ "endLine": "53",
+ "relevantVariables": [
+ "hookQueue.Push"
+ ]
+ },
+ "inputDataExample": "{\"taskID\": 123}",
+ "outputDataExample": "{\"taskID\": 123}"
+ },
+ {
+ "simStepId": "3da3ce55-4f26-4df2-b476-405ce84c47c6",
+ "diagramNodeId": "8b1b81a8-1554-4802-b3f2-3f9e1a295792",
+ "simStepLabel": "Worker: Dequeue and Fetch Task",
+ "simStepDescription": "A background worker process dequeues the task ID and fetches the complete `HookTask` details, including the payload, from the database.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/webhook/webhook.go",
+ "startLine": "78",
+ "endLine": "99",
+ "relevantVariables": [
+ "handler",
+ "webhook_model.GetHookTaskByID",
+ "Deliver"
+ ]
+ },
+ "inputDataExample": "{\"taskID\": 123}",
+ "outputDataExample": "{\"task\": {\"ID\": 123, \"HookID\": 7, \"EventType\": \"push\", \"PayloadContent\": \"{\\\"ref\\\":...}\"}}"
+ },
+ {
+ "simStepId": "08055f7d-a4d9-4511-b553-c373069ae6aa",
+ "diagramNodeId": "58204391-3066-4cf2-8e28-579e26ce0d8a",
+ "simStepLabel": "Data Flow: Send Task to Deliverer",
+ "simStepDescription": "The retrieved `HookTask` is passed to the `Deliver` function, which handles the final step of sending the HTTP request.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "services/webhook/webhook.go",
+ "startLine": "95",
+ "endLine": "95",
+ "relevantVariables": [
+ "Deliver"
+ ]
+ },
+ "inputDataExample": "{\"task\": {\"ID\": 123, \"HookID\": 7, \"EventType\": \"push\", \"PayloadContent\": \"{\\\"ref\\\":...}\"}}",
+ "outputDataExample": "{\"task\": {\"ID\": 123, \"HookID\": 7, \"EventType\": \"push\", \"PayloadContent\": \"{\\\"ref\\\":...}\"}}"
+ },
+ {
+ "simStepId": "e8051428-7f7d-484f-a54d-402fad522be8",
+ "diagramNodeId": "78582255-93a6-4d8c-862e-6314bbb83142",
+ "simStepLabel": "Dispatcher: Prepare and Send HTTP Request",
+ "simStepDescription": "The `Deliver` function constructs the final HTTP request, including headers like `X-Gitea-Event` and a HMAC signature. It then sends this request to the webhook's configured target URL. Before sending, it marks the task as delivered to prevent duplicate dispatches.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/webhook/deliver.go",
+ "startLine": "149",
+ "endLine": "262",
+ "relevantVariables": [
+ "Deliver",
+ "newDefaultRequest",
+ "addDefaultHeaders",
+ "webhook_model.MarkTaskDelivered",
+ "webhookHTTPClient.Do"
+ ]
+ },
+ "inputDataExample": "{\"task\": {\"ID\": 123, \"HookID\": 7, \"EventType\": \"push\", \"PayloadContent\": \"{\\\"ref\\\":...}\"}}",
+ "outputDataExample": "{\"httpRequest\": {\"Method\": \"POST\", \"URL\": \"https://my-webhook-consumer.com/payload\", \"Headers\": {\"Content-Type\": \"application/json\", \"X-Gitea-Event\": \"push\", ...}, \"Body\": \"{\\\"ref\\\":...}\"}}"
+ },
+ {
+ "simStepId": "e6240b65-0ba9-4547-a519-45c09b25a567",
+ "diagramNodeId": "5c98efaf-3371-47d1-92ec-08f5f1a408d2",
+ "simStepLabel": "Network: Payload Transmitted",
+ "simStepDescription": "The serialized JSON payload is sent over the network via an HTTP request to the external service.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "services/webhook/deliver.go",
+ "startLine": "248",
+ "endLine": "248",
+ "relevantVariables": [
+ "webhookHTTPClient.Do"
+ ]
+ },
+ "inputDataExample": "{\"httpRequest\": {\"Method\": \"POST\", \"URL\": \"https://my-webhook-consumer.com/payload\", \"Headers\": {\"Content-Type\": \"application/json\", \"X-Gitea-Event\": \"push\", ...}, \"Body\": \"{\\\"ref\\\":...}\"}}",
+ "outputDataExample": "{\"httpRequest\": {\"Method\": \"POST\", \"URL\": \"https://my-webhook-consumer.com/payload\", \"Headers\": {\"Content-Type\": \"application/json\", \"X-Gitea-Event\": \"push\", ...}, \"Body\": \"{\\\"ref\\\":...}\"}}"
+ },
+ {
+ "simStepId": "93f1ca06-955c-441a-9f4d-7d515d95aeba",
+ "diagramNodeId": "1955d69c-79d0-4a14-9de3-4a9a0fadeb54",
+ "simStepLabel": "Dispatcher: Record Delivery Result",
+ "simStepDescription": "Upon receiving a response from the external service, the `Deliver` function captures the HTTP status code, response body, and headers. It updates the `HookTask` record in the database with this information and marks the delivery as successful or failed.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/webhook/deliver.go",
+ "startLine": "219",
+ "endLine": "245",
+ "relevantVariables": [
+ "t.IsSucceed",
+ "t.ResponseInfo",
+ "webhook_model.UpdateHookTask",
+ "webhook_model.UpdateWebhookLastStatus"
+ ]
+ },
+ "inputDataExample": "{\"httpResponse\": {\"StatusCode\": 200, \"Body\": \"OK\"}}",
+ "outputDataExample": "{\"updatedHookTask\": {\"ID\": 123, \"IsSucceed\": true, \"ResponseInfo\": {\"StatusCode\": 200, \"Body\": \"OK\"}}}"
+ }
+ ],
+ "description": "- Extends Gitea's functionality by integrating with external tools and services
- - Webhooks automatically send notifications about repository events (e
- g
- , push, issue creation) to specified URLs
- - Supports various payload formats for popular services like Slack, Discord, and Jenkins
- - A comprehensive REST API allows for programmatic management of repositories, users, issues, and other resources
- - Enables automation scripts and deep integration with third-party applications
",
+ "simulationNodesAndEdges": {
+ "90e0a729-5498-4df2-bfef-c4bf7f8ab73f": {
+ "simStepIds": [
+ "76ada736-60f1-4b60-ac04-2a06ce0f08eb"
+ ]
+ },
+ "4efe568d-fb0e-4b73-bca4-93d8b23def0d": {
+ "simStepIds": [
+ "7d095ef9-2d9a-46ea-bd33-04da751e319f"
+ ]
+ },
+ "85b318b0-fc06-4e63-96e6-549a40657642": {
+ "simStepIds": [
+ "6cb0b191-90e3-4ddc-93d3-61a18c507e1a"
+ ]
+ },
+ "2bba0f9c-e4a6-4a85-9395-17a890477a91": {
+ "simStepIds": [
+ "907040df-6d7e-4c66-b65e-97fd1e1fb7f7"
+ ]
+ },
+ "f7d0dc25-3cff-4920-b358-54b0e1eb2285": {
+ "simStepIds": [
+ "aa2b12e0-ced0-40fd-9afe-d2dafe836790"
+ ]
+ },
+ "d58f07ab-224c-45ad-8ec0-806dac605e87": {
+ "simStepIds": [
+ "f12258ba-b683-4b8e-ae55-f9e9cb830e91"
+ ]
+ },
+ "7fda5f6b-b357-4c1c-b552-45b7146b697f": {
+ "simStepIds": [
+ "ca8b0022-2b6d-47f3-b750-132b50943f97"
+ ]
+ },
+ "8b1b81a8-1554-4802-b3f2-3f9e1a295792": {
+ "simStepIds": [
+ "3da3ce55-4f26-4df2-b476-405ce84c47c6"
+ ]
+ },
+ "78582255-93a6-4d8c-862e-6314bbb83142": {
+ "simStepIds": [
+ "e8051428-7f7d-484f-a54d-402fad522be8"
+ ]
+ },
+ "1955d69c-79d0-4a14-9de3-4a9a0fadeb54": {
+ "simStepIds": [
+ "93f1ca06-955c-441a-9f4d-7d515d95aeba"
+ ]
+ },
+ "9eaf2897-e259-4e1a-a138-3e6844cec166": {
+ "simStepIds": [
+ "40191feb-a811-489e-a0f1-ea3d39bb00f9"
+ ]
+ },
+ "87906207-d798-426c-8ec4-2b2fb40919ee": {
+ "simStepIds": [
+ "80c189b4-7eb6-4e9c-800e-e21447dfbf72"
+ ]
+ },
+ "bd976180-7de9-43bd-8d1e-f58f93173cf2": {
+ "simStepIds": [
+ "16c11187-302e-4e92-a962-44d2cd8dbffe"
+ ]
+ },
+ "cc057b38-3d8f-48b1-a4e6-fda341e23c20": {
+ "simStepIds": [
+ "fc5cc0e7-04a7-4a73-8467-9f7fcf4fe658"
+ ]
+ },
+ "139f905a-97c8-4303-855a-ccf3a7882b46": {
+ "simStepIds": [
+ "deb804e2-437d-4acc-94be-43f8afbf4f0f"
+ ]
+ },
+ "789df1b7-e8cc-4bf0-9a85-c2dac7c64b00": {
+ "simStepIds": [
+ "1bea30e4-8dd5-4d87-851c-51424da5ef6b"
+ ]
+ },
+ "58204391-3066-4cf2-8e28-579e26ce0d8a": {
+ "simStepIds": [
+ "08055f7d-a4d9-4511-b553-c373069ae6aa"
+ ]
+ },
+ "5c98efaf-3371-47d1-92ec-08f5f1a408d2": {
+ "simStepIds": [
+ "e6240b65-0ba9-4547-a519-45c09b25a567"
+ ]
+ }
+ },
+ "isAIGenerated": true,
+ "keywords": "Webhook, CreateHookTask, routers/api/v1",
+ "generationPrompt": "System Integration via Webhooks and API",
+ "generationKeywords": "Webhook, CreateHookTask, routers/api/v1"
+ },
+ "Flexible Authentication and Authorization": {
+ "name": "Flexible Authentication and Authorization",
+ "simSteps": [
+ {
+ "simStepId": "de460200-3fc3-4ce4-85dd-55f7a1a902e0",
+ "diagramNodeId": "df68b70e-609b-4e46-bd13-b2789a256937",
+ "simStepLabel": "Handle Login Request",
+ "simStepDescription": "The Gitea web server receives the user's login credentials from the login form. The `SignInPost` function is the entry point for handling this request and calls the authentication service.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "routers/web/auth/auth.go",
+ "startLine": "108",
+ "endLine": "119",
+ "relevantVariables": [
+ "SignInPost",
+ "form",
+ "auth_service.UserSignIn"
+ ]
+ },
+ "inputDataExample": "{\"form_data\": {\"user_name\": \"ldap_user\", \"password\": \"ldap_password123\", \"_csrf\": \"_csrf_token_string\"}}",
+ "outputDataExample": "{\"authenticated_user_id\": 15, \"session_id\": \"e9a1b2c3d4e5f6a7\"}"
+ },
+ {
+ "simStepId": "239f8b69-e2d2-4da7-b3b3-3e2ceef5c2ac",
+ "diagramNodeId": "7550ab04-4827-4480-813b-04b0047c3f97",
+ "simStepLabel": "Call Authentication Service",
+ "simStepDescription": "The web handler calls the core `UserSignIn` function, passing the username and password to start the authentication process.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "routers/web/auth/auth.go",
+ "startLine": "119",
+ "endLine": "119",
+ "relevantVariables": [
+ "auth_service.UserSignIn"
+ ]
+ },
+ "inputDataExample": "{\"username\": \"ldap_user\", \"password\": \"ldap_password123\"}",
+ "outputDataExample": "{\"username\": \"ldap_user\", \"password\": \"ldap_password123\"}"
+ },
+ {
+ "simStepId": "660ca44b-c08d-42e4-a28a-58caf0b6d6ab",
+ "diagramNodeId": "9a31a054-afe3-4108-a222-e00c6711d764",
+ "simStepLabel": "User Sign-In Orchestration",
+ "simStepDescription": "The `UserSignIn` function first attempts to find the user in the local database. If the user does not exist or is linked to an external source, it iterates through all active authentication sources to find one that can authenticate the user.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/auth/signin.go",
+ "startLine": "28",
+ "endLine": "87",
+ "relevantVariables": [
+ "UserSignIn",
+ "sources",
+ "source.Authenticate"
+ ]
+ },
+ "inputDataExample": "{\"username\": \"ldap_user\", \"password\": \"ldap_password123\"}",
+ "outputDataExample": "{\"user\": {\"id\": 15, \"login_name\": \"ldap_user\"}, \"auth_source\": {\"id\": 2, \"type\": 2, \"name\": \"Corporate LDAP\"}}"
+ },
+ {
+ "simStepId": "57392fc2-e13c-4477-8980-4443ef60742e",
+ "diagramNodeId": "8d11a7b1-41ba-4b05-892c-c1581a535365",
+ "simStepLabel": "Delegate to LDAP Authenticator",
+ "simStepDescription": "The orchestrator finds an active LDAP source and calls its `Authenticate` method, passing the user's credentials.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "services/auth/signin.go",
+ "startLine": "87",
+ "endLine": "87",
+ "relevantVariables": [
+ "source.Authenticate"
+ ]
+ },
+ "inputDataExample": "{\"user\": null, \"userName\": \"ldap_user\", \"password\": \"ldap_password123\"}",
+ "outputDataExample": "{\"user\": null, \"userName\": \"ldap_user\", \"password\": \"ldap_password123\"}"
+ },
+ {
+ "simStepId": "a3a212e6-29d1-423c-aec2-e2bf5dc80756",
+ "diagramNodeId": "287f8218-823c-459c-8071-e71192fc9048",
+ "simStepLabel": "LDAP Authenticate & Search Entry",
+ "simStepDescription": "The `Authenticate` method for the LDAP source is called. It immediately calls the `SearchEntry` function to perform the actual connection, binding, and searching against the LDAP server.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/auth/source/ldap/source_authenticate.go",
+ "startLine": "24",
+ "endLine": "32",
+ "relevantVariables": [
+ "Authenticate",
+ "source.SearchEntry"
+ ]
+ },
+ "inputDataExample": "{\"userName\": \"ldap_user\", \"password\": \"ldap_password123\"}",
+ "outputDataExample": "{\"SearchResult\": {\"Username\": \"ldap_user\", \"Mail\": \"ldap_user@example.com\", \"IsAdmin\": false}}"
+ },
+ {
+ "simStepId": "633c6f49-102e-4305-8433-7a69053a1f09",
+ "diagramNodeId": "7a2c7f85-74cf-40f2-b9a6-10d85ac527df",
+ "simStepLabel": "Initiate LDAP Connection",
+ "simStepDescription": "The `SearchEntry` function begins by calling `dial` to establish a network connection to the configured LDAP server.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "services/auth/source/ldap/source_search.go",
+ "startLine": "266",
+ "endLine": "266",
+ "relevantVariables": [
+ "dial"
+ ]
+ },
+ "inputDataExample": "{\"sourceConfig\": {\"Host\": \"ldap.example.com\", \"Port\": 636, \"SecurityProtocol\": 1}}",
+ "outputDataExample": "{\"sourceConfig\": {\"Host\": \"ldap.example.com\", \"Port\": 636, \"SecurityProtocol\": 1}}"
+ },
+ {
+ "simStepId": "ce938895-5d2d-4137-8207-18ec5a5454e6",
+ "diagramNodeId": "d0979ef4-d3ac-4772-9d30-df7852f72044",
+ "simStepLabel": "Establish Connection to LDAP Server",
+ "simStepDescription": "The `dial` function creates a TCP connection to the LDAP server. Based on the `SecurityProtocol` configuration, it may use `ldap.DialTLS` for LDAPS or upgrade an unencrypted connection using `conn.StartTLS` for StartTLS.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/auth/source/ldap/source_search.go",
+ "startLine": "107",
+ "endLine": "132",
+ "relevantVariables": [
+ "dial",
+ "ldap.DialTLS",
+ "ldap.Dial",
+ "conn.StartTLS"
+ ]
+ },
+ "inputDataExample": "{\"sourceConfig\": {\"Host\": \"ldap.example.com\", \"Port\": 636, \"SecurityProtocol\": 1, \"SkipVerify\": true}}",
+ "outputDataExample": "{\"ldap_connection_object\": {}}"
+ },
+ {
+ "simStepId": "89a427cc-153d-4b8a-8e5f-e983710a2751",
+ "diagramNodeId": "9480a9ba-eeb9-4aad-85a3-aa830b1e46dc",
+ "simStepLabel": "Bind with Service Account (BindDN)",
+ "simStepDescription": "To search for the user, `SearchEntry` first authenticates with the LDAP server using the configured `BindDN` and `BindPassword` (service account).",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "services/auth/source/ldap/source_search.go",
+ "startLine": "307",
+ "endLine": "307",
+ "relevantVariables": [
+ "l.Bind"
+ ]
+ },
+ "inputDataExample": "{\"bind_dn\": \"cn=readonly,dc=example,dc=com\", \"bind_password\": \"a_very_secret_password\"}",
+ "outputDataExample": "{\"bind_dn\": \"cn=readonly,dc=example,dc=com\", \"bind_password\": \"a_very_secret_password\"}"
+ },
+ {
+ "simStepId": "76cd35ae-8050-4987-9381-32c9fde784e4",
+ "diagramNodeId": "00c27c1f-26a0-425b-9adc-f2f5af2d6262",
+ "simStepLabel": "Search for User's Distinguished Name (DN)",
+ "simStepDescription": "After successfully binding with the service account, the `findUserDN` function is called. It uses the `UserFilter` (e.g., `(&(objectClass=posixAccount)(uid=%s))`) and `UserBase` to search for the specific user entry and retrieve their DN.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/auth/source/ldap/source_search.go",
+ "startLine": "77",
+ "endLine": "105",
+ "relevantVariables": [
+ "findUserDN",
+ "sanitizedUserQuery",
+ "ldap.NewSearchRequest",
+ "l.Search"
+ ]
+ },
+ "inputDataExample": "{\"username\": \"ldap_user\"}",
+ "outputDataExample": "{\"userDN\": \"uid=ldap_user,ou=Users,dc=example,dc=com\", \"found\": true}"
+ },
+ {
+ "simStepId": "cb0c2053-812b-4828-b712-5b39c702a738",
+ "diagramNodeId": "c1ce39a1-0844-41af-b3b5-42105f03de44",
+ "simStepLabel": "Authenticate with User Credentials",
+ "simStepDescription": "With the user's DN found, `SearchEntry` calls `bindUser` again to perform a BIND operation using the user's DN and the password they provided. This validates their credentials.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "services/auth/source/ldap/source_search.go",
+ "startLine": "326",
+ "endLine": "326",
+ "relevantVariables": [
+ "bindUser"
+ ]
+ },
+ "inputDataExample": "{\"userDN\": \"uid=ldap_user,ou=Users,dc=example,dc=com\", \"password\": \"ldap_password123\"}",
+ "outputDataExample": "{\"userDN\": \"uid=ldap_user,ou=Users,dc=example,dc=com\", \"password\": \"ldap_password123\"}"
+ },
+ {
+ "simStepId": "2baf8794-62c5-44b8-a564-f3193c532ccd",
+ "diagramNodeId": "853993e9-8e61-43c9-bdbc-ad0fc3191f57",
+ "simStepLabel": "Fetch User Attributes from LDAP",
+ "simStepDescription": "Upon successful authentication, `SearchEntry` performs a final LDAP search to fetch the user's attributes, such as `givenName`, `sn`, `mail`, and `sshPublicKey`. It also checks if the user matches the `AdminFilter`.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/auth/source/ldap/source_search.go",
+ "startLine": "340",
+ "endLine": "414",
+ "relevantVariables": [
+ "l.Search",
+ "checkAdmin",
+ "sr.Entries[0].GetAttributeValue"
+ ]
+ },
+ "inputDataExample": "{\"userDN\": \"uid=ldap_user,ou=Users,dc=example,dc=com\"}",
+ "outputDataExample": "{\"SearchResult\": {\"Username\": \"ldap_user\", \"Name\": \"LdapFirstName\", \"Surname\": \"UserLastName\", \"Mail\": \"ldap_user@example.com\", \"SSHPublicKey\": [\"ssh-rsa AAAA... key_comment\"], \"IsAdmin\": false}}"
+ },
+ {
+ "simStepId": "9957a28c-8e0c-4530-94a5-136e7aaa1130",
+ "diagramNodeId": "98842aae-5f17-4c78-810f-775eb06c4e94",
+ "simStepLabel": "Return Populated User Data",
+ "simStepDescription": "The `SearchResult` struct, now populated with the user's details from LDAP, is returned from `SearchEntry` back to the `Authenticate` method.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "services/auth/source/ldap/source_search.go",
+ "startLine": "414",
+ "endLine": "414",
+ "relevantVariables": [
+ "SearchResult"
+ ]
+ },
+ "inputDataExample": "{\"SearchResult\": {\"Username\": \"ldap_user\", \"Name\": \"LdapFirstName\", \"Surname\": \"UserLastName\", \"Mail\": \"ldap_user@example.com\", \"SSHPublicKey\": [\"ssh-rsa AAAA... key_comment\"], \"IsAdmin\": false}}",
+ "outputDataExample": "{\"SearchResult\": {\"Username\": \"ldap_user\", \"Name\": \"LdapFirstName\", \"Surname\": \"UserLastName\", \"Mail\": \"ldap_user@example.com\", \"SSHPublicKey\": [\"ssh-rsa AAAA... key_comment\"], \"IsAdmin\": false}}"
+ },
+ {
+ "simStepId": "afbb7d9a-0643-4796-8ca2-8fe72357bc0e",
+ "diagramNodeId": "ef8eb7fc-c748-4b9c-8470-320a6a13cb97",
+ "simStepLabel": "Provision or Update Gitea User",
+ "simStepDescription": "The `Authenticate` method checks if the user exists in Gitea. If not, it creates a new user with the details from the `SearchResult`. If the user exists, it updates their profile information, admin status, and synchronizes SSH keys. An `ExternalLoginUser` record is created or updated to link the Gitea account to the LDAP identity.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/auth/source/ldap/source_authenticate.go",
+ "startLine": "50",
+ "endLine": "169",
+ "relevantVariables": [
+ "user_service.CreateUser",
+ "user_service.UpdateUser",
+ "source_service.EnsureLinkExternalToUser",
+ "asymkey_service.SyncPublicKeys"
+ ]
+ },
+ "inputDataExample": "{\"SearchResult\": {\"Username\": \"ldap_user\", \"Mail\": \"ldap_user@example.com\", \"IsAdmin\": false}}",
+ "outputDataExample": "{\"user_model.User\": {\"ID\": 15, \"Name\": \"ldap_user\", \"Email\": \"ldap_user@example.com\", \"IsAdmin\": false, \"LoginSource\": 2}}"
+ },
+ {
+ "simStepId": "35ca6447-1574-4dbb-b6b7-5dc9f0d4abca",
+ "diagramNodeId": "f8ce50e7-326c-495a-8afa-5052ad817766",
+ "simStepLabel": "Return Authenticated User Object",
+ "simStepDescription": "The fully authenticated and provisioned user object is returned up the call stack to the `SignInPost` web handler.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "services/auth/source/ldap/source_authenticate.go",
+ "startLine": "172",
+ "endLine": "172",
+ "relevantVariables": [
+ "user"
+ ]
+ },
+ "inputDataExample": "{\"user_model.User\": {\"ID\": 15, \"Name\": \"ldap_user\", \"Email\": \"ldap_user@example.com\", \"IsAdmin\": false, \"LoginSource\": 2}}",
+ "outputDataExample": "{\"user_model.User\": {\"ID\": 15, \"Name\": \"ldap_user\", \"Email\": \"ldap_user@example.com\", \"IsAdmin\": false, \"LoginSource\": 2}}"
+ },
+ {
+ "simStepId": "0af9a86b-2996-4b9e-8e2b-1904f42e63ac",
+ "diagramNodeId": "a7b7c2b5-0068-46f0-b82c-1eacee946cdb",
+ "simStepLabel": "Create Web Session",
+ "simStepDescription": "The `SignInPost` web handler receives the authenticated user object, creates a new session, sets the session cookie in the user's browser, and redirects them to the dashboard.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "routers/web/auth/auth.go",
+ "startLine": "157",
+ "endLine": "192",
+ "relevantVariables": [
+ "handleSignIn",
+ "session.Set",
+ "ctx.Redirect"
+ ]
+ },
+ "inputDataExample": "{\"user_model.User\": {\"ID\": 15, \"Name\": \"ldap_user\"}}",
+ "outputDataExample": "{\"session_data\": {\"uid\": 15, \"uname\": \"ldap_user\"}}"
+ }
+ ],
+ "description": "- Provides secure and versatile user authentication for different environments
- - Supports local database authentication as well as external sources like LDAP, SMTP, and OAuth2 providers (GitHub, Google, etc
- )
- - Enhances security with support for Two-Factor Authentication (2FA)
- - Manages user access through personal access tokens and SSH keys for Git operations and API calls
- - Administrators can manage users, organizations, and system-wide settings from a dedicated admin panel
",
+ "simulationNodesAndEdges": {
+ "df68b70e-609b-4e46-bd13-b2789a256937": {
+ "simStepIds": [
+ "de460200-3fc3-4ce4-85dd-55f7a1a902e0"
+ ]
+ },
+ "9a31a054-afe3-4108-a222-e00c6711d764": {
+ "simStepIds": [
+ "660ca44b-c08d-42e4-a28a-58caf0b6d6ab"
+ ]
+ },
+ "287f8218-823c-459c-8071-e71192fc9048": {
+ "simStepIds": [
+ "a3a212e6-29d1-423c-aec2-e2bf5dc80756"
+ ]
+ },
+ "d0979ef4-d3ac-4772-9d30-df7852f72044": {
+ "simStepIds": [
+ "ce938895-5d2d-4137-8207-18ec5a5454e6"
+ ]
+ },
+ "00c27c1f-26a0-425b-9adc-f2f5af2d6262": {
+ "simStepIds": [
+ "76cd35ae-8050-4987-9381-32c9fde784e4"
+ ]
+ },
+ "853993e9-8e61-43c9-bdbc-ad0fc3191f57": {
+ "simStepIds": [
+ "2baf8794-62c5-44b8-a564-f3193c532ccd"
+ ]
+ },
+ "ef8eb7fc-c748-4b9c-8470-320a6a13cb97": {
+ "simStepIds": [
+ "afbb7d9a-0643-4796-8ca2-8fe72357bc0e"
+ ]
+ },
+ "a7b7c2b5-0068-46f0-b82c-1eacee946cdb": {
+ "simStepIds": [
+ "0af9a86b-2996-4b9e-8e2b-1904f42e63ac"
+ ]
+ },
+ "7550ab04-4827-4480-813b-04b0047c3f97": {
+ "simStepIds": [
+ "239f8b69-e2d2-4da7-b3b3-3e2ceef5c2ac"
+ ]
+ },
+ "8d11a7b1-41ba-4b05-892c-c1581a535365": {
+ "simStepIds": [
+ "57392fc2-e13c-4477-8980-4443ef60742e"
+ ]
+ },
+ "7a2c7f85-74cf-40f2-b9a6-10d85ac527df": {
+ "simStepIds": [
+ "633c6f49-102e-4305-8433-7a69053a1f09"
+ ]
+ },
+ "9480a9ba-eeb9-4aad-85a3-aa830b1e46dc": {
+ "simStepIds": [
+ "89a427cc-153d-4b8a-8e5f-e983710a2751"
+ ]
+ },
+ "c1ce39a1-0844-41af-b3b5-42105f03de44": {
+ "simStepIds": [
+ "cb0c2053-812b-4828-b712-5b39c702a738"
+ ]
+ },
+ "98842aae-5f17-4c78-810f-775eb06c4e94": {
+ "simStepIds": [
+ "9957a28c-8e0c-4530-94a5-136e7aaa1130"
+ ]
+ },
+ "f8ce50e7-326c-495a-8afa-5052ad817766": {
+ "simStepIds": [
+ "35ca6447-1574-4dbb-b6b7-5dc9f0d4abca"
+ ]
+ }
+ },
+ "isAIGenerated": true,
+ "keywords": "LoginSource, services/auth/source, LDAP",
+ "generationPrompt": "Flexible Authentication and Authorization",
+ "generationKeywords": "LoginSource, services/auth/source, LDAP"
+ },
+ "Repository Forking and Mirroring": {
+ "name": "Repository Forking and Mirroring",
+ "simSteps": [
+ {
+ "simStepId": "db85ab4c-6720-4017-bf0f-aaba20353724",
+ "diagramNodeId": "b27685e7-6df0-4c06-a0b1-00beb27c86c3",
+ "simStepLabel": "Flow: Repository Forking - API: Receive Fork Request",
+ "simStepDescription": "The API endpoint `/repos/{owner}/{repo}/forks` receives a POST request to fork a repository. It validates the user's permissions, parses the request payload for optional new owner or name, and prepares to call the forking service.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "routers/api/v1/repo/fork.go",
+ "startLine": "151",
+ "endLine": "159",
+ "relevantVariables": [
+ "form",
+ "forker",
+ "repo",
+ "repo_service.ForkRepository",
+ "repo_service.ForkRepoOptions"
+ ]
+ },
+ "inputDataExample": "{\"url\": \"/api/v1/repos/user2/repo1/forks\", \"method\": \"POST\", \"body\": {\"organization\": \"user4\", \"name\": \"my-fork\"}}",
+ "outputDataExample": "{\"BaseRepo\": {\"ID\": 1, \"OwnerName\": \"user2\", \"Name\": \"repo1\"}, \"Owner\": {\"ID\": 4, \"Name\": \"user4\"}, \"Name\": \"my-fork\", \"Description\": \"Original repo description\"}"
+ },
+ {
+ "simStepId": "93cbc173-2cab-414f-b3d6-f0ea878c93c3",
+ "diagramNodeId": "0d0951da-962a-47bf-aaf1-da7ba73163d8",
+ "simStepLabel": "Flow: Repository Forking - API Call: Invoke ForkRepository Service",
+ "simStepDescription": "The API handler calls the `ForkRepository` function in the repository service layer, passing a `ForkRepoOptions` struct containing all necessary information like the base repository, the new owner, and the new repository name.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "routers/api/v1/repo/fork.go",
+ "startLine": "155",
+ "endLine": "159",
+ "relevantVariables": [
+ "repo_service.ForkRepository"
+ ]
+ },
+ "inputDataExample": "{\"BaseRepo\": {\"ID\": 1, \"OwnerName\": \"user2\", \"Name\": \"repo1\"}, \"Name\": \"my-fork\", \"Description\": \"Original repo description\"}",
+ "outputDataExample": "{\"BaseRepo\": {\"ID\": 1, \"OwnerName\": \"user2\", \"Name\": \"repo1\"}, \"Name\": \"my-fork\", \"Description\": \"Original repo description\"}"
+ },
+ {
+ "simStepId": "11f9bf8c-700e-46aa-864c-c8d401074487",
+ "diagramNodeId": "914714c3-26ca-4e05-87fb-5ba226f7e4c3",
+ "simStepLabel": "Flow: Repository Forking - Service: Execute Core Fork Logic",
+ "simStepDescription": "The `ForkRepository` service function orchestrates the forking process. It performs critical checks (e.g., if a fork already exists, repository creation limits), creates a new repository record in the database, clones the git data from the base repository to the new one, and updates the fork count on the original repository.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/repository/fork.go",
+ "startLine": "58",
+ "endLine": "210",
+ "relevantVariables": [
+ "ForkRepository",
+ "opts",
+ "repo_model.CreateRepository",
+ "git.Clone",
+ "repo_model.IncrementRepoForkNum"
+ ]
+ },
+ "inputDataExample": "{\"BaseRepo\": {\"ID\": 1, \"OwnerName\": \"user2\", \"Name\": \"repo1\"}, \"Name\": \"my-fork\", \"Description\": \"Original repo description\"}",
+ "outputDataExample": "{\"ID\": 123, \"OwnerID\": 4, \"OwnerName\": \"user4\", \"Name\": \"my-fork\", \"IsFork\": true, \"ForkID\": 1}"
+ },
+ {
+ "simStepId": "512e90f0-0392-437f-99f2-49d7e291d597",
+ "diagramNodeId": "9413f317-6cff-4edf-acc6-f2cf0ba9b669",
+ "simStepLabel": "Flow: Repository Forking - Event Dispatch: Trigger Notifications",
+ "simStepDescription": "After the repository is successfully created and the git data is cloned, the `ForkRepository` function calls the notification service to broadcast the `fork` event to other parts of the application.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "services/repository/fork.go",
+ "startLine": "206",
+ "endLine": "206",
+ "relevantVariables": [
+ "notify_service.ForkRepository"
+ ]
+ },
+ "inputDataExample": "{\"doer\": {\"ID\": 2, \"Name\": \"user2\"}, \"oldRepo\": {\"ID\": 1, \"Name\": \"repo1\"}, \"repo\": {\"ID\": 123, \"Name\": \"my-fork\"}}",
+ "outputDataExample": "{\"doer\": {\"ID\": 2, \"Name\": \"user2\"}, \"oldRepo\": {\"ID\": 1, \"Name\": \"repo1\"}, \"repo\": {\"ID\": 123, \"Name\": \"my-fork\"}}"
+ },
+ {
+ "simStepId": "ddb168e8-da57-418a-82f2-28b2b22dae09",
+ "diagramNodeId": "b7a0a93a-d46e-473a-a07f-7da223c55a95",
+ "simStepLabel": "Flow: Repository Forking - Notification Hub: Process Fork Event",
+ "simStepDescription": "The central notification service receives the fork event and iterates through all registered notifiers (e.g., for webhooks, actions, activity feeds), calling the `ForkRepository` method on each one.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/notify/notify.go",
+ "startLine": "311",
+ "endLine": "315",
+ "relevantVariables": [
+ "ForkRepository",
+ "notifiers"
+ ]
+ },
+ "inputDataExample": "{\"doer\": {\"ID\": 2, \"Name\": \"user2\"}, \"oldRepo\": {\"ID\": 1, \"Name\": \"repo1\"}, \"repo\": {\"ID\": 123, \"Name\": \"my-fork\"}}",
+ "outputDataExample": "{\"doer\": {\"ID\": 2, \"Name\": \"user2\"}, \"oldRepo\": {\"ID\": 1, \"Name\": \"repo1\"}, \"repo\": {\"ID\": 123, \"Name\": \"my-fork\"}}"
+ },
+ {
+ "simStepId": "4fd9e36f-4d1d-4083-a6ed-8184c7eefa94",
+ "diagramNodeId": "6fa84983-5d43-48e3-a028-9729688c1a00",
+ "simStepLabel": "Flow: Repository Forking - Fan-out: Send to Webhook Notifier",
+ "simStepDescription": "The notification hub dispatches the event details to the webhook notifier, which is responsible for handling webhook-specific logic.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "services/notify/notify.go",
+ "startLine": "312",
+ "endLine": "314",
+ "relevantVariables": [
+ "notifier.ForkRepository"
+ ]
+ },
+ "inputDataExample": "{\"doer\": {\"ID\": 2, \"Name\": \"user2\"}, \"oldRepo\": {\"ID\": 1, \"Name\": \"repo1\"}, \"repo\": {\"ID\": 123, \"Name\": \"my-fork\"}}",
+ "outputDataExample": "{\"doer\": {\"ID\": 2, \"Name\": \"user2\"}, \"oldRepo\": {\"ID\": 1, \"Name\": \"repo1\"}, \"repo\": {\"ID\": 123, \"Name\": \"my-fork\"}}"
+ },
+ {
+ "simStepId": "24889f3c-0f56-4418-9dce-63d75388b45d",
+ "diagramNodeId": "417f8e37-4b9a-4ef5-997d-c88421fb0ec2",
+ "simStepLabel": "Flow: Repository Forking - Webhook: Prepare and Send Payload",
+ "simStepDescription": "The webhook notifier constructs a JSON payload for the `fork` event, containing information about the original repository (forkee), the new forked repository, and the user who performed the action. It then sends this payload to all webhooks configured for the original repository.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/webhook/notifier.go",
+ "startLine": "85",
+ "endLine": "94",
+ "relevantVariables": [
+ "ForkRepository",
+ "PrepareWebhooks",
+ "api.ForkPayload"
+ ]
+ },
+ "inputDataExample": "{\"doer\": {\"ID\": 2, \"Name\": \"user2\"}, \"oldRepo\": {\"ID\": 1, \"Name\": \"repo1\"}, \"repo\": {\"ID\": 123, \"Name\": \"my-fork\"}}",
+ "outputDataExample": "{\"forkee\": {\"id\": 1, \"owner\": {\"login\": \"user2\"}, \"full_name\": \"user2/repo1\"}, \"repository\": {\"id\": 123, \"owner\": {\"login\": \"user4\"}, \"full_name\": \"user4/my-fork\"}, \"sender\": {\"id\": 2, \"login\": \"user2\"}}"
+ },
+ {
+ "simStepId": "e70de2fd-29c5-4cb6-813c-264a2a622b2d",
+ "diagramNodeId": "9e7ba7fa-caa3-41e2-ac5f-373890d534ab",
+ "simStepLabel": "Flow: Repository Mirroring - Cron: Scheduled Mirror Sync Trigger",
+ "simStepDescription": "A cron task named 'update_mirrors' is registered to run periodically (e.g., every 10 minutes). When the scheduler triggers this task, it initiates the process of updating all mirrored repositories in the system.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/cron/tasks_basic.go",
+ "startLine": "25",
+ "endLine": "43",
+ "relevantVariables": [
+ "registerUpdateMirrorTask",
+ "RegisterTaskFatal",
+ "mirror_service.Update"
+ ]
+ },
+ "inputDataExample": "{\"taskName\": \"update_mirrors\", \"schedule\": \"@every 10m\", \"runAtStart\": false}",
+ "outputDataExample": "{\"pullLimit\": 50, \"pushLimit\": 50}"
+ },
+ {
+ "simStepId": "aba987db-5d57-4f81-a947-2f3e9df1cb98",
+ "diagramNodeId": "993d56ee-fde7-459d-963c-783f748e62d9",
+ "simStepLabel": "Flow: Repository Mirroring - Cron Call: Invoke Mirror Update Service",
+ "simStepDescription": "The cron scheduler invokes the `mirror_service.Update` function, passing configured limits for how many pull and push mirrors to process in this run.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "services/cron/tasks_basic.go",
+ "startLine": "41",
+ "endLine": "41",
+ "relevantVariables": [
+ "mirror_service.Update"
+ ]
+ },
+ "inputDataExample": "{\"pullLimit\": 50, \"pushLimit\": 50}",
+ "outputDataExample": "{\"pullLimit\": 50, \"pushLimit\": 50}"
+ },
+ {
+ "simStepId": "f00d42da-34d8-4564-a701-73b37241bc1e",
+ "diagramNodeId": "43d0c4c2-5f6a-46e7-b1f1-c8859c97ab4f",
+ "simStepLabel": "Flow: Repository Mirroring - Service: Enqueue Mirrors for Sync",
+ "simStepDescription": "The mirror service queries the database for pull and push mirrors that are due for an update based on their last sync time and interval. It then adds the IDs of these repositories to a background processing queue.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/mirror/mirror.go",
+ "startLine": "31",
+ "endLine": "73",
+ "relevantVariables": [
+ "Update",
+ "repo_model.MirrorsWithLestUpdate",
+ "AddPullMirrorToQueue",
+ "AddPushMirrorToQueue"
+ ]
+ },
+ "inputDataExample": "{\"pullLimit\": 50, \"pushLimit\": 50}",
+ "outputDataExample": "{\"queuedPullMirrors\": [5, 12], \"queuedPushMirrors\": [8]}"
+ },
+ {
+ "simStepId": "fad04734-cb78-4c64-aae2-84c8eadf98fc",
+ "diagramNodeId": "276130b8-05bb-4961-9852-c0084d6c73c2",
+ "simStepLabel": "Flow: Repository Mirroring - Queue: Data to Background Worker",
+ "simStepDescription": "The ID of a specific mirror repository is pushed to a persistent queue, making it available for an asynchronous background worker to process without blocking the main scheduler.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "services/mirror/queue.go",
+ "startLine": "21",
+ "endLine": "27",
+ "relevantVariables": [
+ "AddPullMirrorToQueue",
+ "queues.GetManager().GetQueue(...).Push"
+ ]
+ },
+ "inputDataExample": "{\"repoID\": 5}",
+ "outputDataExample": "{\"repoID\": 5}"
+ },
+ {
+ "simStepId": "1d09c452-183e-4857-aef6-9f0e66f0224a",
+ "diagramNodeId": "ae6f102c-562a-4665-b562-b86cc0aac8d1",
+ "simStepLabel": "Flow: Repository Mirroring - Worker: Execute Pull Mirror Sync",
+ "simStepDescription": "A background worker picks a repository ID from the queue and calls `SyncPullMirror`. This function performs the core sync logic: it runs `git remote update` to fetch all changes from the upstream repository, updates all local branches and tags, and syncs associated data like LFS objects and releases.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/mirror/mirror_pull.go",
+ "startLine": "36",
+ "endLine": "173",
+ "relevantVariables": [
+ "SyncPullMirror",
+ "gitrepo.RemoteUpdate",
+ "syncReleasesWithTags",
+ "lfs.Sync"
+ ]
+ },
+ "inputDataExample": "{\"repoID\": 5}",
+ "outputDataExample": "{\"success\": true, \"repoID\": 5, \"message\": \"Mirror synced successfully\"}"
+ }
+ ],
+ "description": "- Enables distributed workflows and synchronization with external repositories
- - Users can create a personal copy (fork) of a repository to work on changes independently
- - Contributions from forks can be proposed back to the original repository via Pull Requests
- - Supports creating read-only pull mirrors to keep a local copy of an external repository in sync
- - Allows creating push mirrors to automatically push changes from a Gitea repository to an external one
",
+ "simulationNodesAndEdges": {
+ "b27685e7-6df0-4c06-a0b1-00beb27c86c3": {
+ "simStepIds": [
+ "db85ab4c-6720-4017-bf0f-aaba20353724"
+ ]
+ },
+ "914714c3-26ca-4e05-87fb-5ba226f7e4c3": {
+ "simStepIds": [
+ "11f9bf8c-700e-46aa-864c-c8d401074487"
+ ]
+ },
+ "b7a0a93a-d46e-473a-a07f-7da223c55a95": {
+ "simStepIds": [
+ "ddb168e8-da57-418a-82f2-28b2b22dae09"
+ ]
+ },
+ "417f8e37-4b9a-4ef5-997d-c88421fb0ec2": {
+ "simStepIds": [
+ "24889f3c-0f56-4418-9dce-63d75388b45d"
+ ]
+ },
+ "9e7ba7fa-caa3-41e2-ac5f-373890d534ab": {
+ "simStepIds": [
+ "e70de2fd-29c5-4cb6-813c-264a2a622b2d"
+ ]
+ },
+ "43d0c4c2-5f6a-46e7-b1f1-c8859c97ab4f": {
+ "simStepIds": [
+ "f00d42da-34d8-4564-a701-73b37241bc1e"
+ ]
+ },
+ "ae6f102c-562a-4665-b562-b86cc0aac8d1": {
+ "simStepIds": [
+ "1d09c452-183e-4857-aef6-9f0e66f0224a"
+ ]
+ },
+ "0d0951da-962a-47bf-aaf1-da7ba73163d8": {
+ "simStepIds": [
+ "93cbc173-2cab-414f-b3d6-f0ea878c93c3"
+ ]
+ },
+ "9413f317-6cff-4edf-acc6-f2cf0ba9b669": {
+ "simStepIds": [
+ "512e90f0-0392-437f-99f2-49d7e291d597"
+ ]
+ },
+ "6fa84983-5d43-48e3-a028-9729688c1a00": {
+ "simStepIds": [
+ "4fd9e36f-4d1d-4083-a6ed-8184c7eefa94"
+ ]
+ },
+ "993d56ee-fde7-459d-963c-783f748e62d9": {
+ "simStepIds": [
+ "aba987db-5d57-4f81-a947-2f3e9df1cb98"
+ ]
+ },
+ "276130b8-05bb-4961-9852-c0084d6c73c2": {
+ "simStepIds": [
+ "fad04734-cb78-4c64-aae2-84c8eadf98fc"
+ ]
+ }
+ },
+ "isAIGenerated": true,
+ "keywords": "ForkRepository, services/mirror, models/repo/mirror.go",
+ "generationPrompt": "Repository Forking and Mirroring",
+ "generationKeywords": "ForkRepository, services/mirror, models/repo/mirror.go"
+ },
+ "Project Documentation and Software Releases": {
+ "name": "Project Documentation and Software Releases",
+ "simSteps": [
+ {
+ "simStepId": "90a80659-4a4f-4034-aab4-d0bfbc1febb4",
+ "diagramNodeId": "a6a31b25-0e4c-4044-8c56-1a79bf2ab773",
+ "simStepLabel": "Wiki: View Wiki Page",
+ "simStepDescription": "A user navigates to a repository's wiki. The backend router maps the request to the `Wiki` handler. The handler checks if the wiki exists, fetches the specific page's content from the wiki's Git repository, renders it from Markdown to HTML, and serves the `repo/wiki/view` template.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "routers/web/repo/wiki.go",
+ "startLine": "450",
+ "endLine": "516",
+ "relevantVariables": [
+ "Wiki",
+ "repo_service.HasWiki",
+ "renderViewPage",
+ "tplWikiStart",
+ "tplWikiView"
+ ]
+ },
+ "inputDataExample": "{\"request_url\": \"/user2/repo1/wiki/Home\"}",
+ "outputDataExample": "{\"Title\": \"Home\", \"WikiContentHTML\": \"Welcome
This is the home page.
\", \"CanWriteWiki\": true}"
+ },
+ {
+ "simStepId": "f24840a6-8e6c-477d-809c-6e439aeb1b11",
+ "diagramNodeId": "8193e97d-e40a-41c9-a7c8-9cbd387fce1f",
+ "simStepLabel": "Wiki: Pass Rendered Content to Template",
+ "simStepDescription": "Data processed by the handler, including the rendered HTML content of the main page, sidebar, and footer, is passed to the template engine for display.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "routers/web/repo/wiki.go",
+ "startLine": "489",
+ "endLine": "489",
+ "relevantVariables": [
+ "ctx.HTML",
+ "tplWikiView"
+ ]
+ },
+ "inputDataExample": "{\"Title\": \"Home\", \"WikiContentHTML\": \"Welcome
This is the home page.
\", \"WikiSidebarHTML\": \"\", \"WikiFooterHTML\": \"Copyright 2023
\", \"CanWriteWiki\": true}",
+ "outputDataExample": "{\"Title\": \"Home\", \"WikiContentHTML\": \"Welcome
This is the home page.
\", \"WikiSidebarHTML\": \"\", \"WikiFooterHTML\": \"Copyright 2023
\", \"CanWriteWiki\": true}"
+ },
+ {
+ "simStepId": "c33becb1-0fbc-4f7b-8985-6b66630e84de",
+ "diagramNodeId": "c20c49a4-694f-4fbd-b9e1-b23b134f1cce",
+ "simStepLabel": "Wiki: Submit New Page Form",
+ "simStepDescription": "A user submits the form for creating a new wiki page. The request is handled by `NewWikiPost`, which binds and validates the form data including the title, content, and an optional commit message.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "routers/web/repo/wiki.go",
+ "startLine": "663",
+ "endLine": "680",
+ "relevantVariables": [
+ "NewWikiPost",
+ "forms.NewWikiForm",
+ "wiki_service.UserTitleToWebPath"
+ ]
+ },
+ "inputDataExample": "{\"form_data\": {\"title\": \"New Feature Documentation\", \"content\": \"## Details about the new feature...\", \"message\": \"docs: add documentation for new feature\"}}",
+ "outputDataExample": "{\"wikiName\": \"New-Feature-Documentation\", \"content\": \"## Details about the new feature...\", \"message\": \"docs: add documentation for new feature\"}"
+ },
+ {
+ "simStepId": "692694e8-777e-401d-b21e-360370dee044",
+ "diagramNodeId": "50736740-a7a3-4d4c-88fd-d4da1101ddea",
+ "simStepLabel": "Wiki: Data Flow to Service Layer",
+ "simStepDescription": "The validated page details are passed from the web handler to the `wiki_service` to be committed to the wiki's Git repository.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "routers/web/repo/wiki.go",
+ "startLine": "682",
+ "endLine": "682",
+ "relevantVariables": [
+ "wiki_service.AddWikiPage"
+ ]
+ },
+ "inputDataExample": "{\"doer\": {\"id\": 2, \"name\": \"user2\"}, \"repo\": {\"id\": 1, \"name\": \"repo1\"}, \"wikiName\": \"New-Feature-Documentation\", \"content\": \"## Details about the new feature...\", \"message\": \"docs: add documentation for new feature\"}",
+ "outputDataExample": "{\"doer\": {\"id\": 2, \"name\": \"user2\"}, \"repo\": {\"id\": 1, \"name\": \"repo1\"}, \"wikiName\": \"New-Feature-Documentation\", \"content\": \"## Details about the new feature...\", \"message\": \"docs: add documentation for new feature\"}"
+ },
+ {
+ "simStepId": "c97445dd-e5af-4fda-88f8-5239054437b7",
+ "diagramNodeId": "5c1d4e84-2b24-4364-892a-ad94f5c6a976",
+ "simStepLabel": "Wiki: Commit Page to Git Repository",
+ "simStepDescription": "The `AddWikiPage` service function locks the wiki repository, clones it to a temporary location, writes the new content to a file, commits the change using the provided message, and pushes it back to the bare wiki repository.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/wiki/wiki.go",
+ "startLine": "239",
+ "endLine": "242",
+ "relevantVariables": [
+ "AddWikiPage",
+ "updateWikiPage",
+ "globallock.Lock",
+ "git.Clone",
+ "gitRepo.Add",
+ "gitRepo.Commit",
+ "git.Push"
+ ]
+ },
+ "inputDataExample": "{\"wikiName\": \"New-Feature-Documentation\", \"content\": \"## Details about the new feature...\", \"message\": \"docs: add documentation for new feature\"}",
+ "outputDataExample": "{\"commit_hash\": \"a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2\", \"status\": \"success\"}"
+ },
+ {
+ "simStepId": "1141ab5f-0065-42c1-9962-a4bec03d49f6",
+ "diagramNodeId": "487df556-8b83-4f98-b884-7c63790cd423",
+ "simStepLabel": "Wiki: Trigger Notifications and Webhooks",
+ "simStepDescription": "After the wiki page is successfully created, the `notify_service.NewWikiPage` function is called to trigger webhooks and create notifications for repository watchers.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "routers/web/repo/wiki.go",
+ "startLine": "700",
+ "endLine": "700",
+ "relevantVariables": [
+ "notify_service.NewWikiPage"
+ ]
+ },
+ "inputDataExample": "{\"event\": \"wiki\", \"payload\": {\"action\": \"created\", \"page\": \"New-Feature-Documentation\", \"sender\": \"user2\"}}",
+ "outputDataExample": "{\"event\": \"wiki\", \"payload\": {\"action\": \"created\", \"page\": \"New-Feature-Documentation\", \"sender\": \"user2\"}}"
+ },
+ {
+ "simStepId": "b0a7c3ca-22a2-4429-9878-dee03f0f4bfd",
+ "diagramNodeId": "7bba84d2-67d7-498d-87aa-84adf217d67f",
+ "simStepLabel": "Release: Submit New Release Form",
+ "simStepDescription": "A user submits the form to create a new release. The POST request is handled by `NewReleasePost`, which binds the form data (tag, target, title, notes, attachments) and performs validation.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "routers/web/repo/release.go",
+ "startLine": "393",
+ "endLine": "470",
+ "relevantVariables": [
+ "NewReleasePost",
+ "forms.NewReleaseForm"
+ ]
+ },
+ "inputDataExample": "{\"form_data\": {\"tag_name\": \"v1.0.0\", \"target\": \"main\", \"title\": \"Version 1.0.0\", \"note\": \"Initial stable release.\", \"files\": [\"uuid-of-binary-1\", \"uuid-of-source-zip\"]}}",
+ "outputDataExample": "{\"release_options\": {\"TagName\": \"v1.0.0\", \"Target\": \"main\", \"Title\": \"Version 1.0.0\", \"Note\": \"Initial stable release.\", \"IsDraft\": false, \"IsPrerelease\": false}, \"attachmentUUIDs\": [\"uuid-of-binary-1\", \"uuid-of-source-zip\"]}"
+ },
+ {
+ "simStepId": "1179818d-832c-4e69-adb1-5ea7983edcce",
+ "diagramNodeId": "db8a1c5b-17b2-4592-a064-763fdf405b2e",
+ "simStepLabel": "Release: Pass Data to Release Service",
+ "simStepDescription": "The validated release details, including metadata and attachment UUIDs, are passed from the web handler to the `release_service` to create the Git tag and database record.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "routers/web/repo/release.go",
+ "startLine": "488",
+ "endLine": "488",
+ "relevantVariables": [
+ "release_service.CreateRelease"
+ ]
+ },
+ "inputDataExample": "{\"release\": {\"RepoID\": 1, \"TagName\": \"v1.0.0\", \"Target\": \"main\", \"Title\": \"Version 1.0.0\", \"Note\": \"Initial stable release.\"}, \"attachmentUUIDs\": [\"uuid-of-binary-1\", \"uuid-of-source-zip\"]}",
+ "outputDataExample": "{\"release\": {\"RepoID\": 1, \"TagName\": \"v1.0.0\", \"Target\": \"main\", \"Title\": \"Version 1.0.0\", \"Note\": \"Initial stable release.\"}, \"attachmentUUIDs\": [\"uuid-of-binary-1\", \"uuid-of-source-zip\"]}"
+ },
+ {
+ "simStepId": "5873640f-cd1c-4bc5-9bc2-9e9df60bd7a9",
+ "diagramNodeId": "03e91619-5b13-4a9e-bbb2-f6c6b1eceded",
+ "simStepLabel": "Release: Create Git Tag and Database Record",
+ "simStepDescription": "The `CreateRelease` service function creates a Git tag if one doesn't exist, inserts a new `Release` record into the database, and associates any uploaded attachments with this new record.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "services/release/release.go",
+ "startLine": "167",
+ "endLine": "200",
+ "relevantVariables": [
+ "CreateRelease",
+ "repo_model.IsReleaseExist",
+ "createTag",
+ "db.Insert",
+ "repo_model.AddReleaseAttachments"
+ ]
+ },
+ "inputDataExample": "{\"release_model\": {\"RepoID\": 1, \"TagName\": \"v1.0.0\", \"Target\": \"main\", \"Title\": \"Version 1.0.0\"}, \"attachmentUUIDs\": [\"uuid-of-binary-1\"]}",
+ "outputDataExample": "{\"release_id\": 5, \"tag_created\": true, \"attachments_associated\": 1}"
+ },
+ {
+ "simStepId": "b30def5e-bb2a-4464-a9cb-f0faa2e68234",
+ "diagramNodeId": "24cfd71c-fdb5-4fc3-a833-90fa4d372f79",
+ "simStepLabel": "Release: Trigger Release Notifications",
+ "simStepDescription": "Upon successful creation of the release, `notify_service.NewRelease` is called. This constructs a `ReleasePayload` and sends it to all configured webhooks for the repository that subscribe to the release event.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "services/release/release.go",
+ "startLine": "195",
+ "endLine": "195",
+ "relevantVariables": [
+ "notify_service.NewRelease"
+ ]
+ },
+ "inputDataExample": "{\"action\": \"published\", \"release\": {\"tag_name\": \"v1.0.0\", \"name\": \"Version 1.0.0\", \"author\": {\"login\": \"user2\"}}}",
+ "outputDataExample": "{\"action\": \"published\", \"release\": {\"tag_name\": \"v1.0.0\", \"name\": \"Version 1.0.0\", \"author\": {\"login\": \"user2\"}}}"
+ },
+ {
+ "simStepId": "c0e8827d-f756-4a38-b12b-9c6efca47dc5",
+ "diagramNodeId": "12f0bfb6-ed6a-4188-aeb6-a73fbe6396bc",
+ "simStepLabel": "Release: List Repository Releases",
+ "simStepDescription": "A user navigates to the repository's releases page. The `Releases` handler fetches all releases and tags from the database via `getReleaseInfos`, which in turn calls `db.Find[repo_model.Release]`. It also loads associated attachments for each release.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "routers/web/repo/release.go",
+ "startLine": "152",
+ "endLine": "194",
+ "relevantVariables": [
+ "Releases",
+ "getReleaseInfos",
+ "repo_model.FindReleasesOptions"
+ ]
+ },
+ "inputDataExample": "{\"request_url\": \"/user2/repo1/releases\"}",
+ "outputDataExample": "{\"Releases\": [{\"Release\": {\"ID\": 5, \"TagName\": \"v1.0.0\", \"Title\": \"Version 1.0.0\", \"Attachments\": [{\"name\": \"binary.exe\", \"size\": 1024}]}}]}"
+ },
+ {
+ "simStepId": "aabb5e49-b07e-4a53-88b9-1fdc357966da",
+ "diagramNodeId": "",
+ "simStepLabel": "Release: Pass Release List to Template",
+ "simStepDescription": "The list of release information objects is passed to the `repo/release/list` template for rendering the HTML view.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "routers/web/repo/release.go",
+ "startLine": "187",
+ "endLine": "187",
+ "relevantVariables": [
+ "ctx.HTML",
+ "tplReleasesList"
+ ]
+ },
+ "inputDataExample": "{\"Releases\": [{\"Release\": {\"ID\": 5, \"TagName\": \"v1.0.0\", \"Title\": \"Version 1.0.0\", \"Attachments\": [{\"name\": \"binary.exe\"}]}, \"CommitStatus\": null}]}",
+ "outputDataExample": "{\"Releases\": [{\"Release\": {\"ID\": 5, \"TagName\": \"v1.0.0\", \"Title\": \"Version 1.0.0\", \"Attachments\": [{\"name\": \"binary.exe\"}]}, \"CommitStatus\": null}]}"
+ }
+ ],
+ "description": "- Tools for documenting projects and distributing software versions
- - Each repository can have its own integrated, Git-based Wiki for documentation
- - Wiki pages can be created and edited directly in the web UI using Markdown
- - Users can create formal releases based on Git tags to package and distribute software
- - Releases can include downloadable assets (binaries, archives), release notes, and changelogs
",
+ "simulationNodesAndEdges": {
+ "a6a31b25-0e4c-4044-8c56-1a79bf2ab773": {
+ "simStepIds": [
+ "90a80659-4a4f-4034-aab4-d0bfbc1febb4"
+ ]
+ },
+ "c20c49a4-694f-4fbd-b9e1-b23b134f1cce": {
+ "simStepIds": [
+ "c33becb1-0fbc-4f7b-8985-6b66630e84de"
+ ]
+ },
+ "5c1d4e84-2b24-4364-892a-ad94f5c6a976": {
+ "simStepIds": [
+ "c97445dd-e5af-4fda-88f8-5239054437b7"
+ ]
+ },
+ "7bba84d2-67d7-498d-87aa-84adf217d67f": {
+ "simStepIds": [
+ "b0a7c3ca-22a2-4429-9878-dee03f0f4bfd"
+ ]
+ },
+ "03e91619-5b13-4a9e-bbb2-f6c6b1eceded": {
+ "simStepIds": [
+ "5873640f-cd1c-4bc5-9bc2-9e9df60bd7a9"
+ ]
+ },
+ "12f0bfb6-ed6a-4188-aeb6-a73fbe6396bc": {
+ "simStepIds": [
+ "c0e8827d-f756-4a38-b12b-9c6efca47dc5"
+ ]
+ },
+ "8193e97d-e40a-41c9-a7c8-9cbd387fce1f": {
+ "simStepIds": [
+ "f24840a6-8e6c-477d-809c-6e439aeb1b11"
+ ]
+ },
+ "50736740-a7a3-4d4c-88fd-d4da1101ddea": {
+ "simStepIds": [
+ "692694e8-777e-401d-b21e-360370dee044"
+ ]
+ },
+ "487df556-8b83-4f98-b884-7c63790cd423": {
+ "simStepIds": [
+ "1141ab5f-0065-42c1-9962-a4bec03d49f6"
+ ]
+ },
+ "db8a1c5b-17b2-4592-a064-763fdf405b2e": {
+ "simStepIds": [
+ "1179818d-832c-4e69-adb1-5ea7983edcce"
+ ]
+ },
+ "24cfd71c-fdb5-4fc3-a833-90fa4d372f79": {
+ "simStepIds": [
+ "b30def5e-bb2a-4464-a9cb-f0faa2e68234"
+ ]
+ }
+ },
+ "isAIGenerated": true,
+ "keywords": "Wiki, Release, NewRelease",
+ "generationPrompt": "Project Documentation and Software Releases",
+ "generationKeywords": "Wiki, Release, NewRelease"
+ }
+ },
+ "cellToPath": {
+ "f88f08c3-0e93-4de5-b142-4ff1a55f4c7b": "routers",
+ "2095457c-08fa-4087-baae-dd962ebe60d3": "services",
+ "b540e2b9-4a85-4f1f-a957-30cd67684a66": "templates",
+ "4c5d55c2-d60f-4c4c-b674-bfed63fdd138": "routers/web",
+ "825b9e8b-b738-4712-bd94-10d08696cae1": "services/repository",
+ "2ebce87f-f247-403e-950a-4f695d05ac6e": "services/webhook",
+ "b953507d-dd9b-4799-9fea-5d2f89cf46d0": "services/context",
+ "b76f2e2b-7e6a-4474-8670-e456541f5ec2": "templates/repo",
+ "e784820c-8d2c-4480-8888-bf60f961f4b7": "routers/web/repo",
+ "cb8c6486-62bb-4348-a03b-2e66dd0fcb09": "services/repository/create.go",
+ "ee3c4395-ec52-49ae-b5f6-c0564e51e17f": "services/webhook/notifier.go",
+ "4c269f1e-5c02-469c-be7f-cd7b3fba6139": "services/context/repo.go",
+ "0e5b8ab7-2e08-437d-88a9-77262cad0b3e": "templates/repo/home.tmpl",
+ "daa5766d-eb59-4ec3-a602-312c90bd1b8c": "templates/repo/view_file_list.tmpl",
+ "0ead94e8-298a-47d5-a682-ac5239b7056c": "templates/repo/view_file.tmpl",
+ "11af5701-f89e-44a7-b761-7715c533f507": "routers/web/repo/repo.go",
+ "8cd4bf6c-df0a-445a-9a69-301a3a69b223": "routers/web/repo/view_home.go",
+ "c04c4632-5922-4925-8ed7-ecfa9b7b84dd": "routers/web/repo/view.go",
+ "d69d1137-0bba-4cb4-9a26-22202f61c767": "routers/web/repo/view_file.go",
+ "5dc7c5cf-cab6-4053-a804-59d4140be48c": "routers/web/repo/repo.go-simstep-53901967-77be-42fa-9b62-2bc14def484f",
+ "66b8e539-a8c1-431b-80bd-1f01703d3d0d": "services/repository/create.go-simstep-e53953bb-173b-4a7c-8798-7a292ed34210",
+ "c62a8467-c20f-48bf-baad-83a65c177225": "services/webhook/notifier.go-simstep-f1b0adeb-8b7e-43c5-8f1c-2f57935563f1",
+ "f4ecbce4-0dad-48e1-92fc-373392e18d72": "services/context/repo.go-simstep-1601b44c-14d8-4513-8c48-ca8155f37053",
+ "19fbded3-6ebb-428a-8e42-e44a7099340b": "routers/web/repo/view_home.go-simstep-b66ab550-b9d6-47a9-8c00-f8db35d2110b",
+ "7c9a6d94-f600-42db-ac03-72fc3cff7bc9": "templates/repo/home.tmpl-simstep-a9744f20-8855-44e8-b85d-8967be3baadf",
+ "7e1917b3-8473-4278-8995-4680d9464618": "routers/web/repo/view_file.go-simstep-a8a09c64-d962-40f3-b4d1-9b0941533a46",
+ "5f394888-0458-458e-bc71-350516b1a8fd": "templates/repo/view_file.tmpl-simstep-5ccb6703-b546-4b9b-9647-cb9dc611fd3c",
+ "3c173167-a47f-4e9d-9269-210cd7056b61": "generated-edge-simstep-2cec9676-4fa2-4880-ae98-8499dfe5d73d-3c173167-a47f-4e9d-9269-210cd7056b61",
+ "4ff771e1-09e3-477f-97f1-032198e031d1": "generated-edge-simstep-4bb58ff9-5969-4ea1-9d90-6af267c88852-4ff771e1-09e3-477f-97f1-032198e031d1",
+ "c853623e-b02f-4551-9b5b-aed279344787": "generated-edge-simstep-fc752333-bd0d-4bcb-bec9-bd07b7a0e201-c853623e-b02f-4551-9b5b-aed279344787",
+ "fe63164b-9973-42fc-8544-b192110a4fca": "generated-edge-simstep-bf9ec22b-a6f7-4797-93bb-4ff38f4cf426-fe63164b-9973-42fc-8544-b192110a4fca",
+ "c552696a-6be4-4a4f-b24c-ca7eb3ff16b4": "generated-edge-simstep-990ceda7-8e8c-42e5-98bb-ffbc7a54a017-c552696a-6be4-4a4f-b24c-ca7eb3ff16b4",
+ "67900620-14d5-41f7-b198-19e134376df0": "generated-edge-simstep-052a7d45-56b2-48f0-a56d-fb7d01d53c1d-67900620-14d5-41f7-b198-19e134376df0",
+ "08b077bf-97e7-4065-9d41-826b190a6d99": "generated-edge-simstep-e404c283-c030-432c-ac08-f8adbbb9155f-08b077bf-97e7-4065-9d41-826b190a6d99",
+ "9c37213c-3c3a-45d9-acff-87fc3ab9c825": "models",
+ "68fb5e48-185f-459b-9b78-6be6102821eb": "web_src",
+ "71a69fd9-d4ac-400e-9b3d-37bfddf5357c": "services/pull",
+ "639a1c59-e4ad-4a00-9e7a-97365883a988": "services/notify",
+ "92701556-5fde-4ec1-b80b-12ec36212aad": "models/issues",
+ "5a137c49-78e8-43a4-83c8-5b911d974a04": "web_src/js",
+ "b0197d77-0606-4d64-af96-ce992f9de7a5": "services/pull/pull.go",
+ "760215a8-c752-4619-ab66-274b59be1ec3": "services/pull/check.go",
+ "8c9ebe99-1c96-46af-b937-545322eb5328": "services/pull/merge.go",
+ "4ab5206e-2bb5-411c-ab1f-17a126f951b3": "services/notify/notify.go",
+ "ae4355d1-5b08-4720-b048-73c948697625": "models/issues/pull.go",
+ "16ef1cae-4978-45f7-aae1-08a44fc79543": "web_src/js/components",
+ "82a6e105-ada7-413b-987f-f44109b7b3cc": "routers/web/repo/pull.go",
+ "bdb71908-9b32-4778-8a35-d17a9e5661bc": "web_src/js/components/PullRequestMergeForm.vue",
+ "b5e61883-df8d-4f17-8f87-aa74d16df77b": "routers/web/repo/pull.go-simstep-ad391192-a9ab-42f5-8966-f6628aeded05",
+ "bfa1c7f3-8d1a-4ffe-a65f-b5c87c095cb7": "services/pull/pull.go-simstep-e5ba05df-a66c-4931-9faa-926f5a23d6ae",
+ "fee62c98-5a6d-4979-830d-4db9909c6a98": "models/issues/pull.go-simstep-5092d84c-c9ea-4367-8615-a4824895029c",
+ "a94cfe55-a85f-4f92-a28d-e58f004b12b3": "services/notify/notify.go-simstep-56fda301-e5b4-440a-8db2-4c4ed2bd649a",
+ "a35e90c9-3fc2-4891-9dd8-d3690b17ff54": "services/pull/check.go-simstep-b7c0578c-e1e5-47e4-978c-cc79753235f0",
+ "1f9b64f0-5508-4177-887f-14556a0628b0": "routers/web/repo/pull.go-simstep-7f11138f-6ee9-4918-b3ca-78da3871caea",
+ "882a8fca-a108-4651-abb9-20a43eb9f64d": "services/pull/merge.go-simstep-1551889d-7fcd-4b22-9962-d4174a18ddd6",
+ "0ef482fa-8bc1-446d-baa4-fded92d124f3": "services/pull/merge.go-simstep-1b760baa-c919-4660-9e0c-b6137e1c2721",
+ "b66f2694-f430-4fd0-808a-5e5279c50dd7": "services/notify/notify.go-simstep-0a08a7a7-4813-4700-9b6b-0787163e9fd9",
+ "88810df3-fc69-4b7f-b6c8-e46446ce3696": "generated-edge-simstep-4cab6466-093b-43c9-88ad-28484e60d6c4-88810df3-fc69-4b7f-b6c8-e46446ce3696",
+ "aaadac8d-1aba-451a-bba4-794a4221c886": "generated-edge-simstep-0ab8dd7f-05f5-4462-bf64-1985f392f78d-aaadac8d-1aba-451a-bba4-794a4221c886",
+ "8fd4a69e-be65-4ade-9ced-047c7ebd6c0d": "generated-edge-simstep-22b464f6-b543-4ac2-8b6b-e26efa91e1b5-8fd4a69e-be65-4ade-9ced-047c7ebd6c0d",
+ "af2b35e5-e443-42dc-8bef-a9183a7c13f8": "generated-edge-simstep-b564efb1-92b6-4978-8c83-c278707dc375-af2b35e5-e443-42dc-8bef-a9183a7c13f8",
+ "52c36476-f770-4a34-b3db-87f7f134802f": "generated-edge-simstep-a12e4843-9815-455c-a6d8-d62a3022639b-52c36476-f770-4a34-b3db-87f7f134802f",
+ "a44ff35a-ae0f-4846-99c3-dcc26c469dff": "generated-edge-simstep-5804dffe-4772-4a09-a711-15938dea8430-a44ff35a-ae0f-4846-99c3-dcc26c469dff",
+ "8dfd279d-9e21-4855-b71d-bf3e167eab19": "generated-edge-simstep-b2b55ac7-e6cf-45f1-a94f-edf2b463bcaf-8dfd279d-9e21-4855-b71d-bf3e167eab19",
+ "c271830f-aca0-4976-b30a-49c7480d2d5f": "generated-edge-simstep-5c7c61d7-c7a3-42e5-8991-f30f383d00da-c271830f-aca0-4976-b30a-49c7480d2d5f",
+ "c66d3460-05f8-48fe-aae7-80531064bdd7": "services/issue",
+ "1d625953-5a4b-4e1d-9f8a-a3dbc41bae6b": "services/issue/issue.go",
+ "aa6e7784-13b0-4fc8-a253-363ad293bcb0": "models/issues/issue.go",
+ "e2b305da-d0ea-47ad-aac6-67d3497ccb15": "routers/web/repo/issue_new.go",
+ "0fdc02d5-1b92-4a8c-91f5-7a43eae87236": "routers/web/repo/issue_new.go-simstep-ffce7d78-1ab1-49b1-b495-1416b1eadfc9",
+ "c5e558c9-f7f1-48c0-b35d-20852848a419": "services/issue/issue.go-simstep-23e3c1d3-be55-497a-ab55-03195d821e10",
+ "97fb5926-0c38-47ad-8591-399006209210": "models/issues/issue.go-simstep-77c253a8-80a6-4e84-965f-c37320babc81",
+ "efbd431a-4332-4576-8367-04b50ee53a2a": "services/webhook/notifier.go-simstep-756e8552-8547-4936-982a-f6adb7aefd97",
+ "bb14c890-2c21-47a0-9a96-ba933c84c606": "routers/web/repo/issue_new.go-simstep-97731684-60e8-4305-9098-6027b64190bd",
+ "c8cdf497-8db8-4cce-b1b2-57765ae78e03": "generated-edge-simstep-91a514b9-1466-4433-93a9-a1ff6c6c8f37-c8cdf497-8db8-4cce-b1b2-57765ae78e03",
+ "1da93353-da10-4d79-b4a5-5e45280dd1e8": "generated-edge-simstep-dd1c8491-415a-470b-bd31-573e7f2383ff-1da93353-da10-4d79-b4a5-5e45280dd1e8",
+ "10a06681-af82-48d0-b42b-52498d398caf": "generated-edge-simstep-202f0b40-d7cf-40d6-b794-229b0f38d1b4-10a06681-af82-48d0-b42b-52498d398caf",
+ "fa2e1092-e208-4362-b048-ee6ad9443576": "generated-edge-simstep-179e5cc9-bbc1-4f87-a1c7-c19324545695-fa2e1092-e208-4362-b048-ee6ad9443576",
+ "c9e2608a-433c-4d04-9c8c-03984aa24fcc": "modules",
+ "0f64dd37-6573-4d47-a06a-435f9ac9acac": "services/actions",
+ "4c93880a-1d09-4b55-ac7b-89233950cc5c": "modules/actions",
+ "2877baa9-2dbd-44c3-98e0-684becf46b08": "models/actions",
+ "807c2016-8e41-4357-b295-11ccb53c3eae": "routers/api",
+ "083eae6c-89fc-462f-a945-a15d57a9cc9e": "services/actions/notifier_helper.go",
+ "01eacf2c-6451-40c4-b950-52dfbd738a90": "services/actions/job_emitter.go",
+ "0779d0ad-6911-459b-9a90-9a60522f1037": "services/actions/task.go",
+ "55410235-e25a-43f1-9e9e-0c4d56846a85": "services/actions/commit_status.go",
+ "4b8c137f-4ebc-4ff7-9fa6-32c4ea0a4124": "modules/actions/workflows.go",
+ "0a3a4f48-3de3-4279-a764-3905209adebb": "models/actions/run.go",
+ "6d3c2152-7875-4098-ab7b-890f6113e98f": "routers/api/actions",
+ "be32ba0f-1fd7-4703-b379-f22b27c2147f": "routers/api/actions/runner",
+ "11629953-2d33-4973-82aa-1587607afd89": "routers/api/actions/runner/runner.go",
+ "d022d6fa-5c86-4fa0-a0be-31236a28c8d4": "services/actions/notifier_helper.go-simstep-54c475cd-aa1c-4381-9d38-a54792886af9",
+ "d1143895-5d48-4593-813f-b281b6145fdb": "models/actions/run.go-simstep-c96bb1be-02e4-4023-bc30-19d4ba081da8",
+ "cf18404b-f3c3-4e0a-ba42-80c0b9eee16f": "services/actions/job_emitter.go-simstep-b2c4908e-d37d-4606-a880-31babd962d71",
+ "4d3a7ffc-e4d8-43b4-b098-a7ef886630ca": "services/actions/task.go-simstep-01f6079d-0a18-402a-9778-a571b661a3e6",
+ "f4a68738-6a58-4424-8090-85b1f5d14d23": "routers/api/actions/runner/runner.go-simstep-a9a8aad6-c51e-4d1d-83bd-1a716cc18de1",
+ "54715d5b-dbe6-405c-b591-0c4fc4f211eb": "services/actions/commit_status.go-simstep-1850ee33-6937-4414-8809-657c49ab8c24",
+ "b0ef37fb-198b-46a5-bdf6-0544a12abc08": "services/webhook/notifier.go-simstep-819644f6-a9d1-489c-a1e9-8a7f607d8db6",
+ "ac3433e9-9244-42ed-be46-d927aee90d41": "generated-edge-simstep-2405bd87-f38a-4df3-abcd-25cfc0af4398-ac3433e9-9244-42ed-be46-d927aee90d41",
+ "5ae1e1da-794d-4152-88da-5ba4e75f5bee": "generated-edge-simstep-48f44711-30e0-4b75-9fc2-56c98bce1fa7-5ae1e1da-794d-4152-88da-5ba4e75f5bee",
+ "7ad46963-6001-4cba-9021-a22187da39b7": "generated-edge-simstep-295d2174-45bc-4e48-b88e-f0fa71fceb9a-7ad46963-6001-4cba-9021-a22187da39b7",
+ "da88243b-558a-438b-870e-9da2c643e90d": "generated-edge-simstep-da76dc6b-1315-4863-afad-c68b80f75671-da88243b-558a-438b-870e-9da2c643e90d",
+ "bd25ec2e-95b9-47c2-89e3-15fa8ca4eae2": "generated-edge-simstep-c80b44b7-e91a-4b61-a095-c1cf10dbb585-bd25ec2e-95b9-47c2-89e3-15fa8ca4eae2",
+ "0e991a9b-0712-41d9-9a67-7f3de1da39dc": "generated-edge-simstep-c5ff05a3-ed72-407a-a3e8-9764acd20134-0e991a9b-0712-41d9-9a67-7f3de1da39dc",
+ "a63a77af-acb7-48f5-9179-64bc26b1d1a6": "models/organization",
+ "cfcc20ae-59cf-47b3-a7a3-96ba0ad1abd6": "models/perm",
+ "6bd2ddd2-7126-44ef-81a0-f5a723fed41d": "services/org",
+ "547773bf-f623-4285-bcf3-bc7352e83727": "routers/api/v1",
+ "9fe58423-820e-4df6-80f1-17d2c56c3577": "models/organization/org.go",
+ "76a94391-d82b-481f-b6c0-261acdb9ac38": "models/perm/access",
+ "dbbfae18-dda1-45cb-af47-2cc6201794a4": "services/org/team.go",
+ "4c9979e0-7716-4c7a-ab18-d6cfe683964b": "services/repository/repo_team.go",
+ "f3d903ba-37ed-4ff5-bcab-2598ac719c9d": "routers/api/v1/org",
+ "0bd8f3b7-c2b4-456f-9d12-4f70d1f09126": "models/perm/access/access.go",
+ "b76765f5-65e3-41ee-97a6-c3db05b1a331": "routers/api/v1/org/org.go",
+ "95504365-53f2-4430-a256-918e72715e2f": "routers/api/v1/org/team.go",
+ "5801e4ea-4e2b-472a-87ec-4284f690993c": "routers/api/v1/org/org.go-simstep-d3d50f13-d8b4-42b7-9c03-f5aecdd107c3",
+ "74565581-b2f0-4f07-a22e-b3ca8b2ca245": "models/organization/org.go-simstep-c87a4f37-7192-4dd9-a921-65701d2514da",
+ "e94a5358-862e-45d4-a9fc-44f3d404f9a2": "routers/api/v1/org/team.go-simstep-27159163-bec3-4784-814c-39fbbabbe5c0",
+ "ab5d40fa-b506-44e3-af02-f493f3fa1062": "services/org/team.go-simstep-c7a4932f-39c4-440f-bfb2-6e0f08961f03",
+ "b686c9a2-1300-4f86-9915-9b3bad7ecfb6": "routers/api/v1/org/team.go-simstep-3ffb9dab-a06e-447e-ac05-83e821f4e38f",
+ "385f5d69-6b5e-452c-9b07-8774ded3e691": "services/org/team.go-simstep-62554420-2e08-4eb8-ae5c-8664c95a27b2",
+ "a8fb5076-2684-418a-86dd-e1a81ef6dcd5": "routers/api/v1/org/team.go-simstep-63bb7359-8e00-459a-9be7-a4cb596a2ac4",
+ "e8f83196-c831-49b1-bdf9-f8747469b62c": "services/repository/repo_team.go-simstep-b6cf2f5e-8a56-4e3a-84f0-5259abcb93a0",
+ "4fc53056-f096-48e0-9866-5ce11e58e2d7": "models/perm/access/access.go-simstep-bf4d9374-88f2-4882-8c74-b393fe42964f",
+ "c07fa184-527d-444e-bf79-b0450d13b27c": "generated-edge-simstep-c043edea-95e5-4a4d-9153-95d0adf7c4e8-c07fa184-527d-444e-bf79-b0450d13b27c",
+ "987bbf28-002d-4fe1-863f-ec21c4f7824a": "generated-edge-simstep-a0797477-98f0-4487-bd6e-7abf47b86744-987bbf28-002d-4fe1-863f-ec21c4f7824a",
+ "e31b5a55-8e34-469c-91c6-4d12d7b47bb6": "generated-edge-simstep-a8d868f5-ec8f-497d-9e46-e7741e51d2d2-e31b5a55-8e34-469c-91c6-4d12d7b47bb6",
+ "2b874597-f207-44a5-8cde-031be7eb2b56": "generated-edge-simstep-b7de382b-0703-4570-93b6-0f58841ebf91-2b874597-f207-44a5-8cde-031be7eb2b56",
+ "8d94591b-aa0d-42da-af64-24eb53a28705": "generated-edge-simstep-7cd2fd9a-4b40-49c3-a288-e35db0272f3c-8d94591b-aa0d-42da-af64-24eb53a28705",
+ "951d6bc3-97ee-4898-b6a0-c3e4b5d4f443": "generated-edge-simstep-9174ea75-a7d4-4c3b-928a-ca8849adc991-951d6bc3-97ee-4898-b6a0-c3e4b5d4f443",
+ "511cb761-ed7f-44d9-9a4d-00d12b23b846": "generated-edge-simstep-2fff8506-9cf7-4560-8963-857e670940d7-511cb761-ed7f-44d9-9a4d-00d12b23b846",
+ "3eec94e4-2183-4f04-817c-6d464923e971": "generated-edge-simstep-582f4568-966f-4a89-b5d3-73fbff0899ee-3eec94e4-2183-4f04-817c-6d464923e971",
+ "9395aa4c-73a4-4c2a-b21d-7ba8961158c1": "services/packages",
+ "7f767bed-ae0a-4dc2-a810-058a34d7415c": "routers/api/packages",
+ "61a15f31-b7b2-430b-acb7-c7558d4720cb": "services/packages/packages.go",
+ "c90b0788-272b-4a3f-8419-c1e7c5f78ab9": "routers/api/packages/api.go",
+ "23320a3b-e866-4326-aa0a-fab89f250a87": "routers/api/packages/generic",
+ "47388450-891e-4383-b54a-1c28df16469c": "routers/api/packages/generic/generic.go",
+ "93a89fef-f5df-40a0-a9e5-a3bc04193b06": "routers/api/packages/api.go-simstep-80bd7665-22f0-4298-a595-441e3ac30519",
+ "602f94d9-2d09-4bda-8700-5fd0e4ce0cb6": "routers/api/packages/generic/generic.go-simstep-9e90ffc2-07f4-4084-b09e-bee9d373e5d7",
+ "60f8ff6c-06aa-4a3b-acb1-de1f90145878": "services/packages/packages.go-simstep-3a18acb5-55a0-428f-9bb5-2cade38c753e",
+ "b52e0740-466f-4999-b5e2-40f2a59be4da": "routers/api/packages/generic/generic.go-simstep-1c045caa-8810-492e-97be-a8471a7605b2",
+ "0ba0d3db-8e3b-4454-b9f9-c770676a5de6": "generated-edge-simstep-df58fa69-47ff-45b1-9e42-a0ff6501abeb-0ba0d3db-8e3b-4454-b9f9-c770676a5de6",
+ "79140f26-f852-443c-8b81-26bafbf41a8d": "generated-edge-simstep-433dacf5-48f5-4c8b-8bd3-2afd7b5c03ad-79140f26-f852-443c-8b81-26bafbf41a8d",
+ "61550a8c-6c85-4ec9-a9f3-dc0299c5ae3a": "generated-edge-simstep-6b367fd7-0316-477a-89a5-b339c79ba573-61550a8c-6c85-4ec9-a9f3-dc0299c5ae3a",
+ "d3647ed6-309d-4bbb-83e1-8ac8c769d74a": "models/webhook",
+ "d8fcd25d-fb86-46b3-9277-197d7750b1dd": "models/webhook/webhook.go",
+ "324ebb2a-8eb7-4418-9d46-e6c6862f79f2": "services/webhook/webhook.go",
+ "e4e5f63d-e96f-4d9f-bbba-9a25dccf1be4": "services/webhook/deliver.go",
+ "e0bd77b2-9399-46af-ada1-62c5c4852b6f": "routers/api/v1/repo",
+ "415fef8e-57f9-453a-9052-8cb5fb6ca6f9": "routers/api/v1/utils",
+ "4e2643dd-9d0b-4335-ad1e-7afdc33bd158": "routers/api/v1/repo/hook.go",
+ "295b44d5-48fa-4bdb-aec3-8c84ddf9b86c": "routers/api/v1/utils/hook.go",
+ "90e0a729-5498-4df2-bfef-c4bf7f8ab73f": "routers/api/v1/repo/hook.go-simstep-76ada736-60f1-4b60-ac04-2a06ce0f08eb",
+ "4efe568d-fb0e-4b73-bca4-93d8b23def0d": "routers/api/v1/utils/hook.go-simstep-7d095ef9-2d9a-46ea-bd33-04da751e319f",
+ "85b318b0-fc06-4e63-96e6-549a40657642": "models/webhook/webhook.go-simstep-6cb0b191-90e3-4ddc-93d3-61a18c507e1a",
+ "2bba0f9c-e4a6-4a85-9395-17a890477a91": "routers/api/v1/repo/hook.go-simstep-907040df-6d7e-4c66-b65e-97fd1e1fb7f7",
+ "f7d0dc25-3cff-4920-b358-54b0e1eb2285": "services/webhook/notifier.go-simstep-aa2b12e0-ced0-40fd-9afe-d2dafe836790",
+ "d58f07ab-224c-45ad-8ec0-806dac605e87": "services/webhook/webhook.go-simstep-f12258ba-b683-4b8e-ae55-f9e9cb830e91",
+ "7fda5f6b-b357-4c1c-b552-45b7146b697f": "services/webhook/webhook.go-simstep-ca8b0022-2b6d-47f3-b750-132b50943f97",
+ "8b1b81a8-1554-4802-b3f2-3f9e1a295792": "services/webhook/webhook.go-simstep-3da3ce55-4f26-4df2-b476-405ce84c47c6",
+ "78582255-93a6-4d8c-862e-6314bbb83142": "services/webhook/deliver.go-simstep-e8051428-7f7d-484f-a54d-402fad522be8",
+ "1955d69c-79d0-4a14-9de3-4a9a0fadeb54": "services/webhook/deliver.go-simstep-93f1ca06-955c-441a-9f4d-7d515d95aeba",
+ "9eaf2897-e259-4e1a-a138-3e6844cec166": "generated-edge-simstep-40191feb-a811-489e-a0f1-ea3d39bb00f9-9eaf2897-e259-4e1a-a138-3e6844cec166",
+ "87906207-d798-426c-8ec4-2b2fb40919ee": "generated-edge-simstep-80c189b4-7eb6-4e9c-800e-e21447dfbf72-87906207-d798-426c-8ec4-2b2fb40919ee",
+ "bd976180-7de9-43bd-8d1e-f58f93173cf2": "generated-edge-simstep-16c11187-302e-4e92-a962-44d2cd8dbffe-bd976180-7de9-43bd-8d1e-f58f93173cf2",
+ "cc057b38-3d8f-48b1-a4e6-fda341e23c20": "generated-edge-simstep-fc5cc0e7-04a7-4a73-8467-9f7fcf4fe658-cc057b38-3d8f-48b1-a4e6-fda341e23c20",
+ "139f905a-97c8-4303-855a-ccf3a7882b46": "generated-edge-simstep-deb804e2-437d-4acc-94be-43f8afbf4f0f-139f905a-97c8-4303-855a-ccf3a7882b46",
+ "789df1b7-e8cc-4bf0-9a85-c2dac7c64b00": "generated-edge-simstep-1bea30e4-8dd5-4d87-851c-51424da5ef6b-789df1b7-e8cc-4bf0-9a85-c2dac7c64b00",
+ "58204391-3066-4cf2-8e28-579e26ce0d8a": "generated-edge-simstep-08055f7d-a4d9-4511-b553-c373069ae6aa-58204391-3066-4cf2-8e28-579e26ce0d8a",
+ "5c98efaf-3371-47d1-92ec-08f5f1a408d2": "generated-edge-simstep-e6240b65-0ba9-4547-a519-45c09b25a567-5c98efaf-3371-47d1-92ec-08f5f1a408d2",
+ "ae1da22a-a9d0-458e-89ab-2a63d212de9b": "services/auth",
+ "a6632228-3a8d-444a-9e04-e306ee1682a0": "routers/web/auth",
+ "bd39a2a8-6696-4331-818b-3de73d784b19": "services/auth/signin.go",
+ "c9434e1d-28b1-4380-907c-8288b392b07b": "services/auth/source",
+ "2ad9e5d7-3a54-4e5a-b6a4-3c1ad81907c1": "routers/web/auth/auth.go",
+ "de24489c-6df1-4c57-9419-5443e9986d88": "services/auth/source/ldap",
+ "a0a0b2ce-286f-49a7-bd9a-9418bdfd6b48": "services/auth/source/ldap/source_authenticate.go",
+ "90ae1a9d-b4b6-42df-b7e9-fa206e89fbb8": "services/auth/source/ldap/source_search.go",
+ "df68b70e-609b-4e46-bd13-b2789a256937": "routers/web/auth/auth.go-simstep-de460200-3fc3-4ce4-85dd-55f7a1a902e0",
+ "9a31a054-afe3-4108-a222-e00c6711d764": "services/auth/signin.go-simstep-660ca44b-c08d-42e4-a28a-58caf0b6d6ab",
+ "287f8218-823c-459c-8071-e71192fc9048": "services/auth/source/ldap/source_authenticate.go-simstep-a3a212e6-29d1-423c-aec2-e2bf5dc80756",
+ "d0979ef4-d3ac-4772-9d30-df7852f72044": "services/auth/source/ldap/source_search.go-simstep-ce938895-5d2d-4137-8207-18ec5a5454e6",
+ "00c27c1f-26a0-425b-9adc-f2f5af2d6262": "services/auth/source/ldap/source_search.go-simstep-76cd35ae-8050-4987-9381-32c9fde784e4",
+ "853993e9-8e61-43c9-bdbc-ad0fc3191f57": "services/auth/source/ldap/source_search.go-simstep-2baf8794-62c5-44b8-a564-f3193c532ccd",
+ "ef8eb7fc-c748-4b9c-8470-320a6a13cb97": "services/auth/source/ldap/source_authenticate.go-simstep-afbb7d9a-0643-4796-8ca2-8fe72357bc0e",
+ "a7b7c2b5-0068-46f0-b82c-1eacee946cdb": "routers/web/auth/auth.go-simstep-0af9a86b-2996-4b9e-8e2b-1904f42e63ac",
+ "7550ab04-4827-4480-813b-04b0047c3f97": "generated-edge-simstep-239f8b69-e2d2-4da7-b3b3-3e2ceef5c2ac-7550ab04-4827-4480-813b-04b0047c3f97",
+ "8d11a7b1-41ba-4b05-892c-c1581a535365": "generated-edge-simstep-57392fc2-e13c-4477-8980-4443ef60742e-8d11a7b1-41ba-4b05-892c-c1581a535365",
+ "7a2c7f85-74cf-40f2-b9a6-10d85ac527df": "generated-edge-simstep-633c6f49-102e-4305-8433-7a69053a1f09-7a2c7f85-74cf-40f2-b9a6-10d85ac527df",
+ "9480a9ba-eeb9-4aad-85a3-aa830b1e46dc": "generated-edge-simstep-89a427cc-153d-4b8a-8e5f-e983710a2751-9480a9ba-eeb9-4aad-85a3-aa830b1e46dc",
+ "c1ce39a1-0844-41af-b3b5-42105f03de44": "generated-edge-simstep-cb0c2053-812b-4828-b712-5b39c702a738-c1ce39a1-0844-41af-b3b5-42105f03de44",
+ "98842aae-5f17-4c78-810f-775eb06c4e94": "generated-edge-simstep-9957a28c-8e0c-4530-94a5-136e7aaa1130-98842aae-5f17-4c78-810f-775eb06c4e94",
+ "f8ce50e7-326c-495a-8afa-5052ad817766": "generated-edge-simstep-35ca6447-1574-4dbb-b6b7-5dc9f0d4abca-f8ce50e7-326c-495a-8afa-5052ad817766",
+ "f303d583-ee5b-4623-943e-60565b1e9631": "services/cron",
+ "be189c27-22c4-488a-95ee-4106d357a6a1": "services/mirror",
+ "107d36b9-9cb1-45ca-8663-314abeddd662": "services/repository/fork.go",
+ "d32cb5cb-563a-45af-8d4c-9abf1317a647": "services/cron/tasks_basic.go",
+ "6b12a694-4b0c-4f03-a4f0-100770e8e8db": "services/mirror/mirror.go",
+ "4d118f1a-fbc0-48e8-ac1c-1d9d6a6f9175": "services/mirror/queue.go",
+ "81c9d8c9-e4be-49a9-b19a-3274140914b3": "services/mirror/mirror_pull.go",
+ "d86b1308-1a5b-4a28-8842-a0e4d633ad62": "routers/api/v1/repo/fork.go",
+ "b27685e7-6df0-4c06-a0b1-00beb27c86c3": "routers/api/v1/repo/fork.go-simstep-db85ab4c-6720-4017-bf0f-aaba20353724",
+ "914714c3-26ca-4e05-87fb-5ba226f7e4c3": "services/repository/fork.go-simstep-11f9bf8c-700e-46aa-864c-c8d401074487",
+ "b7a0a93a-d46e-473a-a07f-7da223c55a95": "services/notify/notify.go-simstep-ddb168e8-da57-418a-82f2-28b2b22dae09",
+ "417f8e37-4b9a-4ef5-997d-c88421fb0ec2": "services/webhook/notifier.go-simstep-24889f3c-0f56-4418-9dce-63d75388b45d",
+ "9e7ba7fa-caa3-41e2-ac5f-373890d534ab": "services/cron/tasks_basic.go-simstep-e70de2fd-29c5-4cb6-813c-264a2a622b2d",
+ "43d0c4c2-5f6a-46e7-b1f1-c8859c97ab4f": "services/mirror/mirror.go-simstep-f00d42da-34d8-4564-a701-73b37241bc1e",
+ "ae6f102c-562a-4665-b562-b86cc0aac8d1": "services/mirror/mirror_pull.go-simstep-1d09c452-183e-4857-aef6-9f0e66f0224a",
+ "0d0951da-962a-47bf-aaf1-da7ba73163d8": "generated-edge-simstep-93cbc173-2cab-414f-b3d6-f0ea878c93c3-0d0951da-962a-47bf-aaf1-da7ba73163d8",
+ "9413f317-6cff-4edf-acc6-f2cf0ba9b669": "generated-edge-simstep-512e90f0-0392-437f-99f2-49d7e291d597-9413f317-6cff-4edf-acc6-f2cf0ba9b669",
+ "6fa84983-5d43-48e3-a028-9729688c1a00": "generated-edge-simstep-4fd9e36f-4d1d-4083-a6ed-8184c7eefa94-6fa84983-5d43-48e3-a028-9729688c1a00",
+ "993d56ee-fde7-459d-963c-783f748e62d9": "generated-edge-simstep-aba987db-5d57-4f81-a947-2f3e9df1cb98-993d56ee-fde7-459d-963c-783f748e62d9",
+ "276130b8-05bb-4961-9852-c0084d6c73c2": "generated-edge-simstep-fad04734-cb78-4c64-aae2-84c8eadf98fc-276130b8-05bb-4961-9852-c0084d6c73c2",
+ "47c57001-a9f1-4b7e-9db5-d6a23bb48f72": "services/wiki",
+ "709e822a-a82a-4608-9a45-af356bc74660": "services/release",
+ "79b6908f-15a8-4264-a79f-e311b37d277d": "services/wiki/wiki.go",
+ "c150bfc9-bce2-4250-b468-2b5a81f74e87": "services/release/release.go",
+ "5c010790-dade-4ba3-a3dd-bb0cd571fcc6": "routers/web/repo/wiki.go",
+ "50fc0867-77a6-428d-9687-0377657129cf": "routers/web/repo/release.go",
+ "a6a31b25-0e4c-4044-8c56-1a79bf2ab773": "routers/web/repo/wiki.go-simstep-90a80659-4a4f-4034-aab4-d0bfbc1febb4",
+ "c20c49a4-694f-4fbd-b9e1-b23b134f1cce": "routers/web/repo/wiki.go-simstep-c33becb1-0fbc-4f7b-8985-6b66630e84de",
+ "5c1d4e84-2b24-4364-892a-ad94f5c6a976": "services/wiki/wiki.go-simstep-c97445dd-e5af-4fda-88f8-5239054437b7",
+ "7bba84d2-67d7-498d-87aa-84adf217d67f": "routers/web/repo/release.go-simstep-b0a7c3ca-22a2-4429-9878-dee03f0f4bfd",
+ "03e91619-5b13-4a9e-bbb2-f6c6b1eceded": "services/release/release.go-simstep-5873640f-cd1c-4bc5-9bc2-9e9df60bd7a9",
+ "12f0bfb6-ed6a-4188-aeb6-a73fbe6396bc": "routers/web/repo/release.go-simstep-c0e8827d-f756-4a38-b12b-9c6efca47dc5",
+ "8193e97d-e40a-41c9-a7c8-9cbd387fce1f": "generated-edge-simstep-f24840a6-8e6c-477d-809c-6e439aeb1b11-8193e97d-e40a-41c9-a7c8-9cbd387fce1f",
+ "50736740-a7a3-4d4c-88fd-d4da1101ddea": "generated-edge-simstep-692694e8-777e-401d-b21e-360370dee044-50736740-a7a3-4d4c-88fd-d4da1101ddea",
+ "487df556-8b83-4f98-b884-7c63790cd423": "generated-edge-simstep-1141ab5f-0065-42c1-9962-a4bec03d49f6-487df556-8b83-4f98-b884-7c63790cd423",
+ "db8a1c5b-17b2-4592-a064-763fdf405b2e": "generated-edge-simstep-1179818d-832c-4e69-adb1-5ea7983edcce-db8a1c5b-17b2-4592-a064-763fdf405b2e",
+ "24cfd71c-fdb5-4fc3-a833-90fa4d372f79": "generated-edge-simstep-b30def5e-bb2a-4464-a9cb-f0faa2e68234-24cfd71c-fdb5-4fc3-a833-90fa4d372f79"
+ }
+}
\ No newline at end of file