GithubHelp home page GithubHelp logo

positivetechnologies / flower Goto Github PK

View Code? Open in Web Editor NEW
130.0 13.0 10.0 391 KB

Flower is a Clojure (and Emacs) library for integration with Github, Gitlab, Atlassian Jira, Microsoft TFS, Microsoft Exchange and Slack. It also may be used from Java. More integrations with task trackers, repositories and messaging systems coming soon!

License: MIT License

Clojure 95.85% Emacs Lisp 4.15%
clojure tfs jira atlassian gitlab github exchange integration java emacs elisp task-tracker task-manager slack ews ews-api hacktoberfest

flower's Introduction

Flower

Clojars MELPA Travis Dependencies Status

Handles all your issue tracking tools and version control systems for you!

Flower logo

The Flower library is a set of common protocols for repositories, task trackers, and messaging systems that includes integrations with the most common ones like Jira, TFS, GitLab, GitHub, and Exchange. It may be useful for creating external automation scenarios.

Initially, it was designed to handle all routine operations of the PT Application Firewall development team:

  • Merge opened interlinked pull requests in different GitLab repositories or servers, once MRs are marked with 'LGTM', and then close issues in TFS.
  • Notify about team members' birthdays.
  • Create email requests to the company’s IT Helpdesk in order to give access rights to new team members.
  • Search for current 'In Progress' issues from the CLI.
  • And much more.

If you need separate Python libraries with similar functionality, you may visit DevOpsHQ.

Installation

To install, add the following to your project :dependencies:

[flower "0.4.7"]

Or use the Leiningen template to build a new application from scratch:

lein new flower my-flower-application

To install Flower as Emacs package, set up MELPA and then do the following:

M-x package-install [RET] flower [RET]

Usage

This library supports multiple integrations with various systems related to development flow.

So the best way to showcase its potential is to demonstrate how it handles each of them by example. We will keep adding to the existing examples upon introducing new functionality.

