-
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.
Merge pull request #7 from polarityio/develop
Updating Github Actions & Added config.json
- Loading branch information
Showing
6 changed files
with
154 additions
and
71 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,58 +1,11 @@ | ||
# This workflow will run on merge of a PR or push to master | ||
# It will run the integration developement checklist and if that passes | ||
# creates a new release with the Release and Tag name both being the | ||
# package.json version and will with a created tgz file and the SHA256 has in the release body | ||
|
||
|
||
name: Release Current Version | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
branches: [ master, main ] | ||
|
||
jobs: | ||
release-current-version: | ||
runs-on: ubuntu-latest | ||
container: 'centos:7' | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
- name: Get NPM Version | ||
id: package-version | ||
uses: martinbeentjes/npm-get-version-action@95bc31c6dd3145896c110e382f840bb1e750d09c | ||
- name: Create Build | ||
id: create_build | ||
run: | | ||
npm install && | ||
cd .. && | ||
tar --exclude="./${{ github.event.repository.name }}/.git" --exclude="./${{ github.event.repository.name }}/.gitignore" --exclude="./${{ github.event.repository.name }}/package-lock.json" --exclude="./${{ github.event.repository.name }}/.github" -czvf "${{ github.event.repository.name }}-${{ steps.package-version.outputs.current-version }}.tgz" "./${{ github.event.repository.name }}" && | ||
echo "::set-output name=build_hash::$(sha256sum '${{ github.event.repository.name }}-${{ steps.package-version.outputs.current-version }}.tgz' | grep -oE '^[^ ]*' )" && | ||
cd ${{ github.event.repository.name }} | ||
- name: Polarity Integration Development Checklist | ||
id: int-dev-checklist | ||
uses: polarityio/polarity-integration-development-checklist@v1.0.0 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Create Versioned Release | ||
id: create_versioned_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.package-version.outputs.current-version}} | ||
release_name: ${{ steps.package-version.outputs.current-version}} | ||
body: | | ||
SHA256: ${{ steps.create_build.outputs.build_hash }} | ||
draft: false | ||
prerelease: false | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_versioned_release.outputs.upload_url }} | ||
asset_path: ../${{ github.event.repository.name }}-${{ steps.package-version.outputs.current-version}}.tgz | ||
asset_name: ${{ github.event.repository.name }}-${{ steps.package-version.outputs.current-version}}.tgz | ||
asset_content_type: application/gzip | ||
Run: | ||
uses: polarityio/polarity-github-actions/.github/workflows/release-server-versions-for-int-store.yml@master | ||
# with: | ||
# use-integration-development-checklist: false |
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 |
---|---|---|
|
@@ -32,3 +32,5 @@ node_modules/ | |
test-runner.js | ||
|
||
.polarity.conf | ||
|
||
state.json |
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,132 @@ | ||
{ | ||
"name": "Slack", | ||
"acronym": "SLACK", | ||
"description": "Send Messages to Slack directly from the Overlay, and Search Entities in Slack Channel Messages.", | ||
"entityTypes": [ | ||
"*" | ||
], | ||
"styles": [ | ||
"./styles/styles.less" | ||
], | ||
"defaultColor": "light-gray", | ||
"block": { | ||
"component": { | ||
"file": "./components/block.js" | ||
}, | ||
"template": { | ||
"file": "./templates/block.hbs" | ||
} | ||
}, | ||
"request": { | ||
"cert": "", | ||
"key": "", | ||
"passphrase": "", | ||
"ca": "", | ||
"proxy": "", | ||
"rejectUnauthorized": true | ||
}, | ||
"logging": { | ||
"level": "info" | ||
}, | ||
"options": [ | ||
{ | ||
"key": "url", | ||
"name": "Slack API URL", | ||
"description": "The URL of the Slack API you would like to connect to", | ||
"default": "https://slack.com/api", | ||
"type": "text", | ||
"userCanEdit": false, | ||
"adminOnly": true | ||
}, | ||
{ | ||
"key": "userToken", | ||
"name": "User Token", | ||
"description": "The API User Token associated with the your Polarity Slack App. Your User Token should start with \"xoxp-###...\". Optional if you don't wish to search and uncheck \"Allow Searching Slack Messages\"", | ||
"default": "", | ||
"type": "password", | ||
"userCanEdit": false, | ||
"adminOnly": true | ||
}, | ||
{ | ||
"key": "botToken", | ||
"name": "Bot Token", | ||
"description": "The API Bot Token associated with the your Polarity Slack App. Your User Token should start with \"xoxb-###...\"", | ||
"default": "", | ||
"type": "password", | ||
"userCanEdit": false, | ||
"adminOnly": true | ||
}, | ||
{ | ||
"key": "allowSearchingMessages", | ||
"name": "Allow Searching Slack Messages", | ||
"description": "If checked, all entities will be search in Slack. (This option must be set to \"Users can view only\" or \"Users can view and edit\")", | ||
"default": true, | ||
"type": "boolean", | ||
"userCanEdit": true, | ||
"adminOnly": false | ||
}, | ||
{ | ||
"key": "sortBy", | ||
"name": "Sort Message Search Results By", | ||
"description": "Return the search results in a particular order", | ||
"default": { | ||
"value": "score,desc", | ||
"display": "Best Search Match First" | ||
}, | ||
"type": "select", | ||
"options": [ | ||
{ | ||
"value": "score,desc", | ||
"display": "Best Search Match First" | ||
}, | ||
{ | ||
"value": "timestamp,desc", | ||
"display": "Most Recent Search Match First" | ||
}, | ||
{ | ||
"value": "timestamp,asc", | ||
"display": "Oldest Search Match First" | ||
} | ||
], | ||
"multiple": false, | ||
"userCanEdit": true, | ||
"adminOnly": false | ||
}, | ||
{ | ||
"key": "allowSendingMessages", | ||
"name": "Allow Sending Slack Messages", | ||
"description": "If checked, a prompt will show for every entity searched, regardless of Search Results, allowing you to send a message to any Channels listed below. (This option must be set to \"Users can view only\" or \"Users can view and edit\")", | ||
"default": true, | ||
"type": "boolean", | ||
"userCanEdit": true, | ||
"adminOnly": false | ||
}, | ||
{ | ||
"key": "messagingChannelNames", | ||
"name": "Slack Channel Names for Messages", | ||
"description": "A comma separated list of Channels Names anyone using the Integration can send a messages to. If you want to send messages to a private channel, you must send a message in the channel containing \"@Polarity\" in it first.", | ||
"default": "general", | ||
"type": "text", | ||
"userCanEdit": true, | ||
"adminOnly": false | ||
}, | ||
{ | ||
"key": "messagingDisplayName", | ||
"name": "Slack Messaging Display Name", | ||
"description": "The name you wish to use when Posting Messages on Slack Channels. If left empty the default display name will just be \"Polarity\".", | ||
"default": "", | ||
"type": "text", | ||
"userCanEdit": true, | ||
"adminOnly": false | ||
}, | ||
{ | ||
"key": "addEntityToMessageByDefault", | ||
"name": "Add Entity Value to Message By Default", | ||
"description": "If checked, the entity value will be added to the Slack Messaging Box in the Overlay by Default", | ||
"default": true, | ||
"type": "boolean", | ||
"userCanEdit": true, | ||
"adminOnly": false | ||
} | ||
] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,13 @@ | ||
{ | ||
"main": "./integration.js", | ||
"name": "slack", | ||
"version": "3.0.1-beta", | ||
"version": "3.0.2-beta", | ||
"private": true, | ||
"license": "MIT", | ||
"author": "Polarity", | ||
"dependencies": { | ||
"lodash": "^4.17.21", | ||
"node-cache": "^5.1.2", | ||
"postman-request": "*" | ||
"postman-request": "^2.88.1-postman.31" | ||
} | ||
} |