Skip to content

Commit 10741e0

Browse files
author
nginx
committed
Pre OSS commit
0 parents  commit 10741e0

17 files changed

+721
-0
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Main global owner #
2+
#####################
3+
*

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ""
5+
labels: ""
6+
assignees: ""
7+
---
8+
9+
### Describe the bug
10+
11+
A clear and concise description of what the bug is.
12+
13+
### To reproduce
14+
15+
Steps to reproduce the behavior:
16+
17+
1. Deploy this project using [...]
18+
2. View output/logs/configuration on [...]
19+
3. See error
20+
21+
### Expected behavior
22+
23+
A clear and concise description of what you expected to happen.
24+
25+
### Your environment
26+
27+
- Version of this project or specific commit
28+
<!-- - Version of any relevant project languages -->
29+
- Target deployment platform
30+
31+
### Additional context
32+
33+
Add any other context about the problem here.
34+
35+
### Sensitive Information
36+
37+
Remember to redact any sensitive information such as authentication credentials or license keys.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ""
5+
labels: ""
6+
assignees: ""
7+
---
8+
9+
### Is your feature request related to a problem? Please describe
10+
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
### Describe the solution you'd like
14+
15+
A clear and concise description of what you want to happen.
16+
17+
### Describe alternatives you've considered
18+
19+
A clear and concise description of any alternative solutions or features you've considered.
20+
21+
### Additional context
22+
23+
Add any other context or screenshots about the feature request here.

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
version: 2
3+
updates:
4+
- package-ecosystem: github-actions
5+
directory: /
6+
schedule:
7+
interval: weekly
8+
day: monday
9+
time: "00:00"

.github/pull_request_template.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### Proposed changes
2+
3+
Describe the use case and detail of the change. If this PR addresses an issue on GitHub, make sure to include a link to that issue using one of the [supported keywords](https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue) in this PR's description or commit message.
4+
5+
### Checklist
6+
7+
Before creating a PR, run through this checklist and mark each as complete:
8+
9+
- [ ] I have read the [contributing guidelines](/CONTRIBUTING.md).
10+
- [ ] I have signed the [F5 Contributor License Agreement (CLA)](https://github.com/f5/.github/blob/main/CLA/cla-markdown.md).
11+
- [ ] If applicable, I have added tests that prove my fix is effective or that my feature works.
12+
- [ ] If applicable, I have checked that any relevant tests pass after adding my changes.
13+
- [ ] I have updated any relevant documentation ([`README.md`](/README.md) and [`CHANGELOG.md`](/CHANGELOG.md)).

.github/workflows/f5-cla.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: F5 CLA
3+
on:
4+
issue_comment:
5+
types: [created]
6+
pull_request_target:
7+
types: [opened, closed, synchronize]
8+
permissions: read-all
9+
jobs:
10+
f5-cla:
11+
name: F5 CLA
12+
runs-on: ubuntu-24.04
13+
permissions:
14+
actions: write
15+
pull-requests: write
16+
statuses: write
17+
steps:
18+
- name: Run F5 Contributor License Agreement (CLA) assistant
19+
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
21+
with:
22+
# Any pull request targeting the following branch will trigger a CLA check.
23+
# NOTE: You might need to edit this value to 'main'.
24+
branch: main
25+
# Path to the CLA document.
26+
path-to-document: https://github.com/f5/.github/blob/main/CLA/cla-markdown.md
27+
# Custom CLA messages.
28+
custom-notsigned-prcomment: '🎉 Thank you for your contribution! It appears you have not yet signed the [F5 Contributor License Agreement (CLA)](https://github.com/f5/.github/blob/main/CLA/cla-markdown.md), which is required for your changes to be incorporated into an F5 Open Source Software (OSS) project. Please kindly read the [F5 CLA](https://github.com/f5/.github/blob/main/CLA/cla-markdown.md) and reply on a new comment with the following text to agree:'
29+
custom-pr-sign-comment: 'I have hereby read the F5 CLA and agree to its terms'
30+
custom-allsigned-prcomment: '✅ All required contributors have signed the F5 CLA for this PR. Thank you!'
31+
# Remote repository storing CLA signatures.
32+
remote-organization-name: f5
33+
remote-repository-name: f5-cla-data
34+
path-to-signatures: signatures/signatures.json
35+
# Comma separated list of usernames for maintainers or any other individuals who should not be prompted for a CLA.
36+
# NOTE: You will want to edit the usernames to suit your project needs.
37+
allowlist: alessfg, bot*
38+
# Do not lock PRs after a merge.
39+
lock-pullrequest-aftermerge: false
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
PERSONAL_ACCESS_TOKEN: ${{ secrets.F5_CLA_TOKEN }}

.github/workflows/ossf_scorecard.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
# This workflow uses actions that are not certified by GitHub. They are provided by a third-party and are governed by separate terms of service, privacy policy, and support documentation.
3+
name: OSSF Scorecard
4+
on:
5+
# For Branch-Protection check. Only the default branch is supported. See https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection.
6+
branch_protection_rule:
7+
# To guarantee Maintained check is occasionally updated. See https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained.
8+
schedule:
9+
- cron: "0 0 * * 1"
10+
push:
11+
branches: [main, master]
12+
workflow_dispatch:
13+
# Declare default permissions as read only.
14+
permissions: read-all
15+
jobs:
16+
analysis:
17+
name: Scorecard analysis
18+
runs-on: ubuntu-22.04
19+
permissions:
20+
# Needed if using Code Scanning alerts.
21+
security-events: write
22+
# Needed for GitHub OIDC token if publish_results is true.
23+
id-token: write
24+
# Delete the permissions below if you are using the OSSF Scorecard on a public repository.
25+
contents: read
26+
actions: read
27+
issues: read # To allow GraphQL ListCommits to work
28+
pull-requests: read # To allow GraphQL ListCommits to work
29+
checks: read # To detect SAST tools
30+
steps:
31+
- name: Check out the codebase
32+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
33+
with:
34+
persist-credentials: false
35+
36+
- name: Run analysis
37+
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
38+
with:
39+
results_file: results.sarif
40+
results_format: sarif
41+
# (Optional) fine-grained personal access token. Uncomment the `repo_token` line below if you want to enable the Branch-Protection or Webhooks check on a *private* repository.
42+
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-fine-grained-pat-optional.
43+
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
44+
45+
# Publish the results for public repositories to enable scorecard badges. For more details, see https://github.com/ossf/scorecard-action#publishing-results.
46+
# For private repositories, `publish_results` will automatically be set to `false`, regardless of the value entered here.
47+
publish_results: true
48+
49+
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF format to the repository Actions tab.
50+
- name: Upload artifact
51+
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
52+
with:
53+
name: SARIF file
54+
path: results.sarif
55+
retention-days: 5
56+
57+
# Upload the results to GitHub's code scanning dashboard.
58+
- name: Upload SARIF results to code scanning
59+
uses: github/codeql-action/upload-sarif@2c779ab0d087cd7fe7b826087247c2c81f27bfa6 # v3.26.5
60+
with:
61+
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

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Any private crt and keys #
2+
############################
3+
*.crt
4+
*.key
5+
*~
6+
\#*
7+
8+
# OS Specific #
9+
###############
10+
Thumbs.db
11+
.DS_Store
12+
.vscode
13+
14+
# Logs #
15+
########
16+
*.log

0 commit comments

Comments
 (0)