Skip to content

Commit 186517e

Browse files
ChandruShettyahsan-z-khanazhouwdAnqiPangdavidhsingyuchen
committed
Initial commit
Co-authored-by: Ahsan Khan <amzahsa@amazon.com> Co-authored-by: Ang Zhou <angzh@amazon.com> Co-authored-by: Anqi Pang <anqipans@amazon.com> Co-authored-by: Hsing-Yu Chen <davidhyc@amazon.com> Co-authored-by: Justin Alvarez <alvajus@amazon.com> Co-authored-by: Kevin Li <cnkevin@amazon.com> Co-authored-by: Monirul Islam <monirulu@amazon.com> Co-authored-by: Mrudul Harwani <mharwani@amazon.com> Co-authored-by: Sam Berning <bernings@amazon.com> Co-authored-by: Vishwas Siravara <siravara@amazon.com> Co-authored-by: Weike Qu <weikequ@amazon.com> Co-authored-by: Ziwen Ning <ningziwe@amazon.com>
0 parents  commit 186517e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+4620
-0
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Issue #, if available:
2+
3+
*Description of changes:*
4+
5+
*Testing done:*
6+
7+
8+
9+
- [ ] I've reviewed the guidance in CONTRIBUTING.md
10+
11+
12+
#### License Acceptance
13+
14+
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

.github/dependabot.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "gomod"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
commit-message:
8+
# When a dependency is updated,
9+
# we want release-please to treat the corresponding commit as a releasable unit
10+
# because it may contain a security fix.
11+
#
12+
# Re. how that is achieved, see `changelog-types` in workflows/release-please.yml.
13+
prefix: "build"
14+
include: "scope"
15+
- package-ecosystem: "github-actions"
16+
directory: "/"
17+
schedule:
18+
interval: "daily"
19+
commit-message:
20+
prefix: "ci"
21+
include: "scope"

.github/workflows/ci.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
jobs:
10+
go-linter:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: actions/setup-go@v3
15+
with:
16+
go-version-file: go.mod
17+
cache: true
18+
- name: golangci-lint
19+
uses: golangci/golangci-lint-action@v3
20+
with:
21+
# Pin the version in case all the builds start to fail at the same time.
22+
# There may not be an automatic way (e.g., dependabot) to update a specific parameter of a Github Action,
23+
# so we will just update it manually whenever it makes sense (e.g., a feature that we want is added).
24+
version: v1.50.0
25+
args: --fix=false

.github/workflows/lint-pr-title.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: "Lint PR Title"
2+
3+
on:
4+
# TODO: Change to pull_request_target after the repo is public.
5+
pull_request:
6+
types:
7+
- opened
8+
- edited
9+
- reopened
10+
- synchronize
11+
12+
jobs:
13+
main:
14+
name: conventional-commit
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: amannn/action-semantic-pull-request@v5
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release-please.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
name: release-please
6+
jobs:
7+
release-please:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: google-github-actions/release-please-action@v3
11+
with:
12+
release-type: go
13+
package-name: finch
14+
# Include 'build' in the changelog and
15+
# make it a releasable unit (patch version bump) because dependabot PRs uses it.
16+
# For more details, see ../dependabot.yml.
17+
#
18+
# The mapping from type to section comes from conventional-commit-types [1]
19+
# which is used by action-semantic-pull-request [2],
20+
# which is used by us.
21+
#
22+
# [1] https://github.com/commitizen/conventional-commit-types/blob/master/index.json
23+
# [2] https://github.com/amannn/action-semantic-pull-request/blob/0b14f54ac155d88e12522156e52cb6e397745cfd/README.md?plain=1#L60
24+
changelog-types: >
25+
[
26+
{
27+
"type":"feat",
28+
"section":"Features",
29+
"hidden":false
30+
},
31+
{
32+
"type":"fix",
33+
"section":"Bug Fixes",
34+
"hidden":false
35+
},
36+
{
37+
"type":"build",
38+
"section":"Build System or External Dependencies",
39+
"hidden":false
40+
}
41+
]
42+
# Before we are at v1.0.0
43+
bump-minor-pre-major: true

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.vscode
2+
*.idea

