Skip to content

Commit 3004cb5

Browse files
committed
doc: add issues, pull-requests templates and support documentation
1 parent 07d744e commit 3004cb5

File tree

2 files changed

+184
-0
lines changed

2 files changed

+184
-0
lines changed

.github/CODE_OF_CONDUCT.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
- Using welcoming and inclusive language
18+
- Being respectful of differing viewpoints and experiences
19+
- Gracefully accepting constructive criticism
20+
- Focusing on what is best for the community
21+
- Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
- Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies within all project spaces, and it also applies when
49+
an individual is representing the project or its community in public spaces.
50+
Examples of representing a project or community include using an official
51+
project e-mail address, posting via an official social media account, or acting
52+
as an appointed representative at an online or offline event. Representation of
53+
a project may be further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

.github/CONTRIBUTING.md

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# Contribute to `scaleway-cli`
2+
3+
`scaleway-cli` is Apache 2.0 licensed and accepts contributions via GitHub.
4+
This document will cover how to contribute to the project and report issues.
5+
6+
<p align="center"><img width="50%" src="../docs/static_files/cli-artwork.png" /></p>
7+
8+
## Topics
9+
10+
- [Reporting Security Issues](#reporting-security-issues)
11+
- [Reporting Issues](#reporting-issues)
12+
- [Suggesting feature](#suggesting-feature)
13+
- [Contributing Code](#contributing-code)
14+
- [Community Guidelines](#community-guidelines)
15+
16+
## Reporting security issues
17+
18+
Please refer to our [security policy](../SECURITY.md).
19+
20+
## Reporting issues
21+
22+
A great way to contribute to the project is to send a detailed report when you encounter a bug.
23+
We always appreciate a well-written, thorough bug report, and will thank you for it!
24+
Before opening a new issue, we appreciate you reviewing open issues to see if there are any similar requests.
25+
If there is a match, thumbs up the issue with a 👍 and leave a comment if you have additional information.
26+
27+
When reporting an issue, please include information displayed by the `scw version` command.
28+
29+
## Suggesting a feature
30+
31+
When requesting a feature, some of the questions we want to answer are:
32+
33+
- What value does this feature bring to end users?
34+
- How urgent is the need (nice to have feature or need to have)?
35+
- Does this align with the goals of `scaleway-cli`?
36+
37+
## Contributing code
38+
39+
Before contributing to the code, make sure you have read about the [continuous code deployment](docs/CONTINUOUS_CODE_DEPLOYMENT.md) process we are using on this repo.
40+
41+
### Submit code
42+
43+
To submit code:
44+
45+
- Create a fork of the project
46+
- Create a topic branch from where you want to base your work (usually master)
47+
- Add tests to cover contributed code
48+
- Push your commit(s) to your topic branch on your fork
49+
- Open a pull request against `scaleway-cli` `master` branch that follows [PR guidelines](#pull-request-guidelines)
50+
51+
The [maintainers](MAINTAINERS.md) of `scaleway-cli` use a "Let's Get This Merged" (LGTM) message in the pull request to note that the commits are ready to merge.
52+
After one or more maintainer states LGTM, we will merge.
53+
If you have questions or comments on your code, feel free to correct these in your branch through new commits.
54+
55+
### Pull Request Guidelines
56+
57+
The goal of the following guidelines is to have Pull Requests (PRs) that are fairly easy to review and comprehend, and code that is easy to maintain in the future.
58+
59+
- **Pull Request title should respect [conventional commits](https://www.conventionalcommits.org/en/v1.0.0) specifications** and be clear on what is being changed.
60+
The scope is the namespace on which the changes are made or `core` for changes which concern the whole CLI. Examples:
61+
- A fix for `scw init` will be titled `fix(init): ...`
62+
- A fix for the argument parser will be titled `fix(core): ...`
63+
- A new instance feature (in `scw instance ...`) will be title `feat(instance): ...`
64+
- **Keep it readable for human reviewers** and prefer a subset of functionality (code) with tests and documentation over delivering them separately
65+
- **Don't forget commenting code** to help reviewers understand and to keep [our Go Report Card](https://goreportcard.com/report/github.com/scaleway/scaleway-sdk-go) at A+
66+
- **Notify Work In Progress PRs** by prefixing the title with `[WIP]`
67+
- **Please, keep us updated.**
68+
We will try our best to merge your PR, but please notice that PRs may be closed after 30 days of inactivity.
69+
70+
Your pull request should be rebased against the `master` branch.
71+
72+
Keep in mind only the **pull request title** will be used as commit message as we stash all commits on merge.
73+
74+
## Community guidelines
75+
76+
See [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).
77+
78+
Thank you for reading through all of this, if you have any question feel free to [reach us](README.md#reach-us)!
79+
80+
## Developer documentation
81+
82+
### When to use dash vs underscore
83+
84+
We SHOULD use dash `"-"` for:
85+
- command namespaces, resource, verb
86+
- argument names
87+
- key names in the human formatted results
88+
- UUID
89+
90+
We SHOULD use underscore `"_"` for:
91+
- response value results, except UUID
92+
- argument values
93+
94+
Example:
95+
```bash
96+
> scw my-namespace my-resource get id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
97+
id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
98+
some-key some_value
99+
other-key other_value
100+
```
101+
102+
### Commands validation
103+
104+
Some validation is done internally on Scaleway's side: see [scaleway-sdk-go/docs/CONTINUOUS_CODE_DEPLOYMENT.md](https://github.com/scaleway/scaleway-sdk-go/blob/master/docs/CONTINUOUS_CODE_DEPLOYMENT.md)
105+
This is true for:
106+
- command namespaces, resource, verb
107+
108+
The rest is manually checked for now.

0 commit comments

Comments
 (0)