Skip to content

Commit b63e9e9

Browse files
committed
Updates per F5 Open Source Contribution Policy
1 parent 73201e9 commit b63e9e9

File tree

7 files changed

+164
-31
lines changed

7 files changed

+164
-31
lines changed

.github/workflows/f5-cla.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
steps:
1818
- name: Run F5 Contributor License Agreement (CLA) assistant
1919
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have hereby read the F5 CLA and agree to its terms') || github.event_name == 'pull_request_target'
20-
uses: contributor-assistant/github-action@f41946747f85d28e9a738f4f38dbcc74b69c7e0e # v2.5.1
20+
uses: contributor-assistant/github-action@9340315624c6e16cef1f2c63bdeb0f0c49c6f474 # v2.4.0
2121
with:
2222
# Any pull request targeting the following branch will trigger a CLA check.
2323
# NOTE: You might need to edit this value to 'main'.

.github/workflows/ossf_scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,6 @@ jobs:
5656

5757
# Upload the results to GitHub's code scanning dashboard.
5858
- name: Upload SARIF results to code scanning
59-
uses: github/codeql-action/upload-sarif@2c779ab0d087cd7fe7b826087247c2c81f27bfa6 # v3.26.5
59+
uses: github/codeql-action/upload-sarif@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0
6060
with:
6161
sarif_file: results.sarif

.github/workflows/rename_template.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Rename the template
3+
on:
4+
push:
5+
permissions: read-all
6+
jobs:
7+
rename-template:
8+
name: Replace the templated variables in the repository with the newly created repository details
9+
if: ${{ !contains(github.repository, 'template') }}
10+
runs-on: ubuntu-22.04
11+
permissions:
12+
contents: write
13+
steps:
14+
- name: Check out the codebase
15+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
16+
17+
- name: Set $REPOSITORY_NAME
18+
run: echo "REPOSITORY_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}' | tr '-' '_' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
19+
shell: bash
20+
21+
- name: Set $REPOSITORY_URL
22+
run: echo "REPOSITORY_URL=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV
23+
shell: bash
24+
25+
- name: Set $REPOSITORY_OWNER
26+
run: echo "REPOSITORY_OWNER=$(echo '${{ github.repository }}' | awk -F '/' '{print $1}')" >> $GITHUB_ENV
27+
shell: bash
28+
29+
- name: Rename the project
30+
run: |
31+
echo "Renaming the project with -a(author) ${{ env.REPOSITORY_OWNER }} -n(name) ${{ env.REPOSITORY_NAME }} -u(urlname) ${{ env.REPOSITORY_URL }}"
32+
.github/workflows/scripts/rename_project.sh -a ${{ env.REPOSITORY_OWNER }} -n ${{ env.REPOSITORY_NAME }} -u ${{ env.REPOSITORY_URL }}
33+
34+
- name: Commit and push changes
35+
uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1
36+
with:
37+
commit_message: "✅ Ready to clone and code."
38+
push_options: --force
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/env bash
2+
# vim:sw=2:ts=2:sts=2:et
3+
while getopts a:n:u: flag
4+
do
5+
case "${flag}" in
6+
a) owner=${OPTARG};;
7+
n) name=${OPTARG};;
8+
u) url=${OPTARG};;
9+
*) echo "Invalid flag: ${flag}"; exit 1;;
10+
esac
11+
done
12+
13+
echo "Owner: $owner";
14+
echo "Repository Name: $name";
15+
echo "Repository URL: $url";
16+
17+
echo "Renaming repository..."
18+
19+
original_owner="{{REPOSITORY_OWNER}}"
20+
original_name="{{REPOSITORY_NAME}}"
21+
original_url="{{REPOSITORY_URL}}"
22+
for filename in $(git ls-files)
23+
do
24+
sed -i "s/$original_owner/$owner/g" "$filename"
25+
sed -i "s/$original_name/$name/g" "$filename"
26+
sed -i "s/$original_url/$url/g" "$filename"
27+
echo "Renamed $filename"
28+
done
29+
30+
# This command runs only once on GitHub Actions!
31+
rm -f .github/workflows/rename_template.yml
32+
rm -rf .github/workflows/scripts

CONTRIBUTING.md

Lines changed: 59 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,50 @@
1-
# Contributing guidelines
1+
# Contributing Guidelines
22

