Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P2020
create repo via conduit
Active
Public
Actions
Authored by
faulconbridge
on Nov 29 2016, 5:30 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Subscribers
None
################################################################################
#
# 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
Event Timeline
faulconbridge
created this paste.
Nov 29 2016, 5:30 PM
faulconbridge
edited the content of this paste.
(Show Details)
faulconbridge
mentioned this in
Z1336: General Chat
.
Nov 29 2016, 5:34 PM
faulconbridge
edited the content of this paste.
(Show Details)
faulconbridge
edited the content of this paste.
(Show Details)
Nov 29 2016, 5:53 PM
Log In to Comment