Provisioning: Include Ref URLs in Job Status (#109464)

* Add URLs to Job spec

* Rename them as RefURLs

* Implement RefURLs for Github

* Add Ref URLs to Jobs

* Worker Test

* Create the branch in the staged writer

* Regenerate Git mock

* Format code

* Consolidate ResourceURLs and RefURLs into one

* Fix broken tests
This commit is contained in:
Roberto Jiménez Sánchez
2025-08-12 11:57:37 +02:00
committed by GitHub
parent 90dfc26b43
commit f2303a8ad9
30 changed files with 2157 additions and 218 deletions
@@ -3135,6 +3135,14 @@
"items": {
"$ref": "#/components/schemas/com.github.grafana.grafana.apps.provisioning.pkg.apis.provisioning.v0alpha1.JobResourceSummary"
}
},
"url": {
"description": "URLs contains URLs for the reference branch or commit if applicable.",
"allOf": [
{
"$ref": "#/components/schemas/com.github.grafana.grafana.apps.provisioning.pkg.apis.provisioning.v0alpha1.RepositoryURLs"
}
]
}
}
},
@@ -3516,6 +3524,27 @@
}
}
},
"com.github.grafana.grafana.apps.provisioning.pkg.apis.provisioning.v0alpha1.RepositoryURLs": {
"type": "object",
"properties": {
"compareURL": {
"description": "Compare this version to the target branch",
"type": "string"
},
"newPullRequestURL": {
"description": "A URL that will create a new pull request for this branch",
"type": "string"
},
"repositoryURL": {
"description": "A URL pointing to the repository this lives in",
"type": "string"
},
"sourceURL": {
"description": "A URL pointing to the file or ref in the repository",
"type": "string"
}
}
},
"com.github.grafana.grafana.apps.provisioning.pkg.apis.provisioning.v0alpha1.ResourceCount": {
"type": "object",
"required": [
@@ -3767,27 +3796,6 @@
}
}
},
"com.github.grafana.grafana.apps.provisioning.pkg.apis.provisioning.v0alpha1.ResourceURLs": {
"type": "object",
"properties": {
"compareURL": {
"description": "Compare this version to the target branch",
"type": "string"
},
"newPullRequestURL": {
"description": "A URL that will create a new pull requeset for this branch",
"type": "string"
},
"repositoryURL": {
"description": "A URL pointing to the repository this lives in",
"type": "string"
},
"sourceURL": {
"description": "A URL pointing to the this file in the repository",
"type": "string"
}
}
},
"com.github.grafana.grafana.apps.provisioning.pkg.apis.provisioning.v0alpha1.ResourceWrapper": {
"description": "This is a container type for any resource type",
"type": "object",
@@ -3855,7 +3863,7 @@
"description": "Typed links for this file (only supported by external systems, github etc)",
"allOf": [
{
"$ref": "#/components/schemas/com.github.grafana.grafana.apps.provisioning.pkg.apis.provisioning.v0alpha1.ResourceURLs"
"$ref": "#/components/schemas/com.github.grafana.grafana.apps.provisioning.pkg.apis.provisioning.v0alpha1.RepositoryURLs"
}
]
}
@@ -4666,6 +4674,9 @@
"description": "Summary of processed actions",
"type": "array",
"items": {}
},
"url": {
"description": "URLs contains URLs for the reference branch or commit if applicable."
}
}
},
@@ -4963,6 +4974,27 @@
}
}
},
"com.github.grafana.grafana.pkg.apis.provisioning.v0alpha1.RepositoryURLs": {
"type": "object",
"properties": {
"compareURL": {
"description": "Compare this version to the target branch",
"type": "string"
},
"newPullRequestURL": {
"description": "A URL that will create a new pull request for this branch",
"type": "string"
},
"repositoryURL": {
"description": "A URL pointing to the repository this lives in",
"type": "string"
},
"sourceURL": {
"description": "A URL pointing to the file or ref in the repository",
"type": "string"
}
}
},
"com.github.grafana.grafana.pkg.apis.provisioning.v0alpha1.RepositoryView": {
"type": "object",
"required": [
@@ -5327,27 +5359,6 @@
}
}
},
"com.github.grafana.grafana.pkg.apis.provisioning.v0alpha1.ResourceURLs": {
"type": "object",
"properties": {
"compareURL": {
"description": "Compare this version to the target branch",
"type": "string"
},
"newPullRequestURL": {
"description": "A URL that will create a new pull requeset for this branch",
"type": "string"
},
"repositoryURL": {
"description": "A URL pointing to the repository this lives in",
"type": "string"
},
"sourceURL": {
"description": "A URL pointing to the this file in the repository",
"type": "string"
}
}
},
"com.github.grafana.grafana.pkg.apis.provisioning.v0alpha1.ResourceWrapper": {
"description": "This is a container type for any resource type",
"type": "object",