Skip to content

Commit 7d4a96f

Browse files
sozercanashnamehrotra
authored andcommitted
docs: generate v0.4.x docs and fix doc gen (project-copacetic#265)
1 parent 9fc82ec commit 7d4a96f

File tree

10 files changed

+688
-2
lines changed

10 files changed

+688
-2
lines changed

.github/workflows/release-docs.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
- 'v[0-9]+.[0-9]+.0' # run this workflow when a new minor version is published
66

77
permissions:
8-
contents: read
8+
contents: write
99
pull-requests: write
1010

1111
jobs:
@@ -25,7 +25,7 @@ jobs:
2525
MINOR_VERSION="$(echo "${TAG}" | cut -d '.' -f2)"
2626
echo "NEWVERSION=v${MAJOR_VERSION}.${MINOR_VERSION}.x" >> ${GITHUB_ENV}
2727
28-
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
28+
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
2929
with:
3030
fetch-depth: 0
3131

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
---
2+
title: Code of Conduct
3+
---
4+
5+
# Contributor Covenant Code of Conduct
6+
7+
## Our Pledge
8+
9+
We as members, contributors, and leaders pledge to make participation in our
10+
community a harassment-free experience for everyone, regardless of age, body
11+
size, visible or invisible disability, ethnicity, sex characteristics, gender
12+
identity and expression, level of experience, education, socio-economic status,
13+
nationality, personal appearance, race, caste, color, religion, or sexual
14+
identity and orientation.
15+
16+
We pledge to act and interact in ways that contribute to an open, welcoming,
17+
diverse, inclusive, and healthy community.
18+
19+
## Our Standards
20+
21+
Examples of behavior that contributes to a positive environment for our
22+
community include:
23+
24+
* Demonstrating empathy and kindness toward other people
25+
* Being respectful of differing opinions, viewpoints, and experiences
26+
* Giving and gracefully accepting constructive feedback
27+
* Accepting responsibility and apologizing to those affected by our mistakes,
28+
and learning from the experience
29+
* Focusing on what is best not just for us as individuals, but for the overall
30+
community
31+
32+
Examples of unacceptable behavior include:
33+
34+
* The use of sexualized language or imagery, and sexual attention or advances of
35+
any kind
36+
* Trolling, insulting or derogatory comments, and personal or political attacks
37+
* Public or private harassment
38+
* Publishing others' private information, such as a physical or email address,
39+
without their explicit permission
40+
* Other conduct which could reasonably be considered inappropriate in a
41+
professional setting
42+
43+
## Enforcement Responsibilities
44+
45+
Community leaders are responsible for clarifying and enforcing our standards of
46+
acceptable behavior and will take appropriate and fair corrective action in
47+
response to any behavior that they deem inappropriate, threatening, offensive,
48+
or harmful.
49+
50+
Community leaders have the right and responsibility to remove, edit, or reject
51+
comments, commits, code, wiki edits, issues, and other contributions that are
52+
not aligned to this Code of Conduct, and will communicate reasons for moderation
53+
decisions when appropriate.
54+
55+
## Scope
56+
57+
This Code of Conduct applies within all community spaces, and also applies when
58+
an individual is officially representing the community in public spaces.
59+
Examples of representing our community include using an official e-mail address,
60+
posting via an official social media account, or acting as an appointed
61+
representative at an online or offline event.
62+
63+
## Enforcement
64+
65+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
66+
reported to the community leaders responsible for enforcement at
67+
68+
All complaints will be reviewed and investigated promptly and fairly.
69+
70+
All community leaders are obligated to respect the privacy and security of the
71+
reporter of any incident.
72+
73+
## Enforcement Guidelines
74+
75+
Community leaders will follow these Community Impact Guidelines in determining
76+
the consequences for any action they deem in violation of this Code of Conduct:
77+
78+
### 1. Correction
79+
80+
**Community Impact**: Use of inappropriate language or other behavior deemed
81+
unprofessional or unwelcome in the community.
82+
83+
**Consequence**: A private, written warning from community leaders, providing
84+
clarity around the nature of the violation and an explanation of why the
85+
behavior was inappropriate. A public apology may be requested.
86+
87+
### 2. Warning
88+
89+
**Community Impact**: A violation through a single incident or series of
90+
actions.
91+
92+
**Consequence**: A warning with consequences for continued behavior. No
93+
interaction with the people involved, including unsolicited interaction with
94+
those enforcing the Code of Conduct, for a specified period of time. This
95+
includes avoiding interactions in community spaces as well as external channels
96+
like social media. Violating these terms may lead to a temporary or permanent
97+
ban.
98+
99+
### 3. Temporary Ban
100+
101+
**Community Impact**: A serious violation of community standards, including
102+
sustained inappropriate behavior.
103+
104+
**Consequence**: A temporary ban from any sort of interaction or public
105+
communication with the community for a specified period of time. No public or
106+
private interaction with the people involved, including unsolicited interaction
107+
with those enforcing the Code of Conduct, is allowed during this period.
108+
Violating these terms may lead to a permanent ban.
109+
110+
### 4. Permanent Ban
111+
112+
**Community Impact**: Demonstrating a pattern of violation of community
113+
standards, including sustained inappropriate behavior, harassment of an
114+
individual, or aggression toward or disparagement of classes of individuals.
115+
116+
**Consequence**: A permanent ban from any sort of public interaction within the
117+
community.
118+
119+
## Attribution
120+
121+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
122+
version 2.1, available at
123+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
124+
125+
Community Impact Guidelines were inspired by
126+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
127+
128+
For answers to common questions about this code of conduct, see the FAQ at
129+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
130+
[https://www.contributor-covenant.org/translations][translations].
131+
132+
[homepage]: https://www.contributor-covenant.org
133+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
134+
[Mozilla CoC]: https://github.com/mozilla/diversity
135+
[FAQ]: https://www.contributor-covenant.org/faq
136+
[translations]: https://www.contributor-covenant.org/translations
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
---
2+
title: Contributing
3+
---
4+
5+
Welcome! We are very happy to accept community contributions to the project, whether through [filing issues](#contributing-issues) or [code](#contributing-code) in the form of [Pull Requests](#pull-requests). Please note that by participating in this project, you agree to abide by the [Code of Conduct](./code-of-conduct.md), as well as the terms of the [Developer Certificate of Origin](#developer-certificate-of-origin-dco).
6+
7+
## Bi-Weekly Community Meeting
8+
A great way to get started is to join our bi-weekly community meeting. The meeting is held every other Monday from 1:30pm PT - 2:15pm PT. You can find the agenda and links to join [here](https://docs.google.com/document/d/1QdskbeCtgKcdWYHI6EXkLFxyzTCyVT6e8MgB3CaAhWI/edit?usp=sharing)
9+
10+
## Contributing Issues
11+
12+
Before opening any new issues, please search our [existing GitHub issues](https://github.com/project-copacetic/copacetic/issues) to check if your bug or suggestion has already been filed. If such an issue already exists, we recommend adding your comments and perspective to that existing issue instead.
13+
14+
When opening an issue, please select the most appropriate template for what you're contributing:
15+
16+
* **Bug Report:** If you would like to report the project or tool behaving in unexpected ways.
17+
* **Documentation Improvement:** If you have corrections or improvements to the project's documents, be they typos, factual errors, or missing content.
18+
* **Request:** If you have a feature request, suggestion, or a even a design proposal to review.
19+
* **Question:** If you would like to ask the maintainers a question about the project.
20+
21+
## Contributing Code
22+
23+
### Getting Started
24+
25+
Follow the instructions to either:
26+
27+
* [Setup your dev environment to build copa](./installation.md).
28+
* [Use the copa development container](#visual-studio-code-development-container) in [Visual Studio Code](https://code.visualstudio.com/).
29+
30+
For an overview of the project components, refer to the [copa design](./design.md) document.
31+
32+
### Visual Studio Code Development Container
33+
34+
[VSCode](https://code.visualstudio.com/) supports development in a containerized environment through its [Remote - Container extension](https://code.visualstudio.com/docs/remote/containers). This folder provides a development container which encapsulates the dependencies specified in the [instructions to build and run copa](./installation.md).
35+
36+
#### Prerequisites
37+
38+
1. [Docker](https://docs.docker.com/get-docker/)
39+
> For Windows users, enabling [WSL2 back-end integration with Docker](https://docs.docker.com/docker-for-windows/wsl/) is recommended.
40+
2. [Visual Studio Code](https://code.visualstudio.com/)
41+
3. [Visual Studio Code Remote - Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
42+
43+
> **⚠ If running via Docker Desktop for Windows**
44+
>
45+
> Note that the [mounted workspace files appear owned by `root`](https://code.visualstudio.com/remote/advancedcontainers/add-nonroot-user) in the dev container, which will cause `git` commands to fail with a `fatal: detected dubious ownership in a repository` error due to [safe.directory](https://git-scm.com/docs/git-config/2.35.2#Documentation/git-config.txt-safedirectory) checks. This can be addressed by changing the mapped ownership of the workspace files in the dev container to the `vscode` user:
46+
>
47+
> ```bash
48+
> sudo chown -R vscode:vscode /workspace/copacetic
49+
> ```
50+
51+
#### Personalizing user settings in a dev container
52+
53+
VSCode supports applying your user settings, such as your `.gitconfig`, to a dev container through the use of [dotfiles repositories](https://code.visualstudio.com/docs/remote/containers#_personalizing-with-dotfile-repositories). This can be done through your own VSCode `settings.json` file without changing the dev container image or configuration.
54+
55+
### Tests
56+
57+
Once you can successfully `make` the project, any code contributions should also successfully:
58+
59+
* Pass unit tests via `make test`.
60+
* Lint cleanly via `make lint`.
61+
62+
Pull requests will also be expected to pass the PR functional tests specified by `.github/workflows/build.yml`.
63+
64+
### Pull Requests
65+
66+
If you'd like to start contributing code to the project, you can search for [issues with the `good first issue` label](https://github.com/project-copacetic/copacetic/labels/good%20first%20issue). Other kinds of PR contributions we would look for include:
67+
68+
* Fixes for bugs and other correctness issues.
69+
* Docs and other content improvements (e.g. samples).
70+
* Extensions to support parsing new scanning report formats.
71+
* Extensions to support patching images based on new distros or using new package managers.
72+
73+
For any changes that may involve significant refactoring or development effort, we suggest that you file an issue to discuss the proposal with the maintainers first as it is unlikely that we will accept large PRs without prior discussion that have:
74+
75+
* Architectural changes (e.g. breaking interfaces or violations of [this project's design tenets](./design.md)).
76+
* Unsolicited features that significantly expand the functional scope of the tool.
77+
78+
Pull requests should be submitted from your fork of the project with the PR template filled out. This project uses the [Angular commit message format](https://github.com/angular/angular/blob/main/CONTRIBUTING.md#-commit-message-format) for automated changelog generation, so it's helpful to be familiar with it as the maintainers will need to ensure adherence to it on accepting PRs.
79+
80+
We suggest:
81+
82+
* Use the standard header format of `"<type>: <short summary>"` where the `<type>` is one of the following:
83+
* **build:** Changes that affect the build system or external dependencies
84+
* **ci:** Changes to the GitHub workflows and configurations
85+
* **docs:** Documentation only changes
86+
* **feat:** A new feature
87+
* **fix:** A bug fix
88+
* **perf:** A code change that improves performance
89+
* **refactor:** A code change that neither fixes a bug nor adds a feature
90+
* **test:** Adding missing tests or correcting existing tests
91+
* Use a [concise, imperative description](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) of the changes included in the `<short summary>` of the header, the body of the PR, and generally in your commit messages.
92+
* Use [GitHub keywords](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests) in the footer of your PR description, such as `closes` to automatically close issues the PR intends to address.
93+
94+
## Developer Certificate of Origin (DCO)
95+
96+
The [Developer Certificate of Origin](https://wiki.linuxfoundation.org/dco) (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the [full text of the DCO](https://developercertificate.org/), reformatted for readability:
97+
98+
> By making a contribution to this project, I certify that:
99+
>
100+
> (a) The contribution was created in whole or in part by me and I
101+
> have the right to submit it under the open source license
102+
> indicated in the file; or
103+
>
104+
> (b) The contribution is based upon previous work that, to the best
105+
> of my knowledge, is covered under an appropriate open source
106+
> license and I have the right under that license to submit that
107+
> work with modifications, whether created in whole or in part
108+
> by me, under the same open source license (unless I am
109+
> permitted to submit under a different license), as indicated
110+
> in the file; or
111+
>
112+
> (c) The contribution was provided directly to me by some other
113+
> person who certified (a), (b) or (c) and I have not modified
114+
> it.
115+
>
116+
> (d) I understand and agree that this project and the contribution
117+
> are public and that a record of the contribution (including all
118+
> personal information I submit with it, including my sign-off) is
119+
> maintained indefinitely and may be redistributed consistent with
120+
> this project or the open source license(s) involved.
121+
122+
Contributors _sign-off_ that they adhere to these requirements by adding a `Signed-off-by` line to commit messages.
123+
124+
```text
125+
This is my commit message
126+
127+
Signed-off-by: Random J Developer <[email protected]>
128+
```
129+
130+
Git even has a `-s` command line option to append this automatically to your commit message:
131+
132+
```bash
133+
git commit -s -m 'This is my commit message'
134+
```
135+
136+
Pull requests that do not contain a valid `Signed-off-by` line cannot be merged.
137+
138+
### I didn't sign my commit, now what?
139+
140+
No worries - You can easily amend your commit with a sign-off and force push the change to your submitting branch:
141+
142+
```bash
143+
git switch <branch-name>
144+
git commit --amend --no-edit --signoff
145+
git push --force-with-lease <remote-name> <branch-name>
146+
```
147+
148+
## Code of Conduct
149+
150+
This project has adopted the [Contributor Covenant Code of Conduct](./code-of-conduct.md).

0 commit comments

Comments
 (0)