Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revive the project 😎
Browse files Browse the repository at this point in the history
NoComment1105 committed Jan 13, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent a48d1e8 commit 129bf7a
Showing 44 changed files with 1,068 additions and 345 deletions.
2 changes: 0 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -12,8 +12,6 @@ indent_style = tab

[*.kt]
indent_style = tab
ij_kotlin_name_count_to_use_star_import = 99999
ij_kotlin_name_count_to_use_star_import_for_members = 99999

[*.properties]
indent_style = space
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
custom: ['https://www.buymeacoffee.com/hyacinthbots']
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATES/blank-issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: Blank issue
about: Please only use this template if you know what you're doing.
title: ''
labels: ''
assignees: ''

---
49 changes: 49 additions & 0 deletions .github/ISSUE_TEMPLATES/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Bug Report
description: Create a bug report to help us improve ModMail!
labels:
- bug
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
Before continuing, please make sure there are no similar issues on [the issue tracker](https://github.com/HyacinthBots/ModMailBot/issues). If there are, consider contributing your information there instead!
- type: textarea
id: what-happened
attributes:
label: What happened?
description: 'Also tell us what did you expect to happen? PLease provide some reproduction steps: What did you do to trigger this bug?'
placeholder: Tell us what you see!
value: "A bug happened!"
validations:
required: true
- type: textarea
id: screenshots
attributes:
label: Screenshots
description: If applicable, add screenshots to help explain your issue.
placeholder: You can add images by clicking on the button in the bar that will appear one you click this textbox.
validations:
required: false
- type: textarea
id: logs
attributes:
label: Relevant log output
description: If your running your own ModMail instance, please provide some logs that generated when your issue occurred. This will be automatically formatted into code, so no need for backticks.
render: bash
- type: input
id: modmail-version
attributes:
label: ModMail Version
description: If you're running your own ModMail instance, place provided the version of the JAR you are running
placeholder: ModMail-1.5-all.jar
validations:
required: false
- type: textarea
id: additional-context
attributes:
label: Additional context
description: Add any other context about the problem here.
validations:
required: false
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATES/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Join the Discord for support with ModMail!
url: https://discord.gg/jQJnav2jPu
about: If you're looking for support, it's easier for the ModMail development team to support you through our Discord server. If you're not looking for support, please check for a duplicate of your issue before opening a report. Thanks!
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATES/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2
enable-beta-ecosystems: true

updates:
- package-ecosystem: "gradle"
target-branch: "main"
directory: "/"

schedule:
interval: "weekly"

- package-ecosystem: "github-actions"
target-branch: "main"
directory: "/"

schedule:
interval: "weekly"
21 changes: 11 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -10,22 +10,23 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v2
- name: Set up JDK 21
uses: actions/setup-java@v4

with:
distribution: 'temurin'
java-version: 17
java-version: 21

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build Artifacts
uses: gradle/gradle-build-action@v2
with:
arguments: build --stacktrace
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Build Project
run: ./gradlew build --stacktrace

- name: Extract Current Branch name
shell: bash
@@ -35,8 +36,8 @@ jobs:
id: ref

- name: Upload build artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4

with:
name: build-artifacts-${{ steps.ref.outputs.branch }}
path: build/libs/*[0-9].jar
path: build/libs/*[0-9].jar
21 changes: 11 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -11,26 +11,27 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v2
- name: Set up JDK 21
uses: actions/setup-java@v4

with:
distribution: 'temurin'
java-version: 17
java-version: 21

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build Artifacts
uses: gradle/gradle-build-action@v2
with:
arguments: build --stacktrace
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Build Project
run: ./gradlew build --stacktrace

- name: Upload artifacts GitHub
uses: AButler/upload-release-assets@v2.0
uses: AButler/upload-release-assets@v3.0

with:
files: 'build/libs/*.jar'
repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion HEADER
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2022 NoComment1105 <nocomment1105@outlook.com>
Copyright (c) 2022-2025 NoComment1105 <nocomment1105@outlook.com>

This file is part of ModMail.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2022 NoComment1105 <nocomment1105@outlook.com>
Copyright (c) 2022-2025 NoComment1105 <nocomment1105@outlook.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
71 changes: 51 additions & 20 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,35 +1,53 @@

import dev.kordex.gradle.plugins.kordex.DataCollection
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
application

kotlin("jvm")
kotlin("plugin.serialization")

id("com.github.jakemarsden.git-hooks")
id("com.github.johnrengelman.shadow")
id("io.gitlab.arturbosch.detekt")
id("org.cadixdev.licenser")
alias(libs.plugins.kotlin)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.shadow)
alias(libs.plugins.detekt)
alias(libs.plugins.git.hooks)
alias(libs.plugins.kord.extensions.plugin)
alias(libs.plugins.licenser)
}

group = "org.hyacinthbots.modmailbot"
version = "1.0-SNAPSHOT"
val javaTarget = 17

val className = "org.hyacinthbots.modmailbot.ModMailBotKt"
val javaTarget = "21"

repositories {
mavenCentral()

maven {
name = "Kord Snapshots"
url = uri("https://repo.kord.dev/snapshots")
}

maven {
name = "Kord Extensions (Releases)"
url = uri("https://releases-repo.kordex.dev")
}

maven {
name = "Kord Extensions (Snapshots)"
url = uri("https://snapshots-repo.kordex.dev")
}

maven {
name = "Sonatype Snapshots (Legacy)"
url = uri("https://oss.sonatype.org/content/repositories/snapshots")
}

maven {
name = "Sonatype Snapshots"
url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots")
url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
}
}

@@ -41,17 +59,36 @@ dependencies {

// Logging dependencies
implementation(libs.logback)
implementation(libs.logback.groovy)
implementation(libs.logging)
implementation(libs.groovy)
implementation(libs.jansi)

// Formatting
detektPlugins(libs.detekt)

// Database
implementation(libs.kmongo)
implementation(libs.mongo.driver)
implementation(libs.mongo.bson)
}

kordEx {
addDependencies = false
addRepositories = false
ignoreIncompatibleKotlinVersion = true

bot {
dataCollection(DataCollection.None)
}

i18n {
classPackage = "modmailbot.i18n"
translationBundle = "modmailbot.strings"
}
}

application {
mainClass.set("org.hyacinthbots.modmailbot.ModMailBot.kt")
mainClass.set(className)
}

gitHooks {
@@ -60,24 +97,18 @@ gitHooks {
)
}

kotlin {
jvmToolchain(javaTarget)
}

tasks {
withType<KotlinCompile> {
compilerOptions {
jvmTarget.set(JvmTarget.fromTarget(javaTarget.toString()))
jvmTarget.set(JvmTarget.fromTarget(javaTarget))
languageVersion.set(KotlinVersion.fromVersion(libs.versions.kotlin.get().substringBeforeLast(".")))
freeCompilerArgs.add("-opt-in=kotlin.RequiresOptIn")
incremental = true
}
}
jar {
manifest {
attributes(
"Main-Class" to "org.hyacinthbots.modmailbot.ModMailBot.kt"
)
attributes("Main-Class" to className)
}
}

@@ -93,7 +124,7 @@ tasks {

detekt {
buildUponDefaultConfig = true
config = files("$rootDir/detekt.yml")
config.setFrom("$rootDir/detekt.yml")

autoCorrect = true
}
Loading

0 comments on commit 129bf7a

Please sign in to comment.