Assign yourself as a reviewer of your own pull request #6292
Replies: 44 comments 34 replies
-
If it's your own pull you probably don't need to assign a particular reviewer, considering you can just review it yourself without assignment. |
Beta Was this translation helpful? Give feedback.
-
There are definitely other reasons that this should be supported. My immediate example is: If you create an MR using a branch developed by someone else, but still want to follow a standardized review process with proper assignments. |
Beta Was this translation helpful? Give feedback.
-
I am lead in my repo and created a pull request for a commit from another junior dev. He was not able to do it so I wanted to do it for him so I could get the ball rolling. Now I cannot review the pull request because I technically initiated it. Seems all GitHub has to do is take out the condition that the requester cannot be in the reviewers group. Just my two cents. |
Beta Was this translation helpful? Give feedback.
-
Another use case for reviewing your own PR: I created a PR for a repo where I'm a collaborator. I then worked with the owner to implement some changes, but in the process I noticed a likely mistaken change that should be resolved before a merge. Specifically, a |
Beta Was this translation helpful? Give feedback.
-
Now that there is a YOLO badge for people who let un-reviewed PRs go through, I'm being publically shamed for creating reviews for myself that I cannot approve. 😄 |
Beta Was this translation helpful? Give feedback.
-
The SLSA framework allows for trusted contributors to be 1 of 2 minimum reviewers on merges. It still protects against un-validated submissions, but does cut the red tape somewhat for senior team members and alleviate staffing requirements or people doing things not really part of their role. I'd love to see support in Github to assign this by team membership. |
Beta Was this translation helpful? Give feedback.
-
It remains extremely short-sighted that this is not possible. |
Beta Was this translation helpful? Give feedback.
-
Alternative suggestion: Create the PR as draft, then turn it into a real request. Possibly, you could fetch that type of event to check for a "final" PR to be merged and consider it as reviewed. |
Beta Was this translation helpful? Give feedback.
-
I want to do the same myself. I am the owner and sole contributor. But I want to learn more about the GitHub process. |
Beta Was this translation helpful? Give feedback.
-
I have found the solution works for me; I am the only one working in the repository, so it may not be appropriate for other situations. On the settings page, select "Branches". Select "Edit" in the Branch Protection Rule.
|
Beta Was this translation helpful? Give feedback.
-
Don't know ! but count me in, I wanna review myself :) |
Beta Was this translation helpful? Give feedback.
-
Seconded, another good use case is automated pull request workflows, the author (a bot in this case) should be able to approve it's own PR if it's something trivial and checks all pass. |
Beta Was this translation helpful? Give feedback.
-
I don't think that auto-approving pull requests is a good idea. I think a
human should be involved in approving pull requests. What happens if
automation breaks the build process?
Ralph
…On Mon, Dec 12, 2022, 6:53 AM Rees Pozzi ***@***.***> wrote:
Seconded, another good use case is automated pull request workflows, the
author (a bot in this case) should be able to approve it's own PR if it's
something trivial and checks all pass.
It would be nice to keep the required reviews in place for PR's authored
by humans, but allow complete auto-merge functionality for bots
—
Reply to this email directly, view it on GitHub
<#6292 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHZ2PYWBE5ABAXX3IUYA3V3WM4G2JANCNFSM5F5L4RWQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Throwing my 2c into this for a use case. I'm currently the only dev at a small biz and trying to setup the dev pipeline to be compliant with a number of industry certifications. Most of those, around the area of change management, require some approval process for changes into production (which I use a CI pipeline based off the master branch to do). I would be nice if self approval worked out of the box as that would allow a process to be in place that scales right out of the box and is consistent. |
Beta Was this translation helpful? Give feedback.
-
One more thing besides all of the other comments: |
Beta Was this translation helpful? Give feedback.
-
I second this feature. Working with small teams, I can immediately see the benefits of being able to self approve PR. |
Beta Was this translation helpful? Give feedback.
-
+1 :) moving from gitlab to github this is a bit of a pita. |
Beta Was this translation helpful? Give feedback.
-
+1 would be nice for best practice. or assigning myself as the only one who can approve their own requests, with my teammates requiring a review. |
Beta Was this translation helpful? Give feedback.
-
It is not an answer but to prevent my self to click on merge to easily I now open my pull request as 'draft' so that I at least need to press "Ready for review" ... Cli : gh pr create --draft ... |
Beta Was this translation helpful? Give feedback.
-
It's 2024, no solution yet. Is anyone at GitHub listening? Or shall we all just switch to GitLab? |
Beta Was this translation helpful? Give feedback.
-
We're a small team, and don't have the time or resources to have other members approve PR Github, anyone out there?? Listen to your community!! |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
It is definitely surprising, the attention of this feature request, but no response to it. Unless GitHub has some super weird architecture, shouldn't they just have to remove the check... |
Beta Was this translation helpful? Give feedback.
-
We solved this by adding a GitHub action. Here is the Yaml File name: Auto Approve PR jobs:
|
Beta Was this translation helpful? Give feedback.
-
I might be completely wrong with what I am talking about here. If you're working on a GitHub project and need to approve your own pull requests, there’s a simple and effective way to automate the process using GitHub Actions. By setting up a workflow, you can trigger an approval when you add a specific comment (like -APPROVED-) to your pull request. This approach works perfectly for solo developers or small teams, where waiting for another reviewer isn't practical. The workflow uses a GitHub token to authenticate the action and programmatically approves the PR, keeping your process efficient and compliant with any automated pipelines or branch protection rules you’ve set up. It’s a seamless way to maintain a formal review process while ensuring you don’t get stuck in unnecessary bottlenecks. |
Beta Was this translation helpful? Give feedback.
-
name: Auto Approve Pull Request jobs:
|
Beta Was this translation helpful? Give feedback.
-
So many people revisit this request but the GitHub team doesn't care... Is it that difficult to remove the code that removes the PR initiator from the list of reviewer candidates? I wonder what is actually blocking this from being implemented. |
Beta Was this translation helpful? Give feedback.
-
I'm a bit late to the party, but I really want this as well! I'd use it the way others have suggested, but another interesting use case is for AI, with cursor in YOLO mode I can assign an agent an issue and it will create a branch, attempt to solve the issue, test the changes and then make a PR. The problem is since my account is the one that creates the PR I'm unable to review the code generated by the AI. If I could, I would simply review it like I would any PR and then send it back to the agent with changes requested, but now I have to tell the AI what to change using a prompt. I'm guessing something similar could apply to GitHub copilot too. Please implement the ability to review your own PR! Would be such an easy and useful change! |
Beta Was this translation helpful? Give feedback.
-
GitHub PR's aren't feature complete until this is resolved. This restriction doesn't seem to benefit anyone. |
Beta Was this translation helpful? Give feedback.
-
It may sound weird, but there are cases where I wanted to review myself. Is there any reason why the creator of a given pull request cannot be assigned as a reviewer?
Beta Was this translation helpful? Give feedback.
All reactions