3-
The following is a set of guidelines for contributing to this project. We really appreciate your desire to contribute!
3+
The following is a set of guidelines for contributing to this project.
4+
We really appreciate your desire to contribute!
45

5-
## F5 Contributor License Agreement (CLA)
6+
## Table of Contents
67

7-
F5 requires all external contributors to agree to the terms of the F5 CLA (available [here](https://github.com/f5/.github/blob/main/CLA/cla-markdown.md)) before any of their changes can be incorporated into an F5 Open Source repository.
8+
- [Ask a Question](#ask-a-question)
9+
- [Report a Bug](#report-a-bug)
10+
- [Suggest a Feature or Enhancement](#suggest-a-feature-or-enhancement)
11+
- [Open a Discussion](#open-a-discussion)
12+
- [Submit a Pull Request](#submit-a-pull-request)
13+
- [Issue Lifecycle](#issue-lifecycle)
14+
- [F5 Contributor License Agreement (CLA)](#f5-contributor-license-agreement)
815

9-
If you have not yet agreed to the F5 CLA terms and submit a PR to this repository, a bot will prompt you to view and agree to the F5 CLA. You will have to agree to the F5 CLA terms through a comment in the PR before any of your changes can be merged. Your agreement signature will be safely stored by F5 and no longer be required in future Pull or Merge Requests.
16+
## Ask a Question
17+
18+
To ask a question, open an issue on GitHub with the label `question`.
19+
20+
## Report a Bug
21+
22+
To report a bug, open an issue on GitHub with the label `bug` using the
23+
available bug report issue template. Before reporting a bug, make sure the
24+
issue has not already been reported.
25+
26+
## Suggest a Feature or Enhancement
27+
28+
To suggest a feature or enhancement, open an issue on GitHub with the label
29+
`feature` or `enhancement` using the available feature request issue template.
30+
Please ensure the feature or enhancement has not already been suggested.
31+
32+
## Open a Discussion
33+
34+
If you want to start a conversation with the community and maintainers,
35+
we encourage you to use
36+
[GitHub Discussions](https://github.com/nginxinc/oss-docs/discussions).
37+
38+
## Submit a Pull Request
1039

11-
## Options to get started
40+
To contribute to NGINX documentation, follow these steps:
41+
42+
- Fork the NGINX repository
43+
- Create a branch
44+
- Implement your changes in your branch
45+
- Submit a pull request (PR) when your changes are ready for review
46+
47+
## Contributing with Git
1248

1349
<!-- Separate doc pages, CONTRIBUTING_GIT.md and CONTRIBUTING_other.md.
1450
Need: issue to include "Edit this page" links, similar to what we already do for N Unit docs, https://unit.nginx.org/ -->
@@ -19,5 +55,21 @@ At this time, we support contributions using Git. We expect this audience to als
1955
We're working on alternative contribution methods, described in CONTRIBUTING_OTHER.md
2056
-->
2157

22-
Alternatively, you're welcome to highight problems with our documentation as
58+
Alternatively, you're welcome to highlight problems with our documentation as
2359
described in our [support](./SUPPORT.md) page.
60+
61+
## Issue Lifecycle
62+
63+
To ensure a balance between work carried out by the NGINX team while encouraging community involvement on this project, we use the following
64+
issue lifecycle:
65+
66+
- A new issue is created by a community member
67+
- An owner on the NGINX team is assigned to the issue; this owner shepherds the issue through the subsequent stages in the issue lifecycle
68+
- The owner assigns one or more [labels](https://github.com/nginxinc/oss-docs/issues/labels) to the issue
69+
- The owner, in collaboration with the wider team, determines what milestone to attach to an issue. They may be milestones correspond to product releases
70+
71+
## F5 Contributor License Agreement
72+
73+
F5 requires all external contributors to agree to the terms of the [F5 CLA](./CLA/cla-markdown.md), before any of their changes can be incorporated into an F5 Open Source repository.
74+
75+
If you have not yet agreed to the F5 CLA terms and submit a PR to this repository, a bot will prompt you to view and agree to the F5 CLA. You will have to agree to the F5 CLA terms through a comment in the PR before any of your changes can be merged. Your agreement signature will be safely stored by F5 and no longer be required in future Pull or Merge Requests.

CONTRIBUTING_GIT.md

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
If you want to contribute, know Git, and can work from the command line, this page can help you. As noted in the [README](./README.md), we create source content for our documentation in Markdown.
22

33
Once you add and/or edit our Markdown source files, you can build the content locally as described on this page.
4+
Before you [Submit a Pull Request](#submit-a-pull-request), we recommend that you first:
45

5-
## Static Site Generator (Hugo)
6+
- Set up our [Static site generator](#static-site-generator)
7+
- Review how to [Include images](#include-images)
8+
- Review our [Git style guide](#git-style-guide)
9+
- Learn how to [Build documentation locally](#build-documentation-locally)
610

7-
We build our documentation with the [Hugo](https://gohugo.io/) static site generator.
11+
## Static Site Generator
812

9-
## Images
13+
You will need to install Hugo to build and preview docs in your local development environment.
14+
Refer to the [Hugo installation instructions](https://gohugo.io/getting-started/installing/) for more information.
15+
16+
**NOTE**: We are currently running [Hugo v0.134.2](https://github.com/gohugoio/hugo/releases/tag/v0.134.2) in production.
17+
18+
## Include images
1019

1120
When you set up an image, this is the standard format:
1221

@@ -19,16 +28,28 @@ Refer to the [Hugo installation instructions](https://gohugo.io/getting-started/
1928

2029
**NOTE**: We are currently running [Hugo v0.115.3](https://github.com/gohugoio/hugo/releases/tag/v0.115.3) in production. If you run a different version of Hugo (older or newer), you might see unexpected errors.
2130

22-
### Local docs development
31+
## Submit a Pull Request
32+
33+
Follow this plan to contribute a change to NGINX source code:
34+
35+
- Fork the NGINX repository
36+
- Create a branch
37+
- Implement your changes in this branch
38+
- Submit a pull request (PR) when your changes are tested and ready for review
2339

24-
To build the docs locally, run the desired `make` command from the docs directory:
40+
### Git Style Guide
2541

26-
```text
27-
make docs - runs a local Hugo server so you can view docs in your browser while you work
28-
make hugo-mod - cleans the Hugo module cache and fetches the latest version of the theme module
29-
make docs-drafts - runs the local Hugo server and includes all docs marked with `draft: true`
30-
make clean - removes the local `public` directory, which is the default output path used by Hugo
31-
```
42+
- Keep a clean, concise and meaningful git commit history on your branch, rebasing locally and squashing before
43+
submitting a PR
44+
- Follow the guidelines of writing a good commit message as described here <https://chris.beams.io/posts/git-commit/>
45+
and summarized in the next few points:
46+
47+
- In the subject line, use the present tense ("Add feature" not "Added feature")
48+
- In the subject line, use the imperative mood ("Move cursor to..." not "Moves cursor to...")
49+
- Limit the subject line to 72 characters or less
50+
- Reference issues and pull requests liberally after the subject line
51+
- Add more detailed description in the body of the git message (`git commit -a` to give you more space and time in
52+
your text editor to write a good message instead of `git commit -am`)
3253

3354
### Add new docs
3455
<!--
@@ -52,11 +73,3 @@ Consistent with the [Diataxis](https://diataxis.fr) framework, our documentation
5273
- tutorial: Walks a customer through an example use case scenario; results in a functional PoC environment.
5374
- reference: Describes an API, command line tool, config options, etc.; should be generated automatically from source code.
5475
- openapi: Contains front-matter and shortcode for rendering an openapi.yaml spec.
55-
56-
### How to format docs
57-
58-
#### How to format internal links
59-
60-
Format links as [Hugo `refs`](https://gohugo.io/content-management/cross-references/).
61-
62-
- File extensions are optional.

SUPPORT.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,9 @@ If you are not a member, click [here](https://community.nginx.org/joinslack) to
2323
2424
Once you join, check out the `#beginner-questions` and `nginx-users` channels :) -->
2525

26-
<!-- The dot org site has moved away from mailing lists, I think we should do the same.
27-
2826
### Mailing List
2927

30-
Want to get in touch with the NGINX development team directly? Try using the relevant mailing list found at <https://mailman.nginx.org/mailman3/lists/>! -->
28+
Want to get in touch with the NGINX development team directly? Try using the relevant mailing list found at <https://mailman.nginx.org/mailman3/lists/>!
3129

3230
### Documentation
3331

0 commit comments

Comments
 (0)