Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

embed code of conduct from the constitution #176

Open
FromAnkyra opened this issue Sep 27, 2021 · 1 comment
Open

embed code of conduct from the constitution #176

FromAnkyra opened this issue Sep 27, 2021 · 1 comment

Comments

@FromAnkyra
Copy link
Contributor

It would be nice not to have two separate copies of the code of conduct, for the following reasons:

  • potential for forgetting to update one when updating the other
  • potential for weakening of the arguments we make if stuff ends up in conflict (or even just, phrased slightly differently)
  • permissions are different across repos
  • extra work to update both

Ideally it would be better for the "canonical" version of the CoC to be in the constitution, so it would be nice to have some way of embedding that document (once it is pushed to the Constitution) be embedded in the website somehow

@LukeMoll
Copy link
Member

LukeMoll commented Sep 28, 2021

So there's a few ways this could be implemented

Pulling from GitHub at runtime

Since amendments are single files, they could be downloaded from https://raw.githubusercontent.com/HackSoc/constitution/main/appendices/A-declaration.md (for example) when the user builds the website. This would come with the downside that now the user must have an internet connection when they build the website.

Using Git Submodules

Submodules are one way of representing dependencies between Git repositories. hacksoc/hacksoc.org could add hacksoc/constitution as a submodule, and retrieve the code of conduct from within the submodule. This has several considerations:

Updating the submodule on the remote

Each time a commit is made to hacksoc/constitution, the submodule in hacksoc/hacksoc.org must be updated with git submodule update --remote, and then commit and push the submodule. This can be automated with a GitHub action in hacksoc/constitution which creates a pull request in hacksoc/hacksoc.org every time main updates.

Updating the submodule on users' local clones

Each time the submodule is updated on the remote, users (that need to see the latest changes) must run git pull --recurse-submodules. It is possible to set this behaviour as default in git config, so this is a one-time issue per-user.

(h/t to @sersorrel for her arcane knowledge in this area)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants