Skip to content

Commit

Permalink
Merge pull request #127 from Chuhaa/master
Browse files Browse the repository at this point in the history
Remove listener module
  • Loading branch information
LakshanSS authored May 23, 2022
2 parents 935ded4 + 26c3ec8 commit f06e9ad
Show file tree
Hide file tree
Showing 61 changed files with 11 additions and 2,711 deletions.
17 changes: 2 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
env:
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }}
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }}
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true
run: |
./gradlew build
- name: Ballerina Build
uses: ballerina-platform/ballerina-action/@nightly
with:
args:
pack
env:
JAVA_HOME: /usr/lib/jvm/default-jvm
WORKING_DIR: ./slack
- name: Ballerina Test
uses: ballerina-platform/ballerina-action/@nightly
with:
args:
test --code-coverage
env:
JAVA_HOME: /usr/lib/jvm/default-jvm
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
SLACK_USERNAME: ${{ secrets.SLACK_USERNAME }}
WORKING_DIR: ./slack
Expand All @@ -56,4 +41,6 @@ jobs:
# Print the code coverage information
- name: Code Coverage
run: |
echo "Covered Code Lines : ${{fromJson(steps.test_results.outputs.testResultsJson).coveredLines}}"
echo "Total Code Lines : $(expr ${{fromJson(steps.test_results.outputs.testResultsJson).missedLines}} + ${{fromJson(steps.test_results.outputs.testResultsJson).coveredLines}})"
echo "Code Coverage Percentage : ${{fromJson(steps.test_results.outputs.testResultsJson).coveragePercentage}}"
23 changes: 2 additions & 21 deletions .github/workflows/daily-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,13 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Set up Java Environment
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

# Grant execute permission to the gradlew script
- name: Grant execute permission for gradlew
run: chmod +x gradlew

# Build the project with Gradle
- name: Build with Gradle
env:
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }}
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }}
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true
run: |
./gradlew build
# Build the ballerina project
- name: Ballerina Build
uses: ballerina-platform/ballerina-action/@nightly
with:
args:
pack
env:
JAVA_HOME: /usr/lib/jvm/default-jvm
WORKING_DIR: ./slack

# Test the ballerina project
Expand All @@ -53,7 +33,6 @@ jobs:
args:
test --code-coverage
env:
JAVA_HOME: /usr/lib/jvm/default-jvm
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
SLACK_USERNAME: ${{ secrets.SLACK_USERNAME }}
WORKING_DIR: ./slack
Expand All @@ -71,6 +50,8 @@ jobs:
# Print the code coverage information
- name: Code Coverage
run: |
echo "Covered Code Lines : ${{fromJson(steps.test_results.outputs.testResultsJson).coveredLines}}"
echo "Total Code Lines : $(expr ${{fromJson(steps.test_results.outputs.testResultsJson).missedLines}} + ${{fromJson(steps.test_results.outputs.testResultsJson).coveredLines}})"
echo "Code Coverage Percentage : ${{fromJson(steps.test_results.outputs.testResultsJson).coveragePercentage}}"
# Send notification when build fails
Expand Down
17 changes: 0 additions & 17 deletions .github/workflows/dev-stg-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,11 @@ jobs:
BALLERINA_${{ github.event.inputs.bal_central_environment }}_CENTRAL: true
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
env:
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }}
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }}
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true
run: |
./gradlew build
- name: Ballerina Build
uses: ballerina-platform/ballerina-action/@master
with:
args:
pack ./slack
env:
JAVA_HOME: /usr/lib/jvm/default-jvm
- name: Push to Staging
if: github.event.inputs.bal_central_environment == 'STAGE'
uses: ballerina-platform/ballerina-action/@master
Expand All @@ -46,7 +31,6 @@ jobs:
push
env:
WORKING_DIR: ./slack
JAVA_HOME: /usr/lib/jvm/default-jvm
BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_STAGE_ACCESS_TOKEN }}
- name: Push to Dev
if: github.event.inputs.bal_central_environment == 'DEV'
Expand All @@ -56,5 +40,4 @@ jobs:
push
env:
WORKING_DIR: ./slack
JAVA_HOME: /usr/lib/jvm/default-jvm
BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_DEV_ACCESS_TOKEN }}
15 changes: 0 additions & 15 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
env:
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }}
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }}
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true
run: |
./gradlew build
- name: Ballerina Build
uses: ballerina-platform/ballerina-action/@nightly
with:
args:
pack
env:
JAVA_HOME: /usr/lib/jvm/default-jvm
WORKING_DIR: ./slack
- name: Ballerina Test
uses: ballerina-platform/ballerina-action/@nightly
with:
args:
test
env:
JAVA_HOME: /usr/lib/jvm/default-jvm
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
SLACK_USERNAME: ${{ secrets.SLACK_USERNAME }}
WORKING_DIR: ./slack
15 changes: 0 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
env:
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }}
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }}
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true
run: |
./gradlew build
- name: Ballerina Build
uses: ballerina-platform/ballerina-action/@master
with:
Expand All @@ -30,13 +17,11 @@ jobs:
env:
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
SLACK_USERNAME: ${{ secrets.SLACK_USERNAME }}
JAVA_HOME: /usr/lib/jvm/default-jvm
- name: Ballerina Push
uses: ballerina-platform/ballerina-action/@master
with:
args:
push
env:
WORKING_DIR: ./slack
JAVA_HOME: /usr/lib/jvm/default-jvm
BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_ACCESS_TOKEN }}
11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ Ballerina Slack Connector
[Slack](https://api.slack.com/) is a channel-based messaging platform. With Slack, people can work together more effectively, connect all their software tools and services, and find the information they need to do their best work — all within a secure, enterprise-grade environment.

This connector allows you to access the Slack Web API and Slack Events API through Ballerina.
It provides the capability to query information from and perform some actions in a Slack workspace. It also allows you to listen to Slack Events such as `onMessage`, `onMemberJoinedChannel`, `onChannelCreated` and `onFileShared` etc.
It provides the capability to query information from and perform some actions in a Slack workspace.

For more information, go to the modules.
- [`slack`](slack/Module.md)
- [`slack.listener`](slack/modules/listener/Module.md)

## Building from the source

Expand All @@ -28,17 +27,13 @@ For more information, go to the modules.

Execute the commands below to build from the source.

1. To build the Gradle project:
```shell script
./gradlew build
```

2. To build the ballerina package:
1. To build the ballerina package:
```shell script
bal pack ./slack
```

3. To run tests after build:
2. To run tests after build:
```shell script
bal test ./slack
```
Expand Down
111 changes: 0 additions & 111 deletions build.gradle

This file was deleted.

Binary file removed docs/images/Token.png
Binary file not shown.
Binary file removed docs/images/eventSubscribe.png
Binary file not shown.
Binary file removed docs/images/requestURL.png
Binary file not shown.
Binary file removed docs/images/slackUserTokenScopes.png
Binary file not shown.
Binary file removed docs/images/slack_connector.png
Binary file not shown.
3 changes: 0 additions & 3 deletions gradle.properties

This file was deleted.

Binary file removed gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 0 additions & 5 deletions gradle/wrapper/gradle-wrapper.properties

This file was deleted.

Loading

0 comments on commit f06e9ad

Please sign in to comment.