jochettino / fisojo Goto Github PK
View Code? Open in Web Editor NEWThe ugliest Fisheye CR notifier for Slack
The ugliest Fisheye CR notifier for Slack
In order to let this app exists in a container-orchestration system we need to add a container definition and we are going to use docker for this
Fijoso prints a due date in Slack which is different in Fisheye
Example:
Slack --> "Due on 24 May 23:30"
Fisheye --> "24 May 23:05PM"
To deploy fisojo in a k8s cluster we need a deployment definition and we need this deployment definition to have the configmap -> env variables mapping
https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/
Right now fisojo uses its config.props file to obtain config values when we "deploy" it in a local machine. This config is now a local file.
So, to let fisojo being able to be deployed in a container-orchestration system we need to place that config in some place, and k8s configmap could be one option.
The "@blablubli" doens't work. Replace it by a link to the Fisheye user profile.
Implementating ConfigHandler interface, create a new way to read the config based on environment variables, which it will be useful for running Fisojo into a container.
Getting the fisheye auth token is very manual. We are launching ugly curls like this
$ curl -X POST -H 'Content-type: application/x-www-form-urlencoded' 'https://<fe-server>/rest-service-fecru/auth/login?userName=<username>&password=<passowrd>' {"token":"username:12345:blablablablablablabla"}
I would be nice an script to do the dirty job
Replace the "println" by a logger with levels (e.g. log4j)
Now the output is too verbose.
By default it should run ERROR level.
We could specify a "--debug" line parameter to set DEBUG level.
If you are creating a new Fisheye CR (let's call it "CR-100") and other person creates and publishes another CR just before (let's call it "CR-101"), the second one, 101, is published and annotated as "last CR seen". When CR-100 is published, 100 < 101, so it is not notified.
Currently, Fisojo only can get reviews from one Fisheye project and publish to one slack webhook, so N instances are needed for N projects.
It could be nice one Fisojo to rule them all :)
Now it is set manually in the config file under the "fisheye.lastCrNumber" prop. It's a pain in the ass because in each execution this number should be set to avoid repeat CR publications.
We could create a file, eg. ".lastCr" where we could store this number and updated in each publication, so if we restart fisojo the number persist.
Note: In the future, when fisojo handles several FE projects, it should handle several "lastCr", one per project, so we can create a folder called ".lastCr" for keeping a file per project.
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.