However, there is a certain caveat you should be aware of before we go any further. Any function in the library may be considered pure (except ones having exclamation marks) only on the top level. Underlying code implicitly uses cache that may be explicitly cleared by a user after each query if so needed. To do it, the user needs to rebind flower.common/*behavior-implicit-cache* variable using flower.macros/without-implicit-cache macro or call (function-name-clear-cache!) where function-name is a function defined with the flower.macros/public-definition macro.

For the impatient

(require 'flower.tracker.core)

;; Print all opened tasks in our task tracker
(let [url "https://github.com/PositiveTechnologies/flower"]
  (doall (map (comp (partial apply println)
                    (juxt :task-type :task-id :task-title))
              (.get-tasks (flower.tracker.core/get-tracker url))))
  nil)

For Emacs users

(require 'flower)

;; Each element of `flower-tracker-queries` vector has the following format:
;; * Tracker URL or nil if only query changed
;; * Use tracker without auth if nil or with default auth otherwise - see Flower auth
;; * Tracker query or nil for default query if applicable
(setq flower-tracker-queries [("https://github.com/PositiveTechnologies/flower" nil nil)
                              ("https://github.com/melpa/melpa" nil nil)])

(add-hook 'org-mode 'flower-mode)

(global-set-key (kbd "C-c f f") 'flower-list-tasks)
(global-set-key (kbd "C-c f t") 'flower-show-task-info)

Activate Flower with:

  • C-c f f to view or update the task list for the current query.
  • C-c f t to view information on a specific task.

For the patient

  1. Task trackers
  2. Authentication
  3. Repositories
  4. Messaging

Videos and articles

  1. Article: Xakep - Useful Functional Approach. Grabbing Mail, Task Trackers and Repositories with Clojure (in Russian)
  2. Video: Team Leader Meetup - Software Development Automation Panel Discussion (in Russian)
  3. Video: Software Development Management Automation using Clojure (in Russian)

Cookbook

Check out Flower recipes in the Cookbook:

  1. Emacs
  2. Scenarios
  3. More to be done...

License

Copyright © 2017-2020 JSC Positive Technologies. All rights reserved.

Distributed under the MIT License. See LICENSE.

All the libraries and systems are licensed and remain the property of their respective owners.

flower's People

Contributors

kubiwoaratte avatar kvanttt avatar profitware avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flower's Issues

Feature: Redmine

It would be great if flower supported Redmine, as its one of the biggest open source issue trackers around :)

We just use cljhttp today to interface with Redmine

Add Slack integration

Slack integration should be added as flower.messaging.slack. The structure of it should remain the same as of other flower.messaging sub-packages - it should implement flower.messaging.proto protocols.

Feature: Support mattermost

It would be fantastic if this had integration to mattermost API - to make it easy to work with a mattermost instance (as opposed to slack) - for those of us who prefer Open Source :)

Write tests

Tests should be written to cover all protocols for task trackers, repositories, messaging systems.

Jira dependencies are outdated

Dependencies for Jira integration are outdated. Need to be updated.

bash-3.2$ cat project.clj 
(defproject jira-needs-update "0.1.0-SNAPSHOT"
  :dependencies [[org.clojure/clojure "1.10.0"]
                 [flower/flower-integration-jira "0.4.6"]])
bash-3.2$ lein deps
Could not find artifact com.atlassian.fugue:fugue:jar:2.6.1 in central (https://repo1.maven.org/maven2/)
Could not find artifact com.atlassian.fugue:fugue:jar:2.6.1 in clojars (https://repo.clojars.org/)
Could not find artifact com.atlassian.fugue:fugue:jar:2.6.1 in atlassian-public (https://maven.atlassian.com/content/repositories/atlassian-public/)
Could not find artifact com.atlassian.fugue:fugue:jar:2.6.1 in eclipse-releases (https://repo.eclipse.org/content/groups/releases/)
Could not find artifact com.atlassian.platform:platform:pom:3.1.7 in central (https://repo1.maven.org/maven2/)
Could not find artifact com.atlassian.platform:platform:pom:3.1.7 in central (https://repo1.maven.org/maven2/)
This could be due to a typo in :dependencies, file system permissions, or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.

Fix teams handling

(require '[flower.team.core :as team])

(team/defteammember my-user "My User")
(team/defteam my-team my-user)

my-team

returns (my-user) but should return (#flower.team.core.TeamMember{:tm-login my-user, :tm-fullname "My User"}).

Initial release

The repository still contains only the LICENSE. Let's fill it up with payload!

Exclamation marks for impure functions

Add exclamation marks for flower.messaging.proto/send-message, flower.repository.proto/merge-pull-request and any other impure functions with side effects.

SUGGESTION: Rewrite in pure Emacs Lisp (and fails to run nrepl on MacOS)

This would be so much more useful if you wrote a replica in pure Emacs Lisp, removing all Clojure dependencies as getting Clojure setup properly can be quite involved.

For example, I used 'brew' on MacOS to install clojure and leiningen but flower still did not work, some failure in starting up the repl, even though it found it in the path.

Implement updating for tasks

Add update to flower.tracker.proto.TrackerTaskProto and implement it for each flower.tracker sub-package. It should return the same protocol instance it was called for with updated fields.

Support TFS query paths

As for now you can get list of tasks in TFS using flower.tracker.proto/get-tasks with task-ids list supplied or UUID query. Let's support query paths like "My Queries/Query Directory/My Query".

Add ability to create new tasks

Rename tracker.proto/update! to tracker.proto/upsert! and implement tracker.core/task to create new tasks in task trackers. Add :task-description field.

Token auth for Jira?

Hi,
I just came across your library yesterday, and it looks awesome! I'm trying to use it against Jira running on the Atlassian cloud, and it seems it's not possible, since the basic auth has been deprecated, and Flower does not support token-based auth for Jira.
How would I go about implementing this functionality?

Cookbook

Hello,

I would like to help to contribute but I am not sure what you want to have in the cookbook. Could you describe me what you need there a little bit?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.