Skip to content

Commit

Permalink
chore: add basic contributing structure
Browse files Browse the repository at this point in the history
Signed-off-by: juan131 <[email protected]>
  • Loading branch information
juan131 committed Nov 29, 2023
1 parent 883583f commit d81cc88
Show file tree
Hide file tree
Showing 7 changed files with 216 additions and 3 deletions.
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: triage
assignees: ''

---

**Which version**:

<!-- The affected version -->

**Describe the bug**

<!-- A clear and concise description of what the bug is. -->

**To Reproduce**

<!--
Steps to reproduce the behavior:
1. Go to '...'
2. Run the command '....'
3. Wait for '....'
4. See error
-->

**Expected behavior**

<!-- A clear and concise description of what you expected to happen. -->

**Additional context**

<!-- Add any other context about the problem here. -->
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: triage
assignees: ''

---

**Is your feature request related to a problem? Please describe.**

<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->

**Describe the solution you'd like**

<!-- A clear and concise description of what you want to happen. -->

**Describe alternatives you've considered**

<!-- A clear and concise description of any alternative solutions or features you've considered. -->

**Additional context**

<!-- Add any other context or screenshots about the feature request here. -->
31 changes: 31 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!--
Before you open the request please review the following guidelines and tips to help it be more easily integrated:
- Describe the scope of your change - i.e. what the change does.
- Describe any known limitations with your change.
- Please run any tests or examples that can exercise your modified code.
Thank you for contributing!
-->

**Description of the change**

<!-- Describe the scope of your change - i.e. what the change does. -->

**Benefits**

<!-- What benefits will be realized by the code change? -->

**Possible drawbacks**

<!-- Describe any known limitations with your change -->

**Applicable issues**

<!-- Enter any applicable Issues here (You can reference an issue using #) -->
- fixes #

**Additional information**

<!-- If there's anything else that's important and relevant to your pull
request, mention that information here.-->
87 changes: 87 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: '[CI/CD] Go'

on:
pull_request:
branches:
- main
paths:
- 'pkg/**'
push:
branches:
- main
paths:
- 'pkg/**'

# Remove all permissions by default
permissions: {}
jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'

- name: Get changed src code
id: changed-files
uses: tj-actions/changed-files@v35
with:
dir_names: "true"
dir_names_max_depth: "2"
files: |
pkg/**
- name: Test
if: steps.changed-files.outputs.any_changed == 'true'
run: |
for dir in ${{ steps.changed-files.outputs.all_changed_files }}; do
go test -v ./${dir}/...
done
check:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'

- name: Get changed src code
id: changed-files
uses: tj-actions/changed-files@v35
with:
dir_names: "true"
dir_names_max_depth: "2"
files: |
pkg/**
- name: Format
if: steps.changed-files.outputs.any_changed == 'true'
run: |
exit_code=0
for dir in ${{ steps.changed-files.outputs.all_changed_files }}; do
if [ "$(gofmt -s -l ./${dir} | wc -l)" -gt 0 ]; then
exit_code=1
fi
done
exit $exit_code
- name: golangci-lint
uses: golangci/[email protected]
with:
args: "--out-${NO_FUTURE}format colored-line-number"
only-new-issues: true
skip-cache: true
skip-build-cache: true
version: latest
10 changes: 7 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Project-local vscode config
.vscode/

# Test binary, built with `go test -c`
*.test

Expand All @@ -19,3 +19,7 @@

# Go workspace file
go.work

# Output dir
dist/
out/
17 changes: 17 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Contributor Code of Conduct

As contributors and maintainers of this project, we pledge to respect everyone who contributes by posting issues, updating documentation, submitting pull requests, providing feedback in comments, and any other activities.

Communication through any of Bitnami's channels (GitHub, mailing lists, Twitter, and so on) must be constructive and never resort to personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.

We promise to extend courtesy and respect to everyone involved in this project, regardless of gender, gender identity, sexual orientation, disability, age, race, ethnicity, religion, or level of experience. We expect anyone contributing to this project to do the same.

If any member of the community violates this code of conduct, the maintainers of this project may take action, including removing issues, comments, and PRs or blocking accounts, as deemed appropriate.

If you are subjected to or witness unacceptable behavior, or have any other concerns, please communicate with us.

If you have suggestions to improve this Code of Conduct, please submit an issue or PR.

**Attribution**

This Code of Conduct is adapted from the Angular project available at this page: https://github.com/angular/code-of-conduct/blob/master/CODE_OF_CONDUCT.md
16 changes: 16 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Contributing

We'd love for you to contribute to this project. You can do that by either submitting issues or pull requests.

# Submitting Changes

Before submitting a change:

* Verify that every commit passes all tests (make test)
* Include tests for the new feature of bug fix
* Make sure the code passes the included linter rules (make lint)

Once every works as expected:

* Push your changes to a branch in your fork of the repository
* Submit a pull request

0 comments on commit d81cc88

Please sign in to comment.