feat: initial release

This commit is contained in:
The0Mikkel 2024-05-28 00:36:17 +02:00
parent 6e6aa6cc10
commit 408bedb035
7 changed files with 7813 additions and 0 deletions

11
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,11 @@
name: Release
on:
push:
branches:
- main
jobs:
release:
name: Release
uses: the0mikkel/ci/.github/workflows/semver-release.yml@v1.1.4

1
.gitignore vendored
View File

@ -161,3 +161,4 @@ cython_debug/
**.env
!**.env.example
node_modules

36
.releaserc.json Normal file
View File

@ -0,0 +1,36 @@
{
"branches": [
"main",
{
"name": "develop",
"prerelease": "r"
}
],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/github",
{
"successComment": false
}
],
[
"@semantic-release/npm",
{
"npmPublish": false
}
],
"@semantic-release/git"
]
}

86
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,86 @@
# Contributing to Ollama discord chatbot
Thank you for considering contributing to the project!
## Reporting Issues
If you encounter a bug, have a suggestion, or wish to discuss improvements, please open an issue in the repository. When reporting issues, provide detailed information, steps to reproduce, and, if possible, screenshots or logs to help us understand and resolve the problem efficiently.
## Code Contributions
1. **Fork the Repository:** Fork the project repository to your GitHub account.
2. **Branching:** Create a new branch from the `develop` branch for your changes. Use descriptive branch names that reflect the changes made. If you are working on an issue, reference the issue number in your branch name (e.g., `feature/123`). See the [Branch Naming](#branch-naming) section for more information.
3. **Commit Guidelines:** Follow our [Versioning Guidelines](#versioning-guidelines) to use commit messages that bump the versioning. We recommend also doing this in squash commits.
For general commits, follow descriptive commit messages that succinctly describe the changes made.
Reference any related issues or pull requests in your commits using appropriate keywords (e.g., "Fix #123").
4. **Code Style:** Maintain consistent code style and formatting as per the existing project standards.
5. **Testing:** Ensure new code is accompanied by relevant tests where applicable.
6. **Pull Requests:** Submit a pull request against the `develop` branch. Provide a clear description of your changes, ensuring it aligns with the outlined issue or feature request.
### Versioning Guidelines
The project adheres to [semantic versioning](https://semver.org/) principles:
- **MAJOR version** for incompatible changes,
- **MINOR version** for backward-compatible functionality additions, and
- **PATCH version** for backward-compatible bug fixes.
### Automatic Versioning with semantic-release
the project uses [semantic-release](https://github.com/semantic-release/semantic-release) for versioning and releases. Upon merging changes into the `main` branch, semantic-release generates new versions and publishes them. Merges to `develop` creates pre-releases.
Commit messages follow this format for automated versioning: `<type>(<category>): <message>`
#### Commit Types:
Commit types are:
- `fix` - For bug fixes or minor changes. Bumps the PATCH version.
- `feat` - For new features. Bumps the MINOR version.
- `perf` - Major breaking changes. Bumps the MAJOR version.
*These are the main types, but there are others, such as `chore`, `docs`, `test`, etc. These will not trigger a version bump.*
*For more information, see [semantic-release](https://github.com/semantic-release/semantic-release).*
***Types are case-sensitive.***
#### Categories:
For categories, we don't have a full list, but this is a core list, of example categories:
- `core` - For core changes.
- `docs` - For documentation changes.
- `misc` - For miscellaneous changes.
- `infra` - For infrastructure changes.
We suggest, trying to use a category that will fit, but if you can't find one, you can use `misc` or completely omit it (e.g., `feat: message`).
### Barnch naming:
When developing, we try to follow some guidelines for branch naming, when possible.
The main branches are:
- `main` - For stable releases.
- `develop` - For pre-releases.
For other branches, try the following naming convention:
- `feature/<issue>/<feature-name>` - For new features.
- `fix/<issue>/<fix-name>` - For bug fixes.
- `chore/<issue>/<chore-name>` - For miscellaneous changes.
- `docs/<issue>/<docs-name>` - For documentation changes.
- `test/<issue>/<test-name>` - For test changes.
- `refactor/<issue>/<refactor-name>` - For refactoring changes.
- `ci/<issue>/<ci-name>` - For CI/CD changes.
*`/<issue>` can be omitted if there is no related issue.*
### Code of Conduct
Review our [Code of Conduct](CODE_OF_CONDUCT.md) to understand the expected behavior within our community.
### Need Help?
If you have any questions or need clarification, try opening an issue in the repository. We will be happy to help!
Thank you for your interest in contributing to the project!

View File

@ -73,6 +73,13 @@ This is based on [mxyng/discollama](https://github.com/mxyng/discollama), but is
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Contributing
If you want to contribute to this project, you are more than welcome.
However, the project does use [semver](https://semver.org) for versioning, and the [conventional commits](https://www.conventionalcommits.org) for commit messages throug [semantic-release](https://github.com/semantic-release/semantic-release).
Please see the [CONTRIBUTING](CONTRIBUTING.md) file for more information.
## Author
This project is made by [Mikkel Albrechtsen](https://github.com/the0mikkel).

7653
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

19
package.json Normal file
View File

@ -0,0 +1,19 @@
{
"name": "ollama-discord-bot",
"version": "1.0.0",
"description": "This Discord chatbot is built to follow the chat flow and have a conversation with the user. The bot is built using the discord.py library, and the chat is stored in Redis. The number of messages to have in context is configurable.",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "MIT",
"devDependencies": {
"@semantic-release/commit-analyzer": "^12.0.0",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^10.0.5",
"@semantic-release/npm": "^12.0.1",
"@semantic-release/release-notes-generator": "^13.0.0",
"conventional-changelog-conventionalcommits": "^8.0.0"
}
}