Force code review of a team member - EGit - egit

I have a repository in GitHub and I connected it to my eclipse git.
Now I want to share it with my friends so we can update the code together.
The problem is that every one of my friends can push anything to the remote master without supervision.
I want to force one of my team members to approve a commit before she gets pushed to the master, like code review or something.
What are my options and how can I accomplish them ?
Thanks,
ben

For my understanding, GitHub uses pull request for code review and code merge. If your friends want to push code, they should first fork your repository, push code to their forked repository and create pull request for review.

Related

Change the target branch of an existing pull request to another fork

I forked a repository A.. say B
I created a pull request from branch B.branch1 TO B.master
The pull request got some review comments.. I resolve them and so on..
I now want to change the base from B.master to A.master(parent repo)
How can I do this in case of an existing PR?
Since I am not seeing the option to change the base branch to another repo..
I know I can create a new pull request but that would lose all the review conversation.
A pull request is an entity that is tied to the repository it was created in. Other repositories (even if forked from the original repository) may have other rules regarding pull requests, code reviews or repository access in general. The developers giving you a code review in fork A might even not be able to do so in fork B.
Therefore you can not move your pull request to another repository.
I suggest you close your current pull request and open a new one. You can link to the old PR and explain the situation so people can still see the code review conversation that was going on in the original PR.

Why am I able to push and send/receive pull requests but not on the contributor list in github?

I'm been working in a team of four. I'm in the collaborator list. I'm able to commit, push, send pull requests and merge in our repo. My teammates can see my changes, but everyone is on the contributor list except me.
I double checked my email address, make sure the email I used in my local setting is the same with my default email in the github account.
We have changed the owner of the project once, and I'm still using the old url. Is this the reason for that?
I found the github has a complex rule for you be considered as a contributor. Here's the doc of it.
https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-settings-on-your-profile/why-are-my-contributions-not-showing-up-on-my-profile
You have to commit to the main/default branch or make pull requests. To commit into other branches won't count.
Also, to use the old project url is definately one problem. In the project insight, everyone's profile is linked with their username. While mine is only a username with no user icon.
I think I just accidentally hit into one of the corner cases, but I'm still very confused of this design pattern.

Subscribing to a git repository on slack

Can someone tell me like I'm 5 on subscribing to a git repository on slack? My google-fu is not giving any answers.
I have five repositories, none of which I'm the owner on. I want a slack notification when there's a push to these repositories. If I type /github help I get a list of commands and it says I should be able to subscribe by "/github subscribe owner/repository"
I'm not sure which people on my team "own" the repository and I'm not sure where this information is in github.
I read somewhere I could just do /github subscribe and paste the full https link, but I get this back
If I click Install button I get a page that says "Where do you want to install slack?"
If I select configure under my github main repo, I get this:
If I start adding repositories, everyone on my team gets an email notification to add slack to github. I don't get an email notification. Nothing happens at all. Then everyone in the company pings me asking me why they're getting slack/github notifications. To prevent further humiliation, I just stopped trying to add the repo. I'd still like to add it though.
I should be able to subscribe by "/github subscribe owner/repository"
I'm not sure which people on my team "own" the repository and I'm not sure where this information is in github.
I just wanted to help with this part, since I recently had to figure that same thing out. The owner is the organization that your repositories belong to. So, lets say you have a repo named "RepoOne". If you click into that repo, the URL in the address bar should show: "https://github.com/[owner]/RepoOne"
So, you should be able to copy the owner and repo name from your URL and use it in the command as follows:
/github subscribe [owner]/RepoOne
Keep in mind, that only subscribes you to the isssues, pulls, commits, releases, and deployments. I like to include the reviews and comments too, so I go with:
/github subscribe [owner]/RepoOne reviews comments

Approve changes in github

I have a git enterprise in my company and we have a system like this documentation for review the pull request before merging into master. But here is coming a problem. People are reviewing when the branch is still in progress.
How I can do, to remove review after a new commit was done in a branch?, or check that the review is the last thing before have the button of merge pull request green?
Thanks!
You can add a tag "work in progress" on the pull request.
https://help.github.com/articles/working-with-tags/

Can I modify someone else's pull request and push it back in its branch?

GitHub explains you can fork, modify, commit, push and trigger a pull request. They also explain that you can still modify, commit, push and the request is updated on the website.
I would like to know if it is possible to do the exact same thing but not being the author of the fork? I am the owner of a repo with pull requests I would like to correct myself but still discuss afterwards... I was trying to push my changes into the author's repo (thinking some right access would be calculated) but the access is denied.
When creating a pull request (PR) on GitHub, you can select the option that maintainers are allowed to commit changes to your PR. You can also do this after the PR is already created: In the detail view of the PR, on the lower right, under "Unsubscribe", "participants". So if you want to commit to a PR of someone else on a GitHub repository you own: Ask them to give you this permission.
From the GitHub help pages: "Only pull request creators can give upstream repository maintainers, or those with push access to the upstream repository, permission to make commits to their pull request's compare branch." (Allowing changes to a pull request branch created from a fork)
Unfortunately, as far as I know, in order for someone to commit to the PR, you would have to give them write access to the repository and can't just selectively give them write access to the PR.
Official GitHub support answer at this date
It would be up to the owner of the forked repository to decide if they
want to pull your changes into their fork.
You would modify their Pull Request and merge it into your repository.
You could then request them to pull down the changes you have made
into his fork which would synch his fork with yours.