-
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 11 commits
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| export const OPS_MODAL = { | ||
| TAB_RELEASE: "RELEASE", | ||
| TAB_RELEASE: "Release", | ||
| }; | ||
|
|
||
| export const TAB_RELEASE = { | ||
|
|
||
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
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
22 changes: 22 additions & 0 deletions
22
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,22 @@ | ||
| import React from "react"; | ||
| import TabReleaseView from "./TabReleaseView"; | ||
| import usePretag from "git/hooks/usePretag"; | ||
| import useReleaseTag from "git/hooks/useReleaseTag"; | ||
|
|
||
| function TabRelease() { | ||
| const { fetchPretag, pretagResponse } = usePretag(); | ||
| const { createReleaseTag, isCreateReleaseTagLoading } = useReleaseTag(); | ||
|
|
||
| const latestCommitSHA = pretagResponse?.hash ?? null; | ||
|
|
||
| return ( | ||
| <TabReleaseView | ||
| createReleaseTag={createReleaseTag} | ||
| fetchPretag={fetchPretag} | ||
| isCreateReleaseTagLoading={isCreateReleaseTagLoading} | ||
| latestCommitSHA={latestCommitSHA} | ||
| /> | ||
| ); | ||
| } | ||
|
|
||
| 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 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| import { GitArtifactType } from "git/constants/enums"; | ||
| import type { GitArtifactDef } from "git/types"; | ||
|
|
||
| function isGitTaggingEnabled(artifactDef: GitArtifactDef | null) { | ||
| if (artifactDef?.artifactType === GitArtifactType.Package) { | ||
| return true; | ||
| } | ||
|
|
||
| return false; | ||
| } | ||
|
|
||
| export default isGitTaggingEnabled; |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we check for the presence of
releaseVersionand then only dispatch this action?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But that would silently fail without an error :(
Will be hard to debug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can throw an error but would making this call with empty releaseVersion would also throw an error then we are fine but throwing error early would be pre-emptive
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The api will throw an error in this case
Also, the button is disabled when these values are not available. So, I don't think this case will ever get realised.
Had to add nullish coalescing because typescript