-
Notifications
You must be signed in to change notification settings - Fork 218
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
Kucalc: API copy status, Take 2 #3986
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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 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 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 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 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 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,29 @@ | ||
#!/usr/bin/env bash | ||
# silly helper script to remind hsy how to query the DB from withing a cc-in-cc project | ||
|
||
set -evx | ||
|
||
PORT=${PORT:-56754} | ||
CCinCC=${CCinCC:-"14eed217-2d3c-4975-a381-b69edcb40e0e"} | ||
|
||
API=http://localhost:$PORT/$CCinCC/port/$PORT/api/v1 | ||
Q() { | ||
curl -X POST -u $KEY: $@ | ||
} | ||
|
||
KEY=sk_XB003g8HHcyT1y4S3T5w9IW2 | ||
|
||
## issue copy, needs hub in "kucalc" mode (if this works at all, though) | ||
SRC=bc6f81b3-25ad-4d58-ae4a-65649fae4fa5 | ||
TAR=e24ba30d-edcd-479f-8a26-bbe81f38296c | ||
PTH=x.md | ||
Q -d src_project_id=$SRC -d src_path=$PTH -d target_project_id=$TAR -d wait_until_done=false $API/copy_path_between_projects | ||
|
||
|
||
## status | ||
## TODO: use jq to extract the copy_path_id from above, query, wait a few secs, and then query it again | ||
PATHID=002cdde3-e79c-4d46-a759-f6464a5360c9 | ||
Q -d copy_path_id=$PATHID $API/copy_path_status | ||
|
||
echo "double check DB" | ||
psql -x -c "SELECT * FROM copy_paths WHERE id = '$PATHID';" |
This file contains 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.
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.
Everything looks good, but I don't understand why you made this default a STRING
'true'
and not just the booleantrue
?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.
maybe I don't know how to use
curl -X POST -d key=true
, but when I do that, I get a string. I wanted to make this consistent with what's coming in, that's all. The code itself checks for boolean val or the default string.