The Rust Code of Conduct is checked in to multiple repositories. This is great since it makes the Code of Conduct more ubiquitous. The downside is that copies of the Code of Conduct can become out of sync over time.
This project aims to address the risk of fragmentation two ways:
cargo test) The repository contains cross-repository integration tests that verify the Rust site Code of Conduct and copies of the Code of Conduct in specified code repositories are synchronized. A passing build badge above indicates that the codes of conduct were in sync as of the last build. Builds occur at least daily.
cargo run) The repository launches a web service that shows the status of the codes of conduct in all respositories in three of Rust's GitHub organziations. An experimental deployment of this service is currently at https://rust-conduct.davidalber.net/.
The integration tests are intended to cover projects in the rust-lang, rust-lang-nursery, and rust-lang-deprecated GitHub organizations. Currently, the following code repositories are covered by the tests.
- rust-lang/rust (code of conduct)
- rust-lang/rust-by-example (code of conduct)
- rust-lang-nursery/highfive (code of conduct)
- rust-lang-nursery/rustfmt (code of conduct)
- To add a new repository to the tests, either contact me or author a PR that adds the repository name to the
reposvector in the
validate_satellite_filesfunction in validation_tests.rs. Be sure to run
cargo testbefore creating the PR.
- Add a link to the repository and its code of conduct in the section above.
The service uses Rocket, so you need to use nightly Rust. Currently, do
rustup override set nightly-2018-06-06
By default, the service runs on port 8000.
- http://localhost:8000/ returns a page with code of conduct status for all repositories in the rust-lang, rust-lang-nursery, and rust-lang-deprecated GitHub organizations.
- http://localhost:8000/conduct returns a page containing the current correct code of conduct for installation in repositories. This is used to produce satellite_code_of_conduct.md.
- http://localhost:8000/conformance returns a JSON payload with code of conduct conformance information. That data is used to produce the index page.
See the deployment directory for an example deployment.