Using the Gerrit web interface, is it possible to add multiple reviewers at once to a given commit? Currently, it appears that reviewers have to be added one by one: trying to add a list as input fails regardless of how it is separated.
No, it isn't possible to add multiple reviewers at once using Gerrit UI. You have to add one by one or use REST like in this example:
curl --request POST -d#- --header Content-Type:application/json https://GERRIT-SERVER/a/changes/CHANGE-NUMBER/reviewers << EOF
{
"reviewer": "USERNAME1",
"reviewer": "USERNAME2"
}
EOF
Related
When I change the {{contact.channel.address}} number to a different number that I receive form REST Parameters the message will not send.
I am trying to take a POST request that then triggers the Twilio Studio to call a store and tell them they have a new online order. They then press Keys to indicate how long the order will take to process and then I send a message to the customer telling them when to pick up their order.
When I keep the {{contact.channel.address}} the same the code runs correctly but when I change this it doesn't work anymore.
Found this link that says it cannot be changed for outbound call but it is possible to edit for send message
Does anyone know can I do this or is this functionality not support at all?
curl -X POST "URL" -d "To=+1xxxxxxxxxx" -d "From=+1xxxxxxxxxx" -d "Parameters={\"orderid\":\"12345\", \"name\":\"Johen\", \"phone\":\"+1xxxxxxxxxx\"}" -u SID:AUTH
Studio Flow
The {{contact.channel.address}} should be equal to the To you pass in when calling the Studio REST Api URL. In your example, "To=+1xxxxxxxxxx".
I am working on automating the code review process in my team.
My objectives are:
When a review is created, assign it to two random developers
Automatically update the JIRA item, and assign them to the developers who were assigned as reviewers in Upsource
I was able to achieve objective #1 using Upsource Custom Workflows.
For the second objective, I have tried looking at Upsource Webhooks and JIRA Cloud REST API, but I fail to see how to assign a JIRA item from Upsource. JIRA's API specifies that in order to assign an item using REST, we need to create PUT request to this method:
PUT /rest/api/2/issue/{issueIdOrKey}/assignee
How can I create a PUT request from Upsource Webhooks?
How can I extract the {issueIDOrKey} from the originating Upsource review?
How can I create a PUT request from Upsource Webhooks?
Upsource webhooks send only POST requests at the moment. But I don't see how this limitation is blocking your task, because as I understand there has to be a service that'll translate Upsource payload to JIRA payload. That service should make a PUT request.
How can I extract the {issueIDOrKey} from the originating Upsource review?
Upsource provides an API for this. getReviewDetails method allows to get a list of issues associated with a given review (see this message spec).
I am writting a custom slack command that implements a
task manager like interface (I know ... there are many out there :-), mine interfaces with odesk/upwork to outsource my micro-tasks :-) ) .
Anyway, I like a lot how the /remind command included Complete Delete etc links in its output to facilitate subsequent interactions with the user that entered the command and I am trying to figure out how to do the same trick.
What I have thought so far is to include links in my output that are ... GET /slack-link?method=POST&token=xxx&team_id=xx&command=.. ie carry in their query string the complete json payload that slack would have produced from a normal custom command. slack-link acts as a "proxy" whose sole role is to submit a POST back to my normal slack endpoint. I can even reuse the same response_url for these command-links.
I have not tried it but I think these URLs will just open another window so that path wont exactly work...
Has anybody tried something like that before?
As you've learned, those are currently only available to built-in commands. However, as I was curious and wanted to know how those are done, I looked in the API and found out that the URLs are just formatted normally but have a special "protocol":
You asked me to remind you to “test”.
_<slack-action://BSLACKBOT/reminders/complete/D01234567/1234//0/0/5678|Mark as complete>
or remind me later: <slack-action://BSLACKBOT/reminders/snooze/D01234567/1234//0/0/5678/15|15 mins> [...]
Clicking on such a link results in an API request to method chat.action, with the following parameters:
bot: BSLACKBOT
payload: reminders/complete/D01234567/1234//0/0/5678
token: xoxs-tokenhere-nowayiampostingithere
So it looks like those URLs have three parts:
<slack-action://BSLACKBOT/reminders/complete/[...]|Mark as complete>
slack-action://: the "protocol" like prefix to let Slack know this is a chat action URL.
BSLACKBOT: the bot which (who?) will receive the payload. Can only be a bot user and the ID must start with B, or the API request will fail with invalid_bot.
the rest of the URL: the payload that gets passed to the bot. It doesn't look like this is parsed nor handled specially by Slack.
This is actually not a new feature, since they used to have API URLs back in late 2013 or early 2014 (I don't remember precisely) which they removed for "security reasons".
It could be interesting to see if we can use chat actions with custom bots, and if so, what we could do with it.
I got the answer from Slack support:
In regard to your original question: currently Slack doesn't provide
the ability to embed 'action' links in our custom integrations. Only
built-in features like /remind can utilize these at the moment. For
external services, you'll need to link to a URL that opens in an
external web browser.
We do hope to provide a similar function for custom integrations in
the future, allowing for interactive messages.
Thanks,
Ben
Given a commit SHA, I'd like to use the GitHub API to determine which pull request it belongs to.
GitHub displays this information on the commit page:
This information isn't in the API response for that commit, however:
curl --silent 'https://api.github.com/repos/hammerlab/pileup.js/commits/ee49f07dba3821109b3cf45404446f434a897558' | grep 328
(nothing)
Is it possible to get this information using the GitHub API? I realize that I could crawl all the recent PRs for the repo, but this seems inefficient.
For context: I'd like to do this from a Travis-CI "push" job, where I have access to the SHA but not any information about whether it's part of a pull request.
It seems to be possible using this new feature in the API v.3:
https://developer.github.com/v3/repos/commits/#list-pull-requests-associated-with-a-commit
This URL now redirects to:
https://docs.github.com/en/rest/reference/repos#list-pull-requests-associated-with-a-commit
This is the syntax:
GET /repos/:owner/:repo/commits/:commit_sha/pulls
It is possible, using the Search API, which supports this feature:
https://help.github.com/articles/searching-issues/#search-by-the-commit-shas-within-a-pull-request
For example:
https://api.github.com/search/issues?q=ee49f07dba3821109b3cf45404446f434a897558
returns a single result, which is this pull request:
https://api.github.com/repos/hammerlab/pileup.js/issues/328
I'm able to retrieve tasks for a workspace assigned to a particular assignee - using curl:
curl -u <api_key>: "https://app.asana.com/api/1.0/tasks?workspace=14916&assignee=me"
However I'd like to be able to search for not just "me" or an id of a user - but "Nobody" as you are able to do in the web interface.
curl -u <api_key>: "https://app.asana.com/api/1.0/tasks?workspace=14916&assignee=Nobody"
Results in an error returned by the server:
assignee: Not an email, ID, or "me": Nobody
Is there an id for "Nobody" that I can use here?
This is currently not supported. We're working on designing a way to expose the power of the Advanced Search in the API, but it's still early in the design phase. We have internal integrations that (for instance) look at a project and find all the unassigned incomplete tasks, but the way we do it is to get all the incomplete tasks (?completed_since=now) and then filter out the ones with assignees on the client. That's obviously not what we'd like to be doing, and there's no way to do it for an entire workspace.
So all I can say it that it's high on our list of API priorities to support this, but we don't yet. Sorry :-(