-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved code from private repository --------- Co-authored-by: EmmaAndersen <[email protected]>
- Loading branch information
0 parents
commit 4e2b89c
Showing
28 changed files
with
2,331 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = false | ||
|
||
[*.{yaml,yml,json,md}] | ||
indent_size = 2 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Bug report | ||
description: File a bug report | ||
title: "[Bug]: " | ||
labels: [bug] | ||
body: | ||
- type: input | ||
id: contact | ||
attributes: | ||
label: Contact Details | ||
description: How can we get in touch with you if we need more info? | ||
placeholder: ex. [email protected] | ||
validations: | ||
required: false | ||
- type: textarea | ||
id: description | ||
attributes: | ||
label: Describe the bug | ||
description: A clear and concise description of what the bug is. | ||
value: "A bug happened!" | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: reproduce | ||
attributes: | ||
label: "Steps to reproduce the behavior" | ||
description: Your bug has a higher chance of being fixed if it can be reproduced by others. Therefore, it's very good to try to create a minimum setup that displays the erroneous behaviour (e.g. create a failing unit test, etc...) | ||
validations: | ||
required: true | ||
- type: dropdown | ||
id: os | ||
attributes: | ||
label: OS | ||
description: What OS are you seeing the bug on? | ||
multiple: true | ||
options: | ||
- Windows | ||
- Linux | ||
- macOS | ||
- type: textarea | ||
id: logs | ||
attributes: | ||
label: Relevant log output | ||
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. | ||
render: sh | ||
- type: textarea | ||
id: additional | ||
attributes: | ||
label: Additional Notes | ||
description: Add any other context about the problem here. | ||
- type: checkboxes | ||
id: terms | ||
attributes: | ||
label: Code of Conduct | ||
description: By submitting this issue, you agree to follow our [Code of Conduct](https://example.com) | ||
options: | ||
- label: I agree to follow this project's Code of Conduct | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Axis OSS Support | ||
url: https://github.com/orgs/AxisCommunications/discussions | ||
about: Please ask and answer questions here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Feature request | ||
description: Suggest a new feature | ||
title: "[Request]: " | ||
labels: [enhancement] | ||
body: | ||
- type: input | ||
id: contact | ||
attributes: | ||
label: Contact Details | ||
description: How can we get in touch with you if we need more info? | ||
placeholder: ex. [email protected] | ||
validations: | ||
required: false | ||
- type: textarea | ||
id: description | ||
attributes: | ||
label: Is your feature request related to a problem? | ||
description: A clear and concise description of what the problem is. | ||
value: "Ex. I'm always frustrated when [...]" | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: solution | ||
attributes: | ||
label: "A clear and concise description of what you want to happen." | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: additional | ||
attributes: | ||
label: Additional Notes | ||
description: Add any other context about the problem here. | ||
- type: checkboxes | ||
id: terms | ||
attributes: | ||
label: Code of Conduct | ||
description: By submitting this issue, you agree to follow our [Code of Conduct](https://example.com) | ||
options: | ||
- label: I agree to follow this project's Code of Conduct | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Vet & Test | ||
description: Vet and test package | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Vet | ||
shell: bash | ||
run: go vet ./... | ||
|
||
- name: Test | ||
shell: bash | ||
run: go test ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: gomod | ||
directory: / | ||
schedule: | ||
interval: weekly | ||
groups: | ||
go-dependencies: | ||
patterns: | ||
- "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: "Conventional Commit PR title" | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
|
||
permissions: | ||
pull-requests: read | ||
|
||
jobs: | ||
main: | ||
name: Validate PR title | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: amannn/action-semantic-pull-request@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "**.go" | ||
|
||
jobs: | ||
vet-and-test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Test and vet application | ||
uses: ./.github/actions/vet-test | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
needs: vet-and-test | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: go-semantic-release/action@v1 | ||
with: | ||
hooks: goreleaser | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Unit tests | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize, assigned, review_requested] | ||
push: | ||
branches-ignore: | ||
- main | ||
|
||
jobs: | ||
vet-and-test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Test and vet application | ||
uses: ./.github/actions/vet-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# 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 | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
|
||
# Go workspace file | ||
go.work | ||
|
||
# Visual Studio Code workspace settings | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
builds: | ||
- skip: true |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @SalladinBalwer @EmmaAndersen @a354dpa @chrlmrtnssn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as | ||
contributors and maintainers pledge to making participation in our project and | ||
our community a harassment-free experience for everyone, regardless of age, body | ||
size, disability, ethnicity, sex characteristics, gender identity and expression, | ||
level of experience, education, socio-economic status, nationality, personal | ||
appearance, race, religion, or sexual identity and orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment | ||
include: | ||
|
||
- Using welcoming and inclusive language | ||
- Being respectful of differing viewpoints and experiences | ||
- Gracefully accepting constructive criticism | ||
- Focusing on what is best for the community | ||
- Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
- The use of sexualized language or imagery and unwelcome sexual attention or | ||
advances | ||
- Trolling, insulting/derogatory comments, and personal or political attacks | ||
- Public or private harassment | ||
- Publishing others' private information, such as a physical or electronic | ||
address, without explicit permission | ||
- Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable | ||
behavior and are expected to take appropriate and fair corrective action in | ||
response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or | ||
reject comments, commits, code, wiki edits, issues, and other contributions | ||
that are not aligned to this Code of Conduct, or to ban temporarily or | ||
permanently any contributor for other behaviors that they deem inappropriate, | ||
threatening, offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies both within project spaces and in public spaces | ||
when an individual is representing the project or its community. Examples of | ||
representing a project or community include using an official project e-mail | ||
address, posting via an official social media account, or acting as an appointed | ||
representative at an online or offline event. Representation of a project may be | ||
further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported by contacting the project team at <[email protected]>. All | ||
complaints will be reviewed and investigated and will result in a response that | ||
is deemed necessary and appropriate to the circumstances. The project team is | ||
obligated to maintain confidentiality with regard to the reporter of an incident. | ||
Further details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good | ||
faith may face temporary or permanent repercussions as determined by other | ||
members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, | ||
available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html> | ||
|
||
[homepage]: https://www.contributor-covenant.org | ||
|
||
For answers to common questions about this code of conduct, see | ||
<https://www.contributor-covenant.org/faq> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Contributing | ||
|
||
Please use the github issue tracker for any bugs or feature requests, | ||
email sent to the maintainer(s) will probably not be acted upon. | ||
|
||
If you would like to contribute bug fixes or new components, | ||
make sure there is an existing issue for it, and make a pull | ||
request referencing the issue. | ||
|
||
We use [conventional commits](https://www.conventionalcommits.org) to write commit messages. | ||
If your changes cause problems with how the library was used before, | ||
don't forget to write `BREAKING CHANGE:` inside the commit message body, | ||
followed by a description of what has changed and how to adapt for it. | ||
|
||
## Getting started | ||
|
||
After cloning this repository, make sure you have go 1.20 or later installed. | ||
Running `go test ./..` should indicate if your go installation is working correctly. | ||
|
||
### Testing | ||
|
||
Make sure your changes pass linting and unit testing locally to save time with your PR, | ||
by running `go vet ./...` and `go test ./...`. | ||
If you add a new feature, please write a new unit test to catch any future regressions. | ||
|
||
Most components have unit tests, and basic proper behaviour is always | ||
tested. | ||
If you contribute a new component, please make sure it has appropriate | ||
unit tests with sufficient coverage. | ||
|
||
### Code formatting | ||
|
||
To make sure tests don't fail on format problems, it's recommended to use a | ||
golang plugin for you editor, or to run `go fmt ./...` before committing | ||
any changes. | ||
|
||
## Creating PRs | ||
|
||
Whenever you want to apply your changes to the upstream repository, | ||
you can create a pull request (PR). You can find general information | ||
on making pull requests on GitHub. | ||
|
||
When you are ready to push your changes, | ||
make sure you include a proper version tag in your commit by running: | ||
|
||
```sh | ||
git tag -a v<semVer> -m "<change description>" | ||
``` | ||
|
||
where you should select a version (`<semVer>`) based on if your changes introduce | ||
(possible) breaking changes (`major`), new feature additions (`minor`), | ||
or just fixes a bug (`patch`). This is in accordance with [module version numbering](https://go.dev/doc/modules/version-numbers) | ||
|
||
## Continuous integration | ||
|
||
### Verification | ||
|
||
Automated tests are run on the `main` branch and pull requests with GitHub Actions, | ||
for which the configuration can be found in the `.github/workflows/test.yml` file. | ||
These tests always need to pass before a PR can be merged. |
Oops, something went wrong.