-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from HussainLatiff/main
Add the initial project structure
- Loading branch information
Showing
28 changed files
with
936 additions
and
4 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# | ||
# https://help.github.com/articles/dealing-with-line-endings/ | ||
# | ||
# Linux start script should use lf | ||
/gradlew text eol=lf | ||
|
||
# These are Windows script files and should use crlf | ||
*.bat text eol=crlf |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
## Purpose | ||
|
||
## Examples | ||
|
||
## Checklist | ||
- [ ] Linked to an issue | ||
- [ ] Updated the changelog | ||
- [ ] Added tests | ||
- [ ] Updated the spec | ||
- [ ] Checked native-image compatibility |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: GraalVM Check | ||
|
||
on: | ||
schedule: | ||
- cron: "30 18 * * *" | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
call_stdlib_workflow: | ||
name: Run StdLib Workflow | ||
if: ${{ github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository_owner == 'ballerina-platform') }} | ||
uses: ballerina-platform/ballerina-library/.github/workflows/build-with-bal-test-graalvm-connector-template.yml@main | ||
secrets: inherit |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- 2201.[0-9]+.x | ||
repository_dispatch: | ||
types: check_connector_for_breaking_changes | ||
|
||
jobs: | ||
call_workflow: | ||
name: Run Connector Build Workflow | ||
if: ${{ github.repository_owner == 'ballerina-platform' }} | ||
uses: ballerina-platform/ballerina-library/.github/workflows/build-connector-template.yml@main | ||
secrets: inherit | ||
with: | ||
repo-name: module-ballerinax-discord |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Daily build | ||
|
||
on: | ||
schedule: | ||
- cron: "30 2 * * *" | ||
|
||
jobs: | ||
call_workflow: | ||
name: Run Daily Build Workflow | ||
if: ${{ github.repository_owner == 'ballerina-platform' }} | ||
uses: ballerina-platform/ballerina-library/.github/workflows/daily-build-connector-template.yml@main | ||
secrets: inherit | ||
with: | ||
repo-name: module-ballerinax-discord |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Publish to the Ballerina Dev\Stage Central | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
type: choice | ||
description: Select Environment | ||
required: true | ||
options: | ||
- DEV CENTRAL | ||
- STAGE CENTRAL | ||
|
||
jobs: | ||
call_workflow: | ||
name: Run Dev\Stage Central Publish Workflow | ||
if: ${{ github.repository_owner == 'ballerina-platform' }} | ||
uses: ballerina-platform/ballerina-library/.github/workflows/dev-stage-central-publish-connector-template.yml@main | ||
secrets: inherit | ||
with: | ||
environment: ${{ github.event.inputs.environment }} |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: PR Build | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
call_workflow: | ||
name: Run PR Build Workflow | ||
if: ${{ github.repository_owner == 'ballerina-platform' }} | ||
uses: ballerina-platform/ballerina-library/.github/workflows/pr-build-connector-template.yml@main | ||
secrets: inherit | ||
with: | ||
additional-test-flags: ${{ github.event.pull_request.head.repo.full_name != github.repository && '-x test' || ''}} |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Publish Release | ||
|
||
on: | ||
workflow_dispatch: | ||
repository_dispatch: | ||
types: [ stdlib-release-pipeline ] | ||
|
||
jobs: | ||
call_workflow: | ||
name: Run Release Workflow | ||
if: ${{ github.repository_owner == 'ballerina-platform' }} | ||
uses: ballerina-platform/ballerina-library/.github/workflows/release-package-connector-template.yml@main | ||
secrets: inherit | ||
with: | ||
package-name: discord | ||
package-org: ballerinax |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Trivy | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "30 20 * * *" | ||
|
||
jobs: | ||
call_workflow: | ||
name: Run Trivy Scan Workflow | ||
if: ${{ github.repository_owner == 'ballerina-platform' }} | ||
uses: ballerina-platform/ballerina-library/.github/workflows/trivy-scan-template.yml@main | ||
secrets: inherit |
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,24 +1,59 @@ | ||
# Compiled class file | ||
*.class | ||
|
||
*.balx | ||
# Log file | ||
*.log | ||
|
||
generated | ||
#Config file | ||
Config.toml | ||
|
||
# BlueJ files | ||
*.ctxt | ||
|
||
# Mobile Tools for Java (J2ME) | ||
.mtj.tmp/ | ||
|
||
# .DS_Store files | ||
*.DS_Store | ||
|
||
# Package Files # | ||
*.jar | ||
!gradle/wrapper/gradle-wrapper.jar | ||
*.war | ||
*.nar | ||
*.ear | ||
*.zip | ||
*.tar.gz | ||
*.rar | ||
*.deb | ||
|
||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
hs_err_pid* | ||
replay_pid* | ||
|
||
# Ignore everything in this directory | ||
target | ||
.classpath | ||
.settings | ||
.project | ||
*.iml | ||
*.iws | ||
*.ipr | ||
.idea | ||
.m2 | ||
.vscode/ | ||
# Ignore ballerina files | ||
accessToken.bal | ||
temp.bal.ballerina/ | ||
target/ | ||
.DS_Store | ||
*Ballerina.lock | ||
.ballerina | ||
|
||
# Ignore Gradle project-specific cache directory | ||
.gradle | ||
|
||
# Ignore Gradle build output directory | ||
build | ||
|
||
# Ignore Docker env file | ||
docker.env |
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 +1,75 @@ | ||
# module-ballerinax-discord | ||
## module-balerinax-discord | ||
|
||
### Prerequisites | ||
|
||
1. Download and install Java SE Development Kit (JDK) version 17. You can download it from either of the following sources: | ||
|
||
* [Oracle JDK](https://www.oracle.com/java/technologies/downloads/) | ||
* [OpenJDK](https://adoptium.net/) | ||
|
||
> **Note:** After installation, remember to set the `JAVA_HOME` environment variable to the directory where JDK was installed. | ||
2. Download and install [Ballerina Swan Lake](https://ballerina.io/). | ||
|
||
3. Download and install [Docker](https://www.docker.com/get-started). | ||
|
||
> **Note**: Ensure that the Docker daemon is running before executing any tests. | ||
4. Export Github Personal access token with read package permissions as follows, | ||
|
||
```bash | ||
export packageUser=<Username> | ||
export packagePAT=<Personal access token> | ||
``` | ||
|
||
### Build options | ||
|
||
Execute the commands below to build from the source. | ||
|
||
1. To build the package: | ||
|
||
```bash | ||
./gradlew clean build | ||
``` | ||
|
||
2. To run the tests: | ||
|
||
```bash | ||
./gradlew clean test | ||
``` | ||
|
||
3. To build the without the tests: | ||
|
||
```bash | ||
./gradlew clean build -x test | ||
``` | ||
|
||
4. To run tests against different environment: | ||
|
||
```bash | ||
./gradlew clean test -Pgroups=<Comma separated groups/test cases> | ||
``` | ||
|
||
5. To debug package with a remote debugger: | ||
|
||
```bash | ||
./gradlew clean build -Pdebug=<port> | ||
``` | ||
|
||
6. To debug with the Ballerina language: | ||
|
||
```bash | ||
./gradlew clean build -PbalJavaDebug=<port> | ||
``` | ||
|
||
7. Publish the generated artifacts to the local Ballerina Central repository: | ||
|
||
```bash | ||
./gradlew clean build -PpublishToLocalCentral=true | ||
``` | ||
|
||
8. Publish the generated artifacts to the Ballerina Central repository: | ||
|
||
```bash | ||
./gradlew clean build -PpublishToCentral=true | ||
``` |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[package] | ||
distribution = "2201.8.6" | ||
org = "ballerinax" | ||
name= "discord" | ||
version = "0.1.0" | ||
license = ["Apache-2.0"] | ||
authors = ["Ballerina"] | ||
keywords = ["Communication/discord", "Cost/Free"] | ||
icon = "icon.png" | ||
repository = "https://github.com/HussainLatiff/module-ballerinax-discord" | ||
|
||
[build-options] | ||
observabilityIncluded = true |
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# AUTO-GENERATED FILE. DO NOT MODIFY. | ||
|
||
# This file is auto-generated by Ballerina for managing dependency versions. | ||
# It should not be modified by hand. | ||
|
||
[ballerina] | ||
dependencies-toml-version = "2" | ||
distribution-version = "2201.8.6" | ||
|
||
[[package]] | ||
org = "ballerina" | ||
name = "jballerina.java" | ||
version = "0.0.0" | ||
|
||
[[package]] | ||
org = "ballerina" | ||
name = "observe" | ||
version = "1.2.3" | ||
dependencies = [ | ||
{org = "ballerina", name = "jballerina.java"} | ||
] | ||
|
||
[[package]] | ||
org = "ballerinai" | ||
name = "observe" | ||
version = "0.0.0" | ||
dependencies = [ | ||
{org = "ballerina", name = "jballerina.java"}, | ||
{org = "ballerina", name = "observe"} | ||
] | ||
modules = [ | ||
{org = "ballerinai", packageName = "observe", moduleName = "observe"} | ||
] | ||
|
||
[[package]] | ||
org = "ballerinax" | ||
name = "discord" | ||
version = "0.1.0" | ||
dependencies = [ | ||
{org = "ballerinai", name = "observe"} | ||
] | ||
modules = [ | ||
{org = "ballerinax", packageName = "discord", moduleName = "discord"} | ||
] | ||
|
Empty file.
Empty file.
Oops, something went wrong.