GithubHelp home page GithubHelp logo

ghman's Introduction

CircleCI PDD status

DevOps By Rultor.com EO principles respected here Managed by Zerocrat Help donate

About

@ghman_bot is a Telegram bot to work with Github notifications. Bot can notify you on new notification, user can view new unread notifications, put comments by replying to Telegram messages, mark notifications as read, close tickets, merge PRs, etc. To start working you don't need to create GitHub auth tokens manually, the bot is configured as GitHub application and it redirects user to GitHub OAuth page to request permissions on first interraction.

Usage

To start using the bot, just start talking with @ghman_bot via Telegram, the bot will ask you to authorize via Github using OAuth2, on Github OAuth page you will be asked to grant access to your notifications. After authorization you may start to use Telegram commands:

  • /notifications - to list all unread threads, you can click any thread to see new (unread) messages in the ticket or PR. When you reply to Telegram message with a thread (from /notifications) you're posting a comment to thread source (issue or PR), so you're responding to a message right in Telegram bot.

Contributing

If you're interested in contributing, you need to have an account in Zerocracy and read this document: https://github.com/g4s8/ghman/blob/master/CONTRIBUTING.md

If want to submit a bug read this and this.

To propose some changes you need to be assigned as a performer (DEV role) to some ticket. Then you have:

  1. Fork the repo, clone it locally
  2. Switch to branch for your issue, write a code, make sure it's building with mvn clean install -Pqulice command
  3. Submit a pull request, check that CI passed, fix errors if not passed
  4. Wait for code review, fix or discuss reviewer comments
  5. Wait for architect to merge (architect may ask additional changes)
  6. After merge to master ask issue author to close the ticket

Git guidelines:

  • start all commit message with tiket number, e.g.: #1 - some message (to avoid issues with comment char, check this answer: https://stackoverflow.com/a/14931661/1723695)
  • try to describe shortly your changes in commit message, long description should be provided in PR body
  • name your branches starting with ticket number, e.g. 1-some-bug branch for #1 ticket
  • use merge, not rebase when merging changes from master to local branch
  • one commit per change, don't rebase all commits into single one for PR
  • avoid push --force where possible, it can be used in rare cases, e.g. if you pushed binary file by mistake, then you can remove it with push --force or if you mistyped ticket number or message, you can fix it with push --force

To build and run tests locally you need >=jdk-8 and >=maven-3.*

ghman's People

Contributors

g4s8 avatar olenagerasimova avatar rultor avatar samihibrahim avatar scristalli avatar victornoel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ghman's Issues

BotApp.java:37-38: Fix the...

The puzzle 2-3058e513 from #2 has to be resolved:

* @todo #2:30mins Fix the ClassDataAbstractionCouplingCheck & PMD rule
* exclusions in BotApp class

The puzzle was created by rultor on 15-Jun-19.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

PgUsers.java:105-108: Replace this static method with an...

The puzzle 7-2fb4e7d6 from #7 has to be resolved:

* @todo #7:30min Replace this static method with an inner class that
* implements/extends JsonObject (depending on what is possible to do)
* and that is responsible of doing what is done here. Do not forget about
* unit test.

The puzzle was created by @rultor on 07-Jun-19.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

BotApp.java:39-44: Patterns in callback queries chains...

The puzzle 11-457109ce from #11 has to be resolved:

* @todo #11:30mins Patterns in callback queries chains are distributed in
* multiple classes: for example, pattern for close issue is given here and in
* TkCloseIssue. Find a way to avoid this by maybe having string pattern
* representation here and passing Matcher to telegram takes (TkCloseIssue) or
* by having one class implementing Fork and containing both the current code
* of TkCloseIssue and the creation of the FkCallbackQuery.

The puzzle was created by @rultor on 26-Jun-19.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

ThreadIssueButtons.java:30-31: Implement Unit tests for...

The puzzle 35-3f32769a from #35 has to be resolved:

* @todo #35:30min Implement Unit tests for this class
* using junit, cactoos-matchers and fake class (no mocks).

The puzzle was created by Victor Noël on 21-Jul-19.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

TkCloseIssue.java:35-39: 1) find a way to avoid using...