.golangci.yml

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# The sections in this file are ordered in the order presented in https://golangci-lint.run/usage/configuration/.
2+
# The nested fields are ordered alphabetically.
3+
4+
linters-settings:
5+
goheader:
6+
template-path: copyright_header
7+
goimports:
8+
local-prefixes: github.com/runfinch/tests
9+
gosec:
10+
config:
11+
G306: "0o644"
12+
lll:
13+
# 145 is just a lax value as we don't want this to be too strict.
14+
line-length: 145
15+
tab-width: 4
16+
makezero:
17+
always: true
18+
nolintlint:
19+
require-explanation: true
20+
require-specific: true
21+
stylecheck:
22+
# ST1003 is left out because it is a bit opinionated.
23+
checks: ["all", "-ST1003"]
24+
linters:
25+
enable:
26+
- errname
27+
- errorlint
28+
- exportloopref
29+
- forcetypeassert
30+
- gocritic
31+
- godot
32+
- gofumpt
33+
- goheader
34+
- goimports
35+
- gosec
36+
- lll
37+
- makezero
38+
- misspell
39+
- nilerr
40+
- nilnil
41+
- nolintlint
42+
- nosprintfhostport
43+
- paralleltest
44+
- predeclared
45+
- reassign
46+
- revive
47+
- testableexamples
48+
- unconvert
49+
- unparam
50+
- usestdlibvars
51+
# TODO: Enable wastedassign after https://github.com/sanposhiho/wastedassign/issues/41 is fixed.
52+
# - wastedassign
53+
- whitespace
54+
- stylecheck
55+
issues:
56+
# Some checks enabled in the stylecheck setting are disabled by default
57+
# (e.g., https://golangci-lint.run/usage/false-positives/#exc0013),
58+
# so we need to enable them explicitly here.
59+
exclude-use-default: false
60+
fix: true

CODE_OF_CONDUCT.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
## Code of Conduct
2+
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
3+
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
4+
opensource-codeofconduct@amazon.com with any additional questions or comments.

CONTRIBUTING.md

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Contributing Guidelines
2+
3+
Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional
4+
documentation, we greatly value feedback and contributions from our community.
5+
6+
Please read through this document before submitting any issues or pull requests to ensure we have all the necessary
7+
information to effectively respond to your bug report or contribution.
8+
9+
10+
## Reporting Bugs/Feature Requests
11+
12+
We welcome you to use the GitHub issue tracker to report bugs or suggest features.
13+
14+
When filing an issue, please check existing open, or recently closed, issues to make sure somebody else hasn't already
15+
reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:
16+
17+
* A reproducible test case or series of steps
18+
* The version of our code being used
19+
* Any modifications you've made relevant to the bug
20+
* Anything unusual about your environment or deployment
21+
22+
23+
## Contributing via Pull Requests
24+
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
25+
26+
1. You are working against the latest source on the *main* branch.
27+
2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
28+
3. You open an issue to discuss any significant work - we would hate for your time to be wasted.
29+
30+
To send us a pull request, please:
31+
32+
1. Fork the repository.
33+
2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
34+
3. Ensure local tests pass.
35+
4. Commit to your fork using clear commit messages.
36+
5. Send us a pull request, answering any default questions in the pull request interface.
37+
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
38+
39+
GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
40+
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
41+
42+
43+
## Finding contributions to work on
44+
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start.
45+
46+
47+
## Code of Conduct
48+
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
49+
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
50+
opensource-codeofconduct@amazon.com with any additional questions or comments.
51+
52+
53+
## Security issue notifications
54+
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.
55+
56+
57+
## Licensing
58+
59+
See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.

0 commit comments

Comments
 (0)