ahelal / bender Goto Github PK
View Code? Open in Web Editor NEWA Concourse resource that can trigger and pass parameters to jobs using slack
License: MIT License
A Concourse resource that can trigger and pass parameters to jobs using slack
License: MIT License
When searching through users for the bot, the script errors saying unable to find bot name
because the bot name is on the second page of results and the request does not take advantage of Slack's api pagination.
The postMessage call should specify as_user
(https://api.slack.com/methods/chat.postMessage) otherwise the default bot icon and name will be displayed on Slack.
for example ,even I specified releasebot, it still refere to bender
fly -t xxx check-resource --resource yyy/slack-trigger
error: check failed with exit status '1':
Unable to find bot name 'bender'
Not sure if this repo is still being supported.
But im getting this after i tag the bot:
resource script '/opt/resource/check []' failed: exit status 1
stderr:
Traceback (most recent call last):
File "/opt/resource/check_op.py", line 99, in <module>
main()
File "/opt/resource/check_op.py", line 91, in main
slack_client = Check(**payload.args)
File "/opt/resource/check_op.py", line 15, in __init__
Base.__init__(self, **kwargs)
File "/opt/resource/base.py", line 20, in __init__
self.users = self._call_api("users.list", presence=0)
File "/opt/resource/base.py", line 33, in _call_api
api_response = self.slack_client.api_call(method, **kwargs)
File "/usr/lib/python2.7/site-packages/slackclient/client.py", line 85, in api_call
result = json.loads(self.server.api_call(method, timeout=timeout, **kwargs))
File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
# Jobs
- name: trigger-release
serial: true
public: true
plan:
- get: bender
version: every
trigger: true
# Resource Types
- name: bender-resource
type: docker-image
source:
repository: quay.io/ahelal/bender
tag: latest
# Resource
- name: bender
type: bender-resource
source:
slack_token: <token>
channel: "slack_test_channel"
I've configured test pipeline in Concourse which can't run because of such error on check state:
run check step: run check step: check: resource script '/opt/resource/check []' failed: exit status 1
stderr:
Slack API Call failed. method=groups.list response={u'headers': {u'content-length': u'228', u'x-xss-protection': u'0', u'x-content-type-options': u'nosniff', u'content-encoding': u'gzip', u'x-slack-req-id': u'2ef72a597f01e52fa537f02cb4f370d1', u'access-control-expose-headers': u'x-slack-req-id, retry-after', u'vary': u'Accept-Encoding', u'x-via': u'haproxy-www-bd9a', u'expires': u'Mon, 26 Jul 1997 05:00:00 GMT', u'server': u'Apache', u'access-control-allow-origin': u'*', u'x-slack-backend': u'r', u'strict-transport-security': u'max-age=31536000; includeSubDomains; preload', u'pragma': u'no-cache', u'cache-control': u'private, no-cache, no-store, must-revalidate', u'date': u'Sun, 14 Jun 2020 22:56:27 GMT', u'x-oauth-scopes': u'app_mentions:read,channels:history,channels:read,chat:write,chat:write.customize,commands,emoji:read,files:read,files:write,groups:history,groups:read,im:history,im:read,incoming-webhook,links:read,links:write,mpim:history,mpim:write,pins:read,pins:write,reactions:read,reactions:write,team:read,users:read,usergroups:read,mpim:read,groups:write,users:write', u'referrer-policy': u'no-referrer', u'content-type': u'application/json; charset=utf-8', u'access-control-allow-headers': u'slack-route, x-slack-version-ts, x-b3-traceid, x-b3-spanid, x-b3-parentspanid, x-b3-sampled, x-b3-flags'}, u'ok': False, u'response_metadata': {u'messages': [u'[ERROR] This method is retired and can no longer be used. Please use conversations.list or users.conversations instead. Learn more: https://api.slack.com/changelog/2020-01-deprecating-antecedents-to-the-conversations-api.']}, u'error': u'method_deprecated'}
Could you help me with this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.