15

Is it possible to filter pull requests in github by who merged it?

Something like:

is:merged is:pr mergedBy:username

but that doesn't work

EDIT: This was what i came up with (my goal was to create a top list of most active codereviewers in our project):

var result = {};
$.get("/api/v3/repos/atg/atgse/pulls?state=closed&per_page=100", function(pulls){
    pulls.forEach(function(listPullItem){
        $.get(listPullItem.url, function(pull) {
            if (pull && pull.merged_by) {
                result[pull.merged_by.login] = result[pull.merged_by.login] || 0;
                result[pull.merged_by.login] ++;
            }
        });
    });
});

1 Answer 1

8
+50

Since it doesn't seem to be available directly through the GitHub search filters, you would need to list the pull request with the GitHub API, and select only the ones with the merged_by.login you want.
You have an example in this coffee script which is able to parse the JSON answer and iterate through the pull request entries.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.