How to get all reviewers using GitHub REST API? - api

When I make REST GET to my repository by this path
https://api.github.com/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers
I get not all reviewers assigned to PR.
I receive only those who did nothing with review. For example, I have PR with reviewers A, B, C and D.
After creation PR A requested some changes, C approved pull request, B and D did nothing. If I get requested_reviewers three will be only B and D, but I need all of them.

The way to get A and C is
https://api.github.com/repos/{owner}/{repo}/pulls/{pull_number}/reviews
You will get all active reviews, and state will show is it APPROVED or CHANGES_REQUESTED

Related

Optaplanner:Add Dynamic visits without changing the already created visits

I am saving the best solution into the DB, and we display that on the web page. I am looking for some solution where a user can add more visits, but that should not change already published trips.
I have checked the documentation and found ProblemFactChange can be used, but only when the solver is already running.
In my case solver is already terminated and the solution is also published. Now I want to add more visits to the vehicle without modifying the existing visits of the Vehicle. Is this possible with Optaplanner? if yes any example of documentation would be very helpful.
You can use PlanningPin annotation for avoiding unwanted changes.
Optaplanner - Pinned planning entities
If you're not looking for pinning (see Ismail's excellent answer), take a look at the OptaPlanner School Timetabling example, which allows adding lessons between solver runs. The lessons simply get stored in the database and then get loaded when the solver starts.
The difficulty with VRP is the chained model complexity (we're working on an alternative): If you add a visit X between A and B, then make sure that afterwards A.next = X, B.previous = X, X.previous = A, X.next = B and X.vehicle = A.vehicle. Not the mention the arrival times etc.
My suggestion would be to resolve what is left after the changes have been introduced. Let's say you are you visited half of your destinations (A -> B -> C) but not yet (C - > D -> E) when two new possible destinations (D' and E') are introduced. Would not this be the same thing as you are starting in C and trying plan for D, D', E and E'? The solution needs to be updated on the progress though so the remainder + changes can be input to the next solution.
Just my two cent.

Forward every third email to a given person

I need something (script, rule) that would forward every third email that comes to my account to some other email address. But I need this to be able to run even when the Outlook/PC is closed/ turned off.
Is it possible to do that?
It's third message to one given person. So every message counts as "third"
- first go to person A, second to person B and third to person C, fourth to person A, fifth to person B etc etc...
Well if I could manage to create the script being server side I would imagine doing something like:
do 3 rules:
Received message = Send message to person A, delete it, turn rule 2
on and turn itself off
Received message = Send message to person B,
delete it, turn rule 3 on and turn itself off
Received message =
Send message to person C, delete it, turn rule 1 on and turn itself
off
This should work, I just don't know if it is possible to make it server-side so Outlook doesn't have to be running.
This would only be possible with a client side rule, which will not run when Outlook is not running. So, no, you cannot do that.

HL7 ORU sending edits

I use HL7 ORU message to send clinical notes. At present, I just send notes as they are created and saved. But now I need to support edit and delete of the notes and convey the same to the receiving system.
How can I achieve edit / delete with this? I use ORU^R01 structure and use OBR and multiple OBX segments for my information. Thanks.
You will need to confirm with the receiving system how they want edits and deletes conveyed to them. But it is common to use the result status code in OBR-25 and/or the observation result status code in OBX-11.
For example, if the clinical note is edited (aka. corrected or modified) send a C in OBR-25. If the clinical note is deleted send a X in OBR-25. Ultimately you will need to coordinate with the receiving system.
FWIW, I commonly see these values in OBR-25:
P = preliminary
F = final
C = corrected / modified
X = cancelled / deleted / in-error

Rule engine for User notification

There are event Object which will have following properties:
Type = can take A, B, C etc as values
Source = can take X, Y, Z etc as values
status = 1, 2, 3 etc as values
Now there can be several users. Each one can register for different conditions to receive notifications when an event is received.
The condition can be:
type = A alone ,
type = A and Source = X and status -3,
or type = C or status = 3 and source = z.
I can handle it in Java but is there any simple framwork which can handle it.
I searched on Google and there are plenty of framework which gives an idea on how to apply conditions but I was not able to see how to correlate to users.
Do I need to apply the conditions given for each users for each event. Is there any smart condition pooling mechanism through which I can get the target users with less iterations.
Appreciate any pointers.

commiting to branch which is itself a checkout branch

I have repo located at A, of which I did a checkout to B, which I checked out to C (so C is bound to B and B to A).
I did some changes in C, did bzr commit on B, but I do not seem to see changes in B automatically.
Is this an expected behavior or did I screw something up without knowing?
Checkouts of checkouts are not supported, and Bazaar will generally refuse to do bind to a branch that is already bound to something else.
How did you create C, is it actually bound to B ? "bzr info C" should tell you.