The puzzle 11-b8952b84 from #11 has to be resolved:

* @todo #11:30mins 1) find a way to avoid using static method Integer.parseInt()
* 2) there too much method chaining in Issue.Smart() instance creation. It's
* hard to read and not very good in term of OO practice: we depend here on
* many objects and we want to promote loose coupling usually. Find a way to
* avoid it.

The puzzle was created by rultor on 26-Jun-19.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

Windows: lines in file should end with Unix-like end of line

Trying to run qulice check on windows I'm getting multiple complaints

Checkstyle: D:\EO\ghman\src\main\java\com\g4s8\ghman\web\WebApp.java[39]: Lines in file should end with Unix-like end of line (RegexpMultilineCheck)

Please, modify .gitattributes file for Unix-like end of line

FlywayDataSource.java:31-33: Create new library with...

The puzzle 1-1f46d7fc from #1 has to be resolved:

* @todo #1:30min Create new library with different data sources,
* move this class and other DataSource implementations and add it
* as dependency.

The puzzle was created by @g4s8 on 22-May-19.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

PgUsers.java:106-112: This class represents details about...

The puzzle 18-891197cc from #18 has to be resolved:

* @todo #18:30min This class represents details about a user stored in
* the database. Callers of PgUser.telegram relies on the datastructure
* defined here and must know how it is structured to exploit the
* information. Instead, extract interface from it and use it
* everywhere it is needed instead of exposing this data. One
* implementation is maybe based on Chat and another would be based on
* a pg request for example. Add unit tests for both when it's done.

The puzzle was created by @rultor on 25-Jun-19.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

TkMarkdown.java:32-33: Move this class to g4s8/teletakes...

The puzzle 1-16f6d808 from #1 has to be resolved:

* @todo #1:30min Move this class to g4s8/teletakes library:
* submit PR, merge it and update dependency then.

The puzzle was created by @g4s8 on 22-May-19.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

FbUnauthorized.java:31-32: Implement Unit tests for...

The puzzle 2-b383a27b from #2 has to be resolved:

* @todo #2:30min Implement Unit tests for FbUnauthorized class
* use JUNIT and cactoos-matchers wrapper.

The puzzle was created by rultor on 15-Jun-19.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

Maven Validate Warnings

Running any of maven commands (Validate is a good sample) produces the warnings below.

[WARNING] Some problems were encountered while building the effective model for com.g4s8:ghman:jar:1.0-SNAPSHOT
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: com.jcabi:jcabi-http:jar -> duplicate declaration of version 1.17.2 @ line 117, column 17
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.glassfish:javax.json:jar -> duplicate declaration of version 1.1.4 @ line 154, column 17
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 179, column 15

TkGitHubAuthorization.java:56-59: Introduce a meaningful...

The puzzle 43-326a137a from #43 has to be resolved:

* @todo #43:30min Introduce a meaningful abstraction for this. The
* current implementation in the secondary constructor should reside in its
* own class and there should be a Fake implementation for use in the tests.
* Do not forget to correct unit test accordingly.

The puzzle was created by olenagerasimova on 07-Jul-19.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

Notification.java:53-56: Test for...

The puzzle 9-965770b0 from #9 has to be resolved:

* @todo #9:30min Test for `Notification.UnreadThreads` should be
* implemented after https://github.com/g4s8/teletakes/issues/14 is
* resolved. Please, while implementing try to avoid using mocked objects,
* use fake implementations instead.

The puzzle was created by @rultor on 15-Jun-19.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

TkApp.java:54-57: Refactor this class: extract additional...

The puzzle 1-ba24450c from #1 has to be resolved:

* @todo #1:30min Refactor this class:
* extract additional classes for takes and pass, move
* actual logic to these classes, keep only composition structure
* in TkApp.

The puzzle was created by @g4s8 on 22-May-19.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

How to test a bot command or callback query?

In order to start working on #10, I need to be able to write a test but I have no idea how I can do that with teletakes.

I think the project should have a few tests for the existing code so that I can use it as an example.

A perfect one would be for click:notification in BotApp.

TkApp.java:58-60: Refactor environment usage like...

The puzzle 1-41b37148 from #1 has to be resolved:

