Page MenuHomePhabricator

create repo via conduit

Authored By
faulconbridge
Nov 29 2016, 5:53 PM
Size
1 KB
Referenced Files
None
Subscribers
None

create repo via conduit

################################################################################
#
# Track repository in Phabricator
#
################################################################################
echo "$STR"
echo "-------------------------------------------"
echo "--------- Tracking in Phabricator ---------"
echo "-------------------------------------------"
# Create the repository and store json response
# so we can snag some relevant info later on
thisRepository=$(echo "{
\"transactions\": [
{
\"type\": \"name\",
\"value\": \"${project}\"
},
{
\"type\": \"vcs\",
\"value\": \"git\"
},
{
\"type\": \"callsign\",
\"value\": \"${callsign}\"
},
{
\"type\": \"defaultBranch\",
\"value\": \"master\"
}
]
}" | arc call-conduit \
--conduit-uri https://phabricator.example.com \
--conduit-token ${conduitToken} \
diffusion.repository.edit)
#####
#
# some time later...
#
#####
echo "{
\"transactions\": [
{
\"type\": \"repository\",
\"value\": \"${repoPHID}\"
},
{
\"type\": \"uri\",
\"value\": \"ssh://phab@external.website.net/path/${repoName}.git\"
},
{
\"type\": \"credential\",
\"value\": \"PHID-CDTL-abcdefghijklmnopqrst\"
},
{
\"type\": \"io\",
\"value\": \"observe\"
},
{
\"type\": \"display\",
\"value\": \"never\"
},
{
\"type\": \"disable\",
\"value\": false
}
]
}" | arc call-conduit \
--conduit-uri https://phabricator.example.com \
--conduit-token ${conduitToken} \
diffusion.uri.edit

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
349352
Default Alt Text
create repo via conduit (1 KB)

Event Timeline