Why am I able to push and send/receive pull requests but not on the contributor list in github? - 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.

Related

Do you lose contributions of a project if you get removed from this project?

I can't seemed to find this information anywhere, but just wanna ask that if you are a contributor of a project and you worked on it so you can see all of those contributions on the chart, but then for whatever reason the owner of the project removed you, do you lose all of those contributions? as in will those green contribution grids(the days you work on it) go back to grey?
No, the contributions are based on the commit email ID, and do not have anything to do with the corresponding GitHub account having access to the repository. GitHub attributes a commit to a particular account if the email ID used with the commit is registered under that account.
So, unless the email IDs of past commits are in some way changed later, the contributions will still be visible, as long as the repository is public.
This also works the other way around. Anyone can set any email ID in their git configuration while committing, so it is trivial to falsely attribute commits to someone else, when viewing the contribution chart in GitHub.

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

Accepted merge requests author not shown as contributor

Recently I've started a new open source android project on GitHub (Open Weather App). One person forked the repository and made some changes, then he created a pull request and I accepted it by pressing this green button:
Everything worked just fine, the pull request was merged into master. However, the problem is that he did not appear in the contributors list. It still does say 1 contributor, which is me:
What could be the reason for him not to appear on the list, and how can I solve this issue?
I feel responsibility for him. I even added him to collaborators list, yet he still does not appear as a contributor.
At Contributions that are counted are 3 points listed which must be met by a contributor:
I checked your repo and the pull request and it seems like this point is not met:
The email address used for the commits is associated with your GitHub
account
Are you sure it is not described here?
Why are my contributions not showing up on my profile?

How to create a repository where each change requires the agreement of both partners?

Two partners are building a software project. They want that each change made by one partner must be approved by the other partner.
If one of them opens a GitHub repository and makes the other one a collaborator, then both of them can change the repository without consent from the other partner. They can also ask for consent by doing the change in a branch and then doing a pull-request on the branch, but the system does not force them to do it, so they might forget.
If one of them opens a GitHub repository and does NOT make the other partner a collaborator, then the second partner must make a pull request for each change, but the first partner can still make changes without the other partner reviewing them.
Is it possible to create a repository such that, each change by one of the partners only becomes public after the other partner approves it?
I don't think such feature exists yet in Github AFAIK. But I think something like this works.
Create another account either a dummy or a bot account
Create repository from the dummy/bot account
Since you both are not collaborators, you need to fork the repository and issue pull requests no matter what.
There is a minor correction to what you said though
If one of them opens a GitHub repository and does not make the other partner a collaborator, then the second partner must make a pull request for each change, but the first partner can still make changes without the other partner reviewing them.
If you make your partner a collaborator then he too can push code to master without a pull request.
PS: Honestly, I don't think this question is supposed to be on StackOverflow.

Can I associate a GitHub user with his commits by name only, BitBucket-style?

I've seen Github shows name instead of a linked username in commits and I realise that the right thing to do is to link by email. However, I already have a repository with a whole bunch of commits whose email is "none#none".
On BitBucket, I can specify a per-project mapping of committer name to BitBucket account, and this has worked well enough. Is there anything like this on GitHub?
If not, what other options are there, short of leaving the commits unlinked and rewriting the entire history?
You can use .mailmap file in your repo, for mail aliased (as stated in "“Alias” git authors/committers?")
You also can add another email in your Email setting account.
But both solutions don't scale well when several authors use the same none#none email.