* @todo #1:30min Refactor environment usage like APP_HOST, GH_CLIENT,
* GH_SECRET, etc, in this class
* and telegram classes, find a way to better configure these variables.

The puzzle was created by @g4s8 on 22-May-19.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

PgUserITCase.java:28-30: Continue implement this...

The puzzle 7-5d7508dd from #7 has to be resolved:

* @todo #7:30min Continue implement this integration test: add cases for all
* methods of {@link com.g4s8.ghman.data.PgUser} class. Do not forget about
* all possible exceptions.

The puzzle was created by @rultor on 07-Jun-19.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

TkGitHubAuthorization.java:39-40: Implement unit tests...

The puzzle 4-6f9220be from #4 has to be resolved:

* @todo #4:30min Implement unit tests for TkGitHubAuthorization. Refer
* to takes framework Unit testing guide @ https://github.com/yegor256/takes#unit-testing

The puzzle was created by Samih Omer on 16-Jun-19.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

pom.xml:284-288: Increase code coverage by writing unit...

The puzzle 8-ac152f30 from #8 has to be resolved:

ghman/pom.xml

Lines 284 to 288 in 7de1106

@todo #8:30min Increase code coverage by
writing unit tests. All coverage ratio minimums are
supposed to be greater than 0.60. Classes missed count
maximum is 8. When this goal is achieved ask ARC
whether these minimums are enough.

The puzzle was created by rultor on 17-Jun-19.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

Impl

GhMan is a GitHub Telegram bot manager which helps to process notifications and configure notification rules.
Let's specify requirements in the readme and implement a prototype.

TkSync.java:28-31: In case `Sync.sync` throws an...

The puzzle 26-e5ebe138 from #26 has to be resolved:

* @todo #26:30 In case `Sync.sync` throws an exception, this class should log
* it instead of failing the whole synchronization process. Some thought must
* be taken to apply the same principle to instances of `Sync` in case they do
* multiple tasks.

The puzzle was created by rultor on 19-Jul-19.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

Notification.java:43-48: Continue implement notifications...

The puzzle 9-ed24d84f from #9 has to be resolved:

* @todo #9:30 Continue implement notifications for user when new messages
* (unread github notification) arrive. To do that we need to monitor
* unread notifications by constantly checking `threads` table for unread
* threads. Schedule java thread (or any other synchronization process) to
* periodically call `PgThreads#unread()` to retrieve unread messages and
* use `Notification.UnreadThreads()` to send them.

The puzzle was created by @rultor on 15-Jun-19.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

TkNotifications.java:40-41: Implement Unit tests for...

The puzzle 2-1a5a79e9 from #2 has to be resolved:

* @todo #2:30min Implement Unit tests for TkNotifications class. Refer
* to takes framework Unit testing guide @ https://github.com/yegor256/takes#unit-testing

The puzzle was created by Samih Omer on 16-Jun-19.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

TkThread.java:41-42: Implement Unit tests for TkThread...

The puzzle 2-96a53d17 from #2 has to be resolved:

* @todo #2:30min Implement Unit tests for TkThread class
* * use JUNIT and cactoos-matchers wrapper.

The puzzle was created by rultor on 15-Jun-19.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

BotApp.java:57-59: Refactor this class: move actual logic...

The puzzle 1-b3595789 from #1 has to be resolved:

* @todo #1:30min Refactor this class:
* move actual logic to separate takes and keep only
* composition structure in this class.

The puzzle was created by @g4s8 on 22-May-19.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

FkGitHubAuthRedirection.java:36-38: Extract into a...

The puzzle 41-a6560248 from #41 has to be resolved:

* @todo #41:30min Extract into a separate object the behaviour of creating the redirect URI
* and test that exact complete string of the redirect uri is correct. After that unit test
* for FkGitHubAuthRedirection can be replaced with integration one.

The puzzle was created by olenagerasimova on 08-Jul-19.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

pom.xml:168-170: Configure qulice plugin and test...

The puzzle 1-da473f23 from #1 has to be resolved:

ghman/pom.xml

Lines 168 to 170 in a8f587e

@todo #1:30min Configure qulice plugin and test coverage.
Don't forget to exclude Cactoos compat classes,
we need to remove them after Takes fixes.

