kyma-incubator / github-slack-connectors Goto Github PK
View Code? Open in Web Editor NEWProvide an easy integration of Github or Slack API and Events for Kyma.
License: Apache License 2.0
Provide an easy integration of Github or Slack API and Events for Kyma.
License: Apache License 2.0
NOTE
Merged to issue #49
Description
During tests some bugs and shortcomings have came up. They need to be fixed
AC
Description
Lambdas need subscribtion to certain events in Event-Bus so they can be triggered by them - in order to do that, we need to get familiar with Subscription Custom Resource and Event Activation CR.
AC
Description
To allow GitHub webhooks to send us events we have to expose an address outside of Kyma.
AC
Description
Task was moved to #99
Add the required milestones to our zenhub board
Description
This task seems obsolete so we're closing it.
Description
During Code Review it turned out that our component application registry can be improved. We should refactor it to be more readable, useful (for example in mocking) and golang style using interfaces.
AC
DESCRIPTION
In order to understand the concept of existence of Github Connector in Kyma ecosystem, we need to do research about core components and connections between them.
AC
Understanding of core components and connections between them.
Description
To ensure that our component is well-documented, we need to validate existing docs and update them if necessary, plus add the parts of documentation which are missing.
AC
Description
In order to keep information about future plans for the product in one place there is /docs/roadmap.md file waiting to be filled. It should provide some sort of summary for future development plans of the project in a semi-technical language so it doesn't repeat things that are included in concept.md.
AC
DESCRIPTION
It is necessary to handle errors that can occur during runtime of existing structure of the connector.
AC
Description
To protect the project from regression-related errors and to automate part of our DoD, we need to integrate basic Continuous Integration into our project. For the start, it would be enough to block merging unless all unit tests pass. The recommended tool for that is prow and it is used in Kyma. There is no need to set up our own prow, we can use the existing one and add new job configuration to it.
AC
DESCRIPTION
In order to use application in Kyma ecosystem we need to register our app in Application Registry Component. To achieve this we need to create Application CR.
AC
DESCRIPTION
After creating basic structure of description of GitHub events in AsyncAPI standard we need to add another layer which uses references to obtain complete format.
AC
Description
Our Slack Connector needs to be deployed in Kyma environment. To achieve this goal we could create Kubernetes resources and deploy them one after the other, but we can automate this process by creating Helm chart.
AC
In order to document our progress there is a need to describe the content of release. We have decided to list added features in form of short descriptions starting with infinitive verbs
AC
Description
Main GitHub Connector's responsibility is to handle an endpoint, on which GitHub should send events. User has to configure webhook on GitHub, pointing to that endpoint, so GitHub knows where to send events. We should automate this creation process from our GItHub Connector.
AC
Description
For smoother planning this week we need to define scope of the next sprint.
Description
To register event in Kyma it has to meet the requirements of OpenAPI specification.
AC
DESCRIPTION
In order to start dealing with hack-showcase
review documentation it is necessary to determine the exact purpose of this document.
AC
/hack-showcase/README.md
Description
In order to implement the project concept's functionalities in our lambda functions we should experiment with the Azure Service. The expected outcome would be the idea for implementing mechanism of handling the Azure response in lambda. In other words, we should test a lot of possible comments (we can use those which are already on Kyma repository) and try to figure out what can we do with the response payload. Some of the ideas could be:
The other thing to research is the procedure for communicating with Azure Services - endpoints, payload formatting, auth etc.
AC
Description
At the moment our project's architecture is not clearly declared. We should create diagrams explaining and visualising our project architecture. My proposal is to use UML Sequence Diagram for the detailed flow inside the system, and any type of flow diagram (could look like those in Kyma docs) for the bigger picture (how components interact with each other on a higher level)
AC
Description
OpenAPI is an international standard for describing APIs. Kyma Application Registry requires it for service registration, so we need to find or prepare one for Slack API.
AC
Description
A new application boilerplate should be created. It should contain basic project structure for Slack Connector based on existing Github Connector. The project structure should cover domain directories for app's packages, so we can start working on functionalities separately. It should present shapes of structs and interfaces.
AC
Description
In order to create the Proof of Concept app we need a Github Connector application boilerplate. We are going to use Golang here, as it will make the process of integrating the connector into Kyma easier in the future. For the start, it should have:
AC
Description
We have created a script, which installs demo scenario of GitHub Connector usage in Kyma, but it's really simple and doesn't include any parameters validation nor explains how to use it. It should be developed.
AC
Description
Adding lambda from Kyma UI does the CR creation automatically, so it suits out test scenario - that way we can easily check if lambda is triggering correctly on given event. We should create a lambda from UI, add a trigger to it and check in logs if the event is handled correctly.
AC
DESCRIPTION
To write tests of good quality we need to prepare the list of questions/problems that we want to discuss during the workshop organized for us.
AC
Description
Lambda function which is triggered on incoming github event should be extended with functions for building a slack message from github payload and sending it to slack channel.
AC
Description
In order to document our progress, we want every sprint review demo to be available as release on our repository. This requires creating a description with links to PRs covered in this particular release and publishing the release it on repository
AC
Description
To communicate with Slack from within Kyma we need to register it in Application Registry. We should check if it can be registered once or every channel has to be registered separately.
AC
http://application-registry-external-api.kyma-integration.svc.cluster.local:8081/{APPNAME}/v1/metadata/services
Description
Defining an Event Activation Custom Resource for events that are currently implemented in Github Connector (which for now are 'issue opened' and 'pull request review comment') is necessary for Lambda triggering. Those should be automatically deployed with our Helm Chart as part of Github Connector deployment.
AC
Description
Defining a Subcription Custom Resource for events that are currently implemented in Github Connector (which for now are 'issue opened' and 'pull request review comment') is necessary for Lambda triggering. Those should be automatically deployed with our Helm Chart as part of Github Connector deployment.
AC
Description
In order to maintain the kyma level of documentation, we need to check if all the links in our documentation are alive. We can set up a job in Prow to achieve that
AC
DESCRIPTION
In order to allow events from GitHub enter the Kyma ecosystem we need to create service which will parse JSON files to format accepted by Event Service component.
Note
$data = '{"event-type": "'.$this->event_type.'", "event-type-version": "'.$this->event_version.'", "event-id": "'. $this->gen_uuid() .'","event-time": "'.date("c",time()).'","data": {'.$data.'}}';
AC
Description
Create the definition of done for our team workflow.
AC
Description
At some moment of development we may need Redis serving as a test-database. We should get to know how to manage it, so we can use it in the future.
Example scenario would be adding some of the events incoming from Github webhooks to Redis through a lambda (e.g. instead of console logging a message when lambda is triggered by an event we could add some log to redis)
AC
Description
For now Github Connector catches the webhook's payload and console log the event in handler method. The event handler needs to be modified so instead of console logging the incoming event it should use event-parser to form proper payload and send it to Kyma. It is supposed to act this way:
AC
Description
AsyncAPI is an international standard for describing events from APIs. Kyma Application Registry requires it for service registration, so we need to find or prepare one for Slack API.
AC
Description
Using one of Azure Services is a part of the project concept. To use it, we need to call given endpoint from lambda with proper credentials provided by Azure Service Broker. The idea is to send some information from Github webhook payload (most likely a PR comment content and title) to Azure Text Analytics and handle the response - based on sentiment. The lambda should perform a proper action when the comment is breaking Code of Conduct - it can be private Slack message to the person responsible for community.
AC
DESCRIPTION
We have to connect all the elements, that we were working on, together into one complete component with demo functionalities.
Moreover we need to prepare the presentation that we're going to show on the sprint review.
AC
Description
AC
Description
We need a simple and fast way to install our GitHub Connector inside Kyma. To do so we will use helm. We have to:
AC
Tidy up our zenhub board and create a task template
DESCRIPTION
In order to present our work to wider audience, there is a need to update the review of hack-showcase
.
AC
In some points it may be reasonable to utilise the contents of GitHub Connector's README.md
Description
Before lambda function can subscribe an event with Subscription CR, a Service Instance CR must be created. It depends on Service Class CR external name, which is generated randomly, so it's necessary to get it automatically. We can do it using a Kubernetes Job
AC
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.