Skip to content

Commit 8a75563

Browse files
authored
docs: Update contribution documentation (#7639)
This attempts to improve some inaccuracies in the contribution documentation, as well as making it clearer that opening an issue is preferred before committing time to a PR. Signed-off-by: Charlie Egan <[email protected]>
1 parent 624c037 commit 8a75563

File tree

5 files changed

+47
-28
lines changed

5 files changed

+47
-28
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ familiar with signing off, see our contributor guide below.
2323
2424
For more information on contributing to OPA see:
2525
26-
* [Contributing Guide](https://www.openpolicyagent.org/docs/latest/contributing/)
26+
* [Contributing Guide](https://www.openpolicyagent.org/docs/contributing/)
2727
for high-level contributing guidelines and development setup.
28-
(See the [Developer Certificate of Origin](https://www.openpolicyagent.org/docs/latest/contrib-code/#developer-certificate-of-origin)
28+
(See the [Developer Certificate of Origin](https://www.openpolicyagent.org/docs/contrib-code/#developer-certificate-of-origin)
2929
section for specifics on signing off a commit.)
3030
3131
-->

docs/docs/contrib-code.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,19 @@
22
title: Contributing Code
33
---
44

5-
## Code Contributions
5+
We are thrilled that you're interested in contributing to OPA! This document
6+
outlines some of the important guidelines when getting started as a new
7+
contributor. For developer environment setup, please refer to the
8+
[Contributing Development](./contrib-development/) page.
69

7-
If you are contributing code, please consider the following:
10+
When contributing please consider the following pointers:
811

912
- Most changes should be accompanied with tests.
1013
- All commits must be signed off (see next section).
11-
- Related commits must be squashed before they are merged.
14+
- Related commits must be squashed before they are merged (this can be done in
15+
the PR UI on GitHub).
1216
- All tests must pass and there must be no warnings from the `make check` target.
1317

14-
If you are new to Go, consider reading
15-
[Effective Go](https://golang.org/doc/effective_go.html) and
16-
[Go Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments)
17-
for guidance on writing idiomatic Go code.
18-
1918
When you implement new features in OPA, consider whether the
2019
types/functions you are adding need to be exported. Prefer
2120
unexported types and functions as much as possible.

docs/docs/contrib-development.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,22 @@
22
title: Development
33
---
44

5-
OPA is written in the [Go](https://golang.org) programming language.
5+
This page details the process for getting up and running locally for OPA
6+
development. If you're a first time contributor, we recommend you read through
7+
the [Contributing to OPA](./contrib-code) page first.
68

7-
If you are not familiar with Go we recommend you read through the [How to Write Go Code](https://golang.org/doc/code.html) article to familiarize yourself with the standard Go development environment.
9+
OPA is written in the [Go](https://golang.org) programming language.
10+
If you are new to Go, consider reading
11+
[Effective Go](https://golang.org/doc/effective_go.html),
12+
[Go Code Review Comments](https://go.dev/wiki/CodeReviewComments) or
13+
[How to Write Go Code](https://go.dev/doc/code)
14+
for guidance on writing idiomatic Go code.
815

916
Requirements:
1017

1118
- Git
1219
- GitHub account (if you are contributing)
13-
- Go (version 1.15+ is supported though older versions are likely to work)
20+
- Go (please see the project's [go.mod](https://github.com/open-policy-agent/opa/blob/main/go.mod) file for the current version in use)
1421
- GNU Make
1522
- Python3, pip, yamllint (if linting YAML files manually)
1623

docs/docs/contributing.md

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
---
2-
title: How to contribute
2+
title: Contributing to OPA
3+
sidebar_label: Introduction
34
---
45

56
Thanks for your interest in contributing to the Open Policy Agent project!
7+
There are all sorts of ways to get involved, whether you are a user of OPA or
8+
interested in contributing.
69

710
:::info
811
Most of the discussions about OPA take place on Slack, if you haven't already,
@@ -16,37 +19,47 @@ channel in Slack, hang out in there and see if there are any questions you
1619
can help with.
1720

1821
You might also want to keep an eye on the
19-
[OPA Discussion Board](https://github.com/orgs/open-policy-agent/discussions).
22+
[OPA Discussion Board](https://github.com/orgs/open-policy-agent/discussions) or
23+
on the [`#rego`](https://stackoverflow.com/questions/tagged/rego) tag on Stack
24+
Overflow.
2025

2126
## I'd like to contribute code
2227

23-
If you have found a bug and would like to work on a fix, we still encourage you
24-
file a [GitHub Issue](https://github.com/open-policy-agent/opa/issues) first
25-
to talk about the problem and the solution you have in mind.
28+
If you have found a bug and would like to work on a fix, **we always encourage you
29+
file a [GitHub Issue](https://github.com/open-policy-agent/opa/issues)** to talk
30+
about the problem and the solution you have in mind. This allows you to get
31+
feedback from maintainers before committing time to something that might already
32+
have a solution or might not be the right approach.
2633

27-
Similarly, if you have an idea for a new feature, we encourage you to file an
28-
issue to discuss the feature before you start working on it too.
34+
If you have an idea for a new feature, we also **request that you file an
35+
issue** to discuss it first. This again allows you to get feedback from
36+
the maintainer team and the community before you start working on it.
2937

3038
If you want to chat to the maintainers before opening an issue or about anything
3139
else, head over to
3240
[#contributors](https://openpolicyagent.slack.com/archives/C02L1TLPN59) in
3341
Slack.
3442

35-
If you want to contribute code check out the
36-
[development reference](./contrib-development/) for pointers on how to get
43+
If you are ready to start contributing code, please see our
44+
[Contributing Code](./contrib-code/) guide for pointers on how to get
3745
started. Please note we have some restrictions around the use of AI tooling
3846
which are documented here.
3947

4048
## I'd like to help improve the documentation
4149

42-
Great! Please see our [documentation page](./contrib-docs) for more details.
50+
Great! Please see our [Contributing Documentation](./contrib-docs) guide for
51+
more details.
4352

4453
## I have an OPA project or talk I'd like to share
4554

46-
Awesome! For OPA-based projects, we have our [Ecosystem page](../ecosystem/).
47-
This is a great place to showcase your project. See
48-
[the instructions](https://github.com/open-policy-agent/opa/tree/main/docs#opa-ecosystem)
49-
here to get it listed.
55+
Awesome! For OPA-based projects, we have our [Ecosystem page](/ecosystem/).
56+
This is a great place to showcase your project and how it uses OPA.
57+
58+
You can create a markdown file in:
59+
[`docs/src/data/ecosystem/entries`](https://github.com/open-policy-agent/opa/tree/main/docs/src/data/ecosystem/entries)
60+
and add an icon in
61+
[`/docs/static/img/ecosystem-entry-logos`](https://github.com/open-policy-agent/opa/tree/main/docs/static/img/ecosystem-entry-logos)
62+
to have your project listed on the ecosystem page.
5063

5164
If you have a talk or blog you'd like to share please feel free to post in:
5265

docs/src/lib/sidebars.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ module.exports = {
8787
collapsed: true,
8888
items: [
8989
"contributing",
90-
"contrib-docs",
9190
"contrib-code",
91+
"contrib-docs",
9292
"contrib-development",
9393
"contrib-adding-builtin-functions",
9494
],

0 commit comments

Comments
 (0)