The puzzle was created by @g4s8 on 22-May-19.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

TkGitHubAuthorization.java:36-38: replace those static...

The puzzle 4-c1ef585e from #4 has to be resolved:

* @todo #4:30min replace those static loggers with something more OO
* (Related with
* https://www.yegor256.com/2019/03/19/logging-without-static-logger.html)

The puzzle was created by Samih Omer on 08-Jun-19.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

PsUserById.java:30-31: Implement unit tests for...

The puzzle 4-0806f129 from #4 has to be resolved:

* @todo #4:30min Implement unit tests for PsUserById.
* Refer to takes framework Unit testing guide @ https://github.com/yegor256/takes#unit-testing

The puzzle was created by Samih Omer on 16-Jun-19.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

FkGitHubAuthRedirection.java:35-36: Implement unit tests...

The puzzle 4-05012186 from #4 has to be resolved:

* @todo #4:30min Implement unit tests for FkGitHubAuthRedirection. Refer
* to takes framework Unit testing guide @ https://github.com/yegor256/takes#unit-testing

The puzzle was created by Samih Omer on 16-Jun-19.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

FkGitHubAuthRedirection.java:33-34: Replace the call to...

The puzzle 4-ff388267 from #4 has to be resolved:

* @todo #4:30min Replace the call to static method String.format
* with the use of cactoos' text.Formatted class in all files.

The puzzle was created by Samih Omer on 08-Jun-19.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

TkThread.java:43-44: Fix the...

The puzzle 2-553fe7c5 from #2 has to be resolved:

* @todo #2:30min Fix the ClassDataAbstractionCouplingCheck rule exclusion
* in TkThread class. This class is too complex.

The puzzle was created by rultor on 15-Jun-19.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

Users.java:36-37: Extract interfaces and implement unit...

The puzzle 1-134b4230 from #1 has to be resolved:

* @todo #1:30min Extract interfaces and implement unit tests
* with fake objects and integration tests with embedded postgres.

The puzzle was created by @g4s8 on 22-May-19.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

Telegram takes depend on db source

TkNotifications and TkThread depend on database source now, I believe that's completely wrong. These classes should have Users field instead of DataSource to keep low abstraction coupling and make unit testing possible and easy (we simply create Users.Fake implementation and will be happy).
UPD We also got rid of datasource dependency in BotApp.java.

Notification.java:49-52: Now this class send only github...

The puzzle 9-bc8289a7 from #9 has to be resolved:

* @todo #9:30min Now this class send only github subject title as
* notification. Please aks ARC what exactly we want to send to user and
* create a class to extract and format this information from `JsonObject`
* (github subject) accordingly.

The puzzle was created by @rultor on 15-Jun-19.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

PgUsers.java:37-38: Create integration test: check all...

The puzzle 7-4fac29c9 from #7 has to be resolved:

* @todo #7:30min Create integration test: check all methods of this class and
* do not forget about all possible exceptions.

The puzzle was created by @rultor on 07-Jun-19.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

Use DBUnit for Database Unit tests

Related to Issue #20, the status now is we are using JUnit 5 Extensions for database initialization and tear-down. I believe using a db mock (e.g. DBUnit) will provide a better alternative. Should I start the implementation or do you prefer the current setup?

DatabaseExtension.java:34-37: Find a way to get rid of...

The puzzle 7-0543293b from #7 has to be resolved:

* @todo #7:30min Find a way to get rid of static field and method of this
* class. Note that this class is JUnit 5 Extension and is used to prepare
* database to integration tests. See
* https://junit.org/junit5/docs/current/user-guide/#extensions-registration-declarative

The puzzle was created by @rultor on 07-Jun-19.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

UnreadThreadsSync.java:33-37: Instantiate this class and...

The puzzle 29-b004b0ba from #29 has to be resolved:

* @todo #29:30min Instantiate this class and pass it to `TkSync`
* (currently in `TkApp`) so that the behaviour of this class is
* executed every 10 minutes when Heroku ntofify the app. Note
* that this involves sharing the instance of BotSimple between
* `TkApp` and `BotApp`.

The puzzle was created by @rultor on 19-Jul-19.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

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.