Resolved branch revision in Source Extension Point (#1803)

This adds the "resolved revision" of the HEAD (of the current branch, if branches are supported) to the extension point repos.sources.extensions. This "resolved revision" holds the current HEAD revision of the repository (or the selected branch, if branches are supported). This means you can check, whether the release has changed since an extension has been rendered for the first time.

Co-authored-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
This commit is contained in:
René Pfeuffer
2021-10-20 13:29:47 +02:00
committed by GitHub
parent d41b293109
commit 27b9d2c78a
14 changed files with 217 additions and 32 deletions

View File

@@ -25,7 +25,7 @@ import { Branch, Changeset, ChangesetCollection, NamespaceAndName, Repository }
import { useQuery, useQueryClient } from "react-query";
import { requiredLink } from "./links";
import { apiClient } from "./apiclient";
import { ApiResult } from "./base";
import { ApiResult, ApiResultWithFetching } from "./base";
import { branchQueryKey, repoQueryKey } from "./keys";
import { concat } from "./urls";
@@ -42,7 +42,7 @@ export const changesetQueryKey = (repository: NamespaceAndName, id: string) => {
export const useChangesets = (
repository: Repository,
request?: UseChangesetsRequest
): ApiResult<ChangesetCollection> => {
): ApiResultWithFetching<ChangesetCollection> => {
const queryClient = useQueryClient();
let link: string;