-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
22 changed files
with
228 additions
and
172 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 |
---|---|---|
@@ -1,36 +1,69 @@ | ||
# Branch naming convention | ||
# Branch Naming Convention | ||
|
||
## Branch naming | ||
This document outlines the branch naming convention to be followed for our project/repository. Consistent and descriptive branch names help us maintain a clear and organized codebase. | ||
|
||
> Please note for new pull requests create new branches from current `dev` branch only. | ||
## Types of Branches | ||
|
||
Branch name should include type of your contribution and context. Please follow next pattern for naming your branches: | ||
### 1. Feature Branches | ||
|
||
```bash | ||
feature/add-some-feature | ||
technical/some-technical-improvements | ||
bugfix/fix-some-bug-name | ||
``` | ||
Feature branches are used to develop new features or enhancements. They should be created from the `main` branch. | ||
|
||
## Before PR actions | ||
Naming Convention: `feature/descriptive-feature-name` | ||
|
||
### Squash commits | ||
Example: `feature/user-authentication` | ||
|
||
Please squash all branch commits into the one before opening your PR from your fork. It's simple to do with the git: | ||
### 2. Bugfix Branches | ||
|
||
```bash | ||
git rebase -i [hash your first commit of your branch]~1 | ||
git rebase -i 6467fe36232401fa740af067cfd8ac9ec932fed2~1 # example | ||
``` | ||
Bugfix branches are used to address and fix bugs or issues in the code. They should be created from the `main` branch. | ||
|
||
### Add commit description | ||
Naming Convention: `bugfix/descriptive-bug-description` | ||
|
||
Please complete your commit description following next pattern: | ||
Example: `bugfix/navigation-bar-overflow` | ||
|
||
```code | ||
Technical/Add info files # should be the same name as your branch name | ||
### 3. Hotfix Branches | ||
|
||
* Added license, changelog, contributing, code of conduct docs | ||
* Added GitHub templates | ||
* Updated project license link | ||
``` | ||
Hotfix branches are used to address critical issues that need immediate attention and cannot wait for the next regular release. They should be created from the `main` branch. | ||
|
||
Naming Convention: `hotfix/descriptive-hotfix-description` | ||
|
||
Example: `hotfix/critical-security-vulnerability` | ||
|
||
## Special Cases | ||
|
||
### 1. Release Branches | ||
|
||
Release branches are used to prepare the codebase for a new release. They are created from the `main` branch when the code is ready for deployment. They might be prefixed with the release version. | ||
|
||
Naming Convention: `release/version` | ||
|
||
Example: `release/1.0.0` | ||
|
||
### 2. Main Branch | ||
|
||
The main branch is the primary branch of the repository and represents the latest stable version of the project. | ||
|
||
Branch Name: `main` | ||
|
||
## General Guidelines | ||
|
||
- Use lowercase letters for branch names. | ||
- Use hyphens to separate words in the branch names (e.g., `feature/new-feature`). | ||
- Keep branch names concise and descriptive. | ||
- Avoid using abbreviations or acronyms unless they are widely understood in the context of the project. | ||
|
||
## Examples | ||
|
||
### Good Examples | ||
|
||
- `feature/user-profile` | ||
- `bugfix/login-page-styling` | ||
- `hotfix/404-page-error` | ||
|
||
### Bad Examples | ||
|
||
- `f/newfeature` (too short and lacks descriptive information) | ||
- `fix` (not descriptive enough) | ||
|
||
Remember to always follow this branch naming convention to ensure clarity and consistency in our code repository. | ||
|
||
If you have any questions or need further clarification, feel free to reach out to the team. |
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 |
---|---|---|
@@ -1,68 +1,25 @@ | ||
<!-- Thanks for sending a pull request! Here are some tips for you: | ||
### Description | ||
[Provide a brief description of the changes in this pull request.] | ||
|
||
1. If this is your first time contributing to this project, please read our contributor guidelines: [Link to contributor guidelines] | ||
2. Please label this pull request according to what type of change you are addressing. | ||
3. Ensure you have added or run the appropriate tests for your PR. | ||
4. If you want *faster* PR reviews, please follow our best practices: [Link to best practices] | ||
5. If the PR is unfinished, please mark it accordingly. | ||
--> | ||
### Related Issue | ||
[Reference any related issue(s) or feature request(s) here. For example: "Closes #123"] | ||
|
||
#### What type of PR is this? | ||
### Changes Made | ||
[Explain the changes you made in this pull request. Include any relevant details about code modifications, added features, or bug fixes.] | ||
|
||
<!-- | ||
Add one of the following kinds: | ||
/kind bug | ||
/kind cleanup | ||
/kind documentation | ||
/kind feature | ||
### Screenshots (if applicable) | ||
[If your changes include visual updates or additions, provide screenshots to showcase them.] | ||
|
||
Optionally add one or more of the following kinds if applicable: | ||
/kind api-change | ||
/kind deprecation | ||
/kind failing-test | ||
/kind flake | ||
/kind regression | ||
--> | ||
### How to Test | ||
[Explain how reviewers or others can test your changes. Include specific steps, commands, or scenarios to verify the functionality.] | ||
|
||
#### What this PR does / why we need it: | ||
### Checklist | ||
- [ ] I have followed the coding style guidelines of the project. | ||
- [ ] My code passes all existing unit tests. | ||
- [ ] I have added new unit tests to cover the changes where applicable. | ||
- [ ] I have updated the documentation to reflect the changes. | ||
- [ ] My changes do not introduce any new warnings or errors. | ||
- [ ] I have tested my changes thoroughly. | ||
|
||
#### Which issue(s) this PR fixes: | ||
<!-- | ||
*Automatically closes linked issue when PR is merged. | ||
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`. | ||
_If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_* | ||
--> | ||
Fixes # | ||
|
||
#### Special notes for your reviewer: | ||
|
||
#### Does this PR introduce a user-facing change? | ||
<!-- | ||
If no, just write "NONE" in the release-note block below. | ||
If yes, a release note is required: | ||
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required". | ||
--> | ||
```release-note | ||
``` | ||
|
||
#### Additional documentation e.g., usage docs, etc.: | ||
|
||
<!-- | ||
This section can be blank if this pull request does not require a release note. | ||
When adding links which point to resources within git repositories, like | ||
KEPs or supporting documentation, please reference a specific commit and avoid | ||
linking directly to the master branch. This ensures that links reference a | ||
specific point in time, rather than a document that may change over time. | ||
See here for guidance on getting permanent links to files: https://help.github.com/en/articles/getting-permanent-links-to-files | ||
Please use the following format for linking documentation: | ||
- [KEP]: <link> | ||
- [Usage]: <link> | ||
- [Other doc]: <link> | ||
--> | ||
```docs | ||
``` | ||
### Additional Notes | ||
[Include any additional information, context, or notes that might be helpful for reviewers.] |
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 |
---|---|---|
@@ -1,7 +1,22 @@ | ||
## Security | ||
# Security Policy | ||
|
||
If you discover a security issue, please bring it to my attention! | ||
## Reporting a Vulnerability | ||
We take the security of our project seriously. If you believe you have found a security vulnerability in this repository, please help by following responsible disclosure practices. | ||
|
||
### Reporting a Vulnerability | ||
**Please do not submit a regular issue or a pull request for security-related matters.** | ||
|
||
If you have information about a security issue, or vulnerability in this package, kindly send your report. | ||
Instead, please report the vulnerability directly. We will strive to provide a timeline for resolution and disclosure of the vulnerability. | ||
|
||
Please include the following details in your report: | ||
|
||
- A clear description of the vulnerability, including steps to reproduce it. | ||
- The affected versions of the project. | ||
- Any additional information that could help us understand and mitigate the issue. | ||
|
||
## Scope | ||
This security policy applies only to the code present in this repository. If you have identified a vulnerability in a third-party library or dependency used by this project, please follow responsible disclosure practices and report it to the maintainers of that project. | ||
|
||
## Security Updates | ||
We strive to keep our project dependencies up-to-date. However, as with any software, vulnerabilities may be discovered over time. Please keep an eye on this repository and our releases for any security updates. | ||
|
||
Thank you for helping to keep our project safe and secure! |
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
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
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 |
---|---|---|
|
@@ -18,4 +18,4 @@ repos: | |
hooks: | ||
- id: codespell | ||
exclude: | | ||
(?x)^.*(\.json)$ | ||
(?x)^.*(\.go)$ |
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 |
---|---|---|
@@ -1,11 +1,25 @@ | ||
FROM alpine:3.14.1 | ||
# Use the latest Alpine as the base image | ||
FROM alpine:latest | ||
|
||
COPY --from=golang:1.16-alpine /usr/local/go/ /usr/local/go/ | ||
|
||
# Install necessary dependencies for building Go applications | ||
RUN apk add --no-cache ca-certificates git | ||
|
||
# Set the latest Go version as an environment variable | ||
ENV GO_VERSION=1.20.0 | ||
|
||
# Download and install the latest Go binary | ||
RUN wget -q https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz && \ | ||
tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz && \ | ||
rm go${GO_VERSION}.linux-amd64.tar.gz | ||
|
||
# Add Go binaries to the system path | ||
ENV PATH="/usr/local/go/bin:${PATH}" | ||
|
||
# Set the working directory | ||
WORKDIR /go/src/github.com/lindsaygelle/nook | ||
|
||
# Copy the application source code into the container | ||
COPY . . | ||
|
||
RUN go mod download all | ||
# Download and cache the Go module dependencies | ||
RUN go mod download |
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
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 |
---|---|---|
@@ -1,7 +1,10 @@ | ||
package nook | ||
|
||
// Animal is the animal type of an Animal Crossing character. | ||
// Animal represents the animal type of an Animal Crossing character. | ||
type Animal struct { | ||
Key Key | ||
// Key is a unique identifier for the animal type. | ||
Key Key | ||
|
||
// Name contains the names of the animal type in different languages. | ||
Name Languages | ||
} |
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# Animal | ||
Animal exports the various type of animals found in the Animal Crossing series. | ||
Animal exports the various type of animals found in the Animal Crossing series. |
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
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 |
---|---|---|
@@ -1,13 +1,25 @@ | ||
package nook | ||
|
||
// Character is a representation of the common attributes for Animal Crossing characters. | ||
// Character is a composite type that combines various attributes of an Animal Crossing character. | ||
type Character struct { | ||
// Animal represents the animal type of the character. | ||
Animal | ||
|
||
// Birthday contains the birthday information of the character. | ||
Birthday Birthday | ||
Code Code | ||
Key Key | ||
Gender Gender | ||
Name Languages | ||
Special bool | ||
|
||
// Code is a unique identifier for the character. | ||
Code Code | ||
|
||
// Key is a unique identifier for the character. | ||
Key Key | ||
|
||
// Gender represents the gender of the character. | ||
Gender Gender | ||
|
||
// Name contains the names of the character in different languages. | ||
Name Languages | ||
|
||
// Special indicates whether the character is special or has a unique role. | ||
Special bool | ||
} |
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
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 |
---|---|---|
@@ -1,12 +1,14 @@ | ||
package nook | ||
|
||
// Code is the unique identifier assigned to an Animal Crossing character. | ||
// Codes are based on the data mined from the various Animal Crossing games. | ||
// Code represents the unique identifier assigned to an Animal Crossing character. | ||
// These codes are based on data mined from various Animal Crossing games. | ||
type Code struct { | ||
// Value holds the actual unique identifier code. | ||
Value string | ||
} | ||
|
||
// Ok returns a boolean indicating whether the Code information is complete. | ||
func (v Code) Ok() bool { | ||
return v.Value != "" | ||
// Ok returns a boolean indicating whether the Code information is complete and valid. | ||
// It checks if the Value field has been set, meaning the code is not an empty string. | ||
func (c Code) Ok() bool { | ||
return c.Value != "" | ||
} |
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
package nook | ||
|
||
// Gender is the gender of an Animal Crossing character. | ||
// Gender represents the gender of an Animal Crossing character. | ||
type Gender struct { | ||
// Name contains the gender name of the character in different languages. | ||
Name Languages | ||
} |
Oops, something went wrong.