Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
32 changes: 32 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
release/
build/

vue/src/store/generated/
vue/node_modules/
vue/dist/

scripts/vars/

testutil/e2e/logs/
testutil/debugging/

ecosystem/**/package-lock.json

.github/
.git/
.idea/
.vscode/
.storage/
.vscode/
go.work
go.work.sum
*.md

Dockerfile
docker/docker-compose.*
cmd/**/Dockerfile

.dockerignore
.gcloudignore

Makefile
46 changes: 46 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: 🐛 Bug report
description: Create a report to help us squash bugs!
title: "[Bug]: "
labels: ["T:Bug"]

body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
Before smashing the submit button please review the template.

- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search existing issues to avoid creating duplicates.
options:
- label: I have searched the existing issues
required: true

- type: textarea
id: what-happened
attributes:
label: What happened?
description: Also tell us, what did you expect to happen?
placeholder: Tell us what you see!
value: "A bug happened!"
validations:
required: true

- type: input
attributes:
label: Smart Router Version
description: If applicable, specify the binary and the version you're using
placeholder: smartrouter v0.1, main, etc.
validations:
required: true

- type: textarea
id: reproduce
attributes:
label: How to reproduce?
description: If applicable could you describe how we could reproduce the bug
placeholder: Tell us what how to reproduce the bug!
validations:
required: false
41 changes: 41 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Feature Request
description: Create a proposal to request a feature
title: "[Feature]: "
labels: ["T:feature-request"]
body:
- type: markdown
attributes:
value: |
✰ Thanks for opening an issue! ✰
- type: textarea
id: summary
attributes:
label: Summary
description: |
What are the user needs?
How could this solution fix the user facing problem?
placeholder: Short, concise description of the proposed feature/changes to the repository
validations:
required: true
- type: textarea
id: problem
attributes:
label: Problem Definition
description: |
If applicable please answer the below questions
Why do we need this feature?
What problems may be addressed by introducing this feature?
What benefits does Lava stand to gain by including this feature?
Are there any disadvantages of including this feature?
placeholder: Description of the issue being faced
validations:
required: false
- type: textarea
id: proposal
attributes:
label: Proposed Feature
description: |
Description of the proposed features or changes to an existing feature to meet your needs
placeholder: Description of the proposed feature(s)
validations:
required: true
36 changes: 36 additions & 0 deletions .github/pr_labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
"C:cmd/smartrouter":
- changed-files:
- any-glob-to-any-file: "cmd/smartrouter/**/*"
"C:cmd/lavap":
- changed-files:
- any-glob-to-any-file: "cmd/lavap/**/*"
"C:cmd/common":
- changed-files:
- any-glob-to-any-file: "cmd/common/**/*"
"C:protocol":
- changed-files:
- any-glob-to-any-file: "protocol/**/*"
"C:ecosystem":
- changed-files:
- any-glob-to-any-file: "ecosystem/**/*"
"C:specs":
- changed-files:
- any-glob-to-any-file: "specs/**/*"
"C:utils":
- changed-files:
- any-glob-to-any-file: "utils/**/*"
"C:types":
- changed-files:
- any-glob-to-any-file: "types/**/*"
"C:scripts":
- changed-files:
- any-glob-to-any-file: "scripts/**/*"
"Type: Build":
- changed-files:
- any-glob-to-any-file: "Makefile"
- any-glob-to-any-file: "Dockerfile"
- any-glob-to-any-file: "go.mod"
- any-glob-to-any-file: "go.sum"
"Type: CI":
- changed-files:
- any-glob-to-any-file: ".github/**"
47 changes: 47 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Description

Closes: #XXXX

<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review. -->

---

## Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

* [ ] read the [contribution guide](https://github.com/magma-Devs/smart-router/blob/main/CONTRIBUTING.md)
* [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title, you can find examples of the prefixes below:
<!-- * `feat`: A new feature
* `fix`: A bug fix
* `docs`: Documentation only changes
* `style`: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
* `refactor`: A code change that neither fixes a bug nor adds a feature
* `perf`: A code change that improves performance
* `test`: Adding missing tests or correcting existing tests
* `build`: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
* `ci`: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
* `chore`: Other changes that don't modify src or test files
* `revert`: Reverts a previous commit -->
* [ ] confirmed `!` in the type prefix if API or client breaking change
* [ ] targeted the `main` branch
* [ ] provided a link to the relevant issue or specification
* [ ] reviewed "Files changed" and left comments if necessary
* [ ] included the necessary unit and integration tests
* [ ] updated the relevant documentation or specification, including comments for [documenting Go code](https://blog.golang.org/godoc)
* [ ] confirmed all CI checks have passed

## Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

* [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
* [ ] confirmed all author checklist items have been addressed
* [ ] reviewed state machine logic, API design and naming, documentation is accurate, tests and test coverage
53 changes: 53 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Lint

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache-dependency-path: go.sum

# golangci-lint is currently advisory on this repo: the fork is on
# Go 1.26 and earlier golangci-lint releases refuse to lint a newer
# toolchain than they were built with. Once a stable v2.x is pinned
# and known to produce a clean run against this codebase, drop the
# continue-on-error flags on the retries.
- name: Lint
uses: golangci/golangci-lint-action@v6
continue-on-error: true
id: lint_first_try
with:
version: latest
args: --config .golangci.yml -v

- name: Lint Retry 1
if: steps.lint_first_try.outcome == 'failure'
uses: golangci/golangci-lint-action@v6
continue-on-error: true
id: lint_retry_1
with:
version: latest
args: --config .golangci.yml -v

- name: Lint Retry 2
if: steps.lint_retry_1.outcome == 'failure'
uses: golangci/golangci-lint-action@v6
continue-on-error: true
id: lint_retry_2
with:
version: latest
args: --config .golangci.yml -v
47 changes: 47 additions & 0 deletions .github/workflows/lint_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: "Lint PR"

on:
pull_request_target:
types:
- opened
- edited
- synchronize

permissions:
contents: read

jobs:
main:
permissions:
pull-requests: write # for amannn/action-semantic-pull-request to analyze PRs
statuses: write # for amannn/action-semantic-pull-request to mark status of analyzed PR
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5.4.0
id: lint_pr_title
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: marocchino/sticky-pull-request-comment@v2
# When the previous steps fails, the workflow would stop. By adding this
# condition you can continue the execution with the populated error message.
if: always() && (steps.lint_pr_title.outputs.error_message != null)
with:
header: pr-title-lint-error
message: |
Hey there and thank you for opening this pull request! 👋🏼

We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted.

Details:

```
${{ steps.lint_pr_title.outputs.error_message }}
```

# Delete a previous comment when the issue has been resolved
- if: ${{ steps.lint_pr_title.outputs.error_message == null }}
uses: marocchino/sticky-pull-request-comment@v2
with:
header: pr-title-lint-error
delete: true
19 changes: 19 additions & 0 deletions .github/workflows/pr_labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: "Pull Request Labeler"

on:
- pull_request_target

permissions:
contents: read

jobs:
labeler:
permissions:
contents: read # for actions/labeler to determine modified files
pull-requests: write # for actions/labeler to add labels to PRs
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
with:
configuration-path: .github/pr_labeler.yml
repo-token: "${{ secrets.GITHUB_TOKEN }}"
Loading
Loading