Skip to content

Assigning PRs to merger doesn't work when they're auto-merged #2137

@jsoref

Description

@jsoref

A bunch of [@jsoref's] PRs are assigned to the people who merged them. It feels like the automation hasn't contemplated that PRs would be written by people who can't/won't be the people who will click the "merge" button.

This is intentional:

# Get the person who merged the pull request.
# For most cases this will be the same as the author, but for PRs opened
# by external contributors getting the merger will get us the GitHub
# employee who reviewed and merged the PR.
def get_merger_of_pr(repo, pr):
return repo.get_commit(pr.merge_commit_sha).author.login

More interesting is that this approach seems to break when enabling auto-merge as can be seen here:
(merged by @angelapwen but PR is from @jsoref)

#2110 (@jsoref)

Originally posted by @intrigus-lgtm in #2131 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions