-
Notifications
You must be signed in to change notification settings - Fork 4.6k
chore: git tag - fixing contracts for pretag #39581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
c0ed0fa
chore: fixing contracts for pretag
4e8ddf6
chore: pretag payload
bd278c8
chore: adding tagging
5daaa52
chore: adding fixes to release tab
76266a9
chore: hooking action to tag
0e80c41
chore: exporting actions
5b879ac
Merge branch 'release' of github.com:appsmithorg/appsmith into chore/…
6b23151
chore: fixing build issue
5f0a984
chore: fixing build issue
9865631
chore: fixing test cases
08cad2f
chore: fixing tests
277c7f9
Merge branch 'release' of github.com:appsmithorg/appsmith into chore/…
e4c63cb
Merge branch 'release' of github.com:appsmithorg/appsmith into chore/…
e2e1ee0
fix: fixing happy flow for release tab
751c6ee
chore: making tests non flaky
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
app/client/src/git/components/OpsModal/TabRelease/index.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import React from "react"; | ||
| import TabReleaseView from "./TabReleaseView"; | ||
| import usePretag from "git/hooks/usePretag"; | ||
|
|
||
| function TabRelease() { | ||
| const { fetchPretag } = usePretag(); | ||
|
|
||
| return <TabReleaseView fetchPretag={fetchPretag} />; | ||
| } | ||
|
|
||
| export default TabRelease; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| import { useGitContext } from "git/components/GitContextProvider"; | ||
| import useArtifactSelector from "./useArtifactSelector"; | ||
| import { useDispatch } from "react-redux"; | ||
| import { gitArtifactActions } from "git/store/gitArtifactSlice"; | ||
| import { useCallback } from "react"; | ||
| import { selectPretagState } from "git/store/selectors/gitArtifactSelectors"; | ||
|
|
||
| export default function usePretag() { | ||
| const dispatch = useDispatch(); | ||
| const { artifact, artifactDef } = useGitContext(); | ||
| const artifactId = artifact?.id; | ||
|
|
||
| const pretagState = useArtifactSelector(selectPretagState); | ||
|
|
||
| const fetchPretag = useCallback(() => { | ||
| if (artifactDef && artifactId) { | ||
| dispatch(gitArtifactActions.pretagInit({ artifactDef, artifactId })); | ||
| } | ||
| }, [artifactDef, artifactId, dispatch]); | ||
|
|
||
| return { | ||
| pretagResponse: pretagState?.value ?? null, | ||
| isPretagLoading: pretagState?.loading ?? false, | ||
| pretagError: pretagState?.error ?? null, | ||
| fetchPretag, | ||
| }; | ||
| } |
13 changes: 0 additions & 13 deletions
13
app/client/src/git/requests/fetchLatestCommitRequest.types.ts
This file was deleted.
Oops, something went wrong.
6 changes: 3 additions & 3 deletions
6
.../git/requests/fetchLatestCommitRequest.ts → app/client/src/git/requests/pretagRequest.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import type { ApiResponse } from "api/types"; | ||
|
|
||
| export interface PretagResponseData { | ||
| author: { | ||
| name: string; | ||
| email: string; | ||
| }; | ||
| committedAt: string; | ||
| hash: string; | ||
| message: string; | ||
|
|
||
| releaseTagName: string; | ||
| releasedAt: string; | ||
| isReleasable: boolean; | ||
| } | ||
|
|
||
| export type PretagResponse = ApiResponse<PretagResponseData>; |
38 changes: 0 additions & 38 deletions
38
app/client/src/git/store/actions/fetchLatestCommitActions.ts
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| import type { | ||
| GitArtifactErrorPayloadAction, | ||
| GitAsyncSuccessPayload, | ||
| } from "../types"; | ||
| import { createArtifactAction } from "../helpers/createArtifactAction"; | ||
| import type { PretagResponseData } from "git/requests/pretagRequest.types"; | ||
|
|
||
| export interface FetchLatestCommitInitPayload { | ||
| artifactId: string; | ||
| } | ||
|
|
||
| export const pretagInitAction = | ||
| createArtifactAction<FetchLatestCommitInitPayload>((state) => { | ||
| state.apiResponses.pretag.loading = true; | ||
| state.apiResponses.pretag.error = null; | ||
|
|
||
| return state; | ||
| }); | ||
|
brayn003 marked this conversation as resolved.
Outdated
|
||
|
|
||
| export const pretagSuccessAction = createArtifactAction< | ||
| GitAsyncSuccessPayload<PretagResponseData> | ||
| >((state, action) => { | ||
| state.apiResponses.pretag.loading = false; | ||
| state.apiResponses.pretag.value = action.payload.responseData; | ||
|
|
||
| return state; | ||
| }); | ||
|
|
||
| export const pretagErrorAction = createArtifactAction( | ||
| (state, action: GitArtifactErrorPayloadAction) => { | ||
| const { error } = action.payload; | ||
|
|
||
| state.apiResponses.pretag.loading = false; | ||
| state.apiResponses.pretag.error = error; | ||
|
|
||
| return state; | ||
| }, | ||
| ); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.