39

What are some good rules to follow when handling people who want to collaborate on a project that is on your personal repo?

It looks like GitHub doesn't allow fine control of permissions unless it is an organization repo. I looked around and a lot of other projects (specifically browser extensions) still live on the main dev's account. I don't have any reason to doubt the people who want to help, but it might be nice to know what the best practices are.

Should I add everyone as a collaborator? This runs into the issue above where I can't limit permissions.

Should everyone push contributions from their forks? In that case, how would people work together on a particular feature.

top 14 comments
sorted by: hot top controversial new old
[-] atheken@programming.dev 19 points 1 year ago* (last edited 1 year ago)

You might have a look at “CONTRIBUTING.md” files in repos.

  • Set quality standards (no giant PRs, follow documented coding style, include tests for changed functionality, etc).
  • Establish a way to discuss contributing work before they do it. Generally, have them open an issue discussing the proposed change and get buy-in from the maintainer (you) before starting work.
  • document any high-level goals and non-goals in the README.md for the repo, and refer to that when discussing changes. You can always amend it as you discover more about what should be built.

Initially, contributors can fork and send a pull request for you to review and merge. You do not need to give them any write access to the main repository. Be respectful of their time and review PRs promptly.

If multiple people want to collaborate on a branch, they can do that in their fork. In my experience, this is pretty rare, usually you don’t want multiple people committing to the same branch (except for merges to master/main/stable, etc).

If you have a few dedicated contributors that have a history of submitting good quality patches, and alignment with you on your project’s goals, you can invite them to have more control in the main repository, at which point there should be minimal concern about granular controls.

[-] cynber@lemmy.ca 2 points 1 year ago

This is very helpful, thank you! I'll look into setting up more of that sometime

[-] MajorHavoc@lemmy.world 16 points 1 year ago* (last edited 1 year ago)

Should everyone push contributions from their forks?

Yes.

In that case, how would people work together on a particular feature.

They can grant permissions to eachother (and even to you) to commit directly to their forks.

Since their fork isn't the main repo, it is easier to reset and try again if things go sideways.

[-] JackbyDev@programming.dev 3 points 1 year ago* (last edited 1 year ago)

When opening a PR across forks there is an option to allow folks from the target repo to edit the branch. I don't know exactly what it allows but it should allow committing at least.

[-] MajorHavoc@lemmy.world 2 points 1 year ago

Neat. I'll check that out! Thanks!

[-] JackbyDev@programming.dev 3 points 1 year ago

Just fork any repo and make a random change and begin to open a PR. You don't have to actually open one to see the option.

[-] cynber@lemmy.ca 2 points 1 year ago* (last edited 1 year ago)

Good to know, I'll explore some more

Thank you!

[-] glad_cat@lemmy.sdf.org 12 points 1 year ago

Restrict to PR until trust is established.

[-] 0xc0ba17@sh.itjust.works 15 points 1 year ago

I mean even with trust, pull requests are objectively the best way to work as a team.

[-] jelloeater85@lemmy.world 4 points 1 year ago

Sounds like you need branch protection rules, which you only get on paid plans. Setting up a org is also a good idea anyway if you plan on working as a team of more then 1-2 additional folks.

[-] cynber@lemmy.ca 2 points 1 year ago

Makes sense, thank you!

this post was submitted on 22 Sep 2023
39 points (97.6% liked)

Programming

17314 readers
53 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS