Skip to content
This repository has been archived by the owner on May 20, 2023. It is now read-only.

(#35) Distribute TkThread responsibility in multiple classes #79

Merged
merged 4 commits into from Jul 30, 2019

Conversation

victornoel
Copy link
Contributor

This is for #35

By distributing the various responsibility of TkThread in multiple class, this will ease testing and prevent us from using checkstyle exclusions.

@0crat
Copy link

0crat commented Jul 21, 2019

Job #79 is now in scope, role is REV

@0crat
Copy link

0crat commented Jul 26, 2019

This pull request #79 is assigned to @olenagerasimova/z, here is why; the budget is 15 minutes, see §4; please, read §27 and when you decide to accept the changes, inform @g4s8/z (the architect) right in this ticket; if you decide that this PR should not be accepted ever, also inform the architect; this blog post will help you understand what is expected from a code reviewer; there will be no monetary reward for this job

Copy link
Contributor

@olenagerasimova olenagerasimova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@victornoel added several comment, take a look please

* using junit, cactoos-matchers and fake class (no mocks).
*/
public final class ThreadIssueButtons extends MapEnvelope<String, String> {
/**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@victornoel should not there be empty line between class definition and ctor javadoc?

TmResponse res = new RsText(
new ThreadIssueText(issue, thread.lastRead().toEpochMilli())
);
if (issue.isOpen() && issue.author().equals(user.github().users().self())) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@victornoel why did you use if statement here instead of Ternary?

*
* @since 1.0
* @todo #35:30min Implement Unit tests for this class
* use junit, cactoos-matchers and fake class (no mocks).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@victornoel I think comma is missing at the end of the first todo line or the second line should start with "using"

@victornoel
Copy link
Contributor Author

@olenagerasimova see my new commits (I had to rebase/force push to fix the commit messages for gitlint but I added commits for your comments).

I had to add a todo to continue reducing the complexity of the class because with Ternary, we increase complexity of the class above the limit.

@victornoel
Copy link
Contributor Author

@g4s8 the build is broken here too because of #81

@olenagerasimova
Copy link
Contributor

@victornoel thanks, though now I have some doubts about Ternary: TkThread does not look complex to me, so I'd suggest to revert Ternary to if, get rid of suppression and todo. Sorry for changing mind, and if you think that TkThread is indeed too complex, then please leave everything as is now.

@victornoel
Copy link
Contributor Author

victornoel commented Jul 29, 2019

@olenagerasimova I'm not sure either :) let's have @g4s8 decide if we should revert or not last commit (32bb19a).

@g4s8
Copy link
Owner

g4s8 commented Jul 30, 2019

@rultor merge

@rultor
Copy link
Contributor

rultor commented Jul 30, 2019

@rultor merge

@g4s8 OK, I'll try to merge now. You can check the progress of the merge here

@rultor
Copy link
Contributor

rultor commented Jul 30, 2019

@rultor merge

@g4s8 @victornoel Oops, I failed. You can see the full log here (spent 3min)

Reading src/main/java/com/g4s8/ghman/user/package-info.java...
Reading src/main/java/com/g4s8/ghman/user/ThreadIssue.java...
Reading src/main/java/com/g4s8/ghman/user/GhAuthException.java...
Reading src/main/java/com/g4s8/ghman/user/Thread.java...
Reading src/main/java/com/g4s8/ghman/user/ThreadsSync.java...
Reading src/main/java/com/g4s8/ghman/App.java...
Reading src/main/java/com/g4s8/ghman/bot/ThreadIssueButtons.java...
Puzzle 35-3f32769a 30/DEV at src/main/java/com/g4s8/ghman/bot/ThreadIssueButtons.java
Reading src/main/java/com/g4s8/ghman/bot/TkCloseIssue.java...
Puzzle 11-b8952b84 30/DEV at src/main/java/com/g4s8/ghman/bot/TkCloseIssue.java
Reading src/main/java/com/g4s8/ghman/bot/TkThread.java...
Puzzle 2-96a53d17 30/DEV at src/main/java/com/g4s8/ghman/bot/TkThread.java
Puzzle 35-c5a279fc 30/DEV at src/main/java/com/g4s8/ghman/bot/TkThread.java
Reading src/main/java/com/g4s8/ghman/bot/TkMarkdown.java...
Puzzle 1-16f6d808 30/DEV at src/main/java/com/g4s8/ghman/bot/TkMarkdown.java
Reading src/main/java/com/g4s8/ghman/bot/UnreadThreadsSync.java...
Puzzle 29-b004b0ba 30/DEV at src/main/java/com/g4s8/ghman/bot/UnreadThreadsSync.java
Puzzle 9-bc8289a7 30/DEV at src/main/java/com/g4s8/ghman/bot/UnreadThreadsSync.java
Puzzle 9-965770b0 30/DEV at src/main/java/com/g4s8/ghman/bot/UnreadThreadsSync.java
Reading src/main/java/com/g4s8/ghman/bot/FbUnauthorized.java...
Reading src/main/java/com/g4s8/ghman/bot/package-info.java...
Reading src/main/java/com/g4s8/ghman/bot/BotApp.java...
Puzzle 2-3058e513 30/DEV at src/main/java/com/g4s8/ghman/bot/BotApp.java
Puzzle 11-457109ce 30/DEV at src/main/java/com/g4s8/ghman/bot/BotApp.java
Reading src/main/java/com/g4s8/ghman/bot/ThreadIssueText.java...
Puzzle 35-959a3c21 30/DEV at src/main/java/com/g4s8/ghman/bot/ThreadIssueText.java
Reading src/main/java/com/g4s8/ghman/bot/TkNotifications.java...
Reading src/main/java/com/g4s8/ghman/package-info.java...
Reading src/main/java/com/g4s8/ghman/data/PgUsers.java...
Puzzle 7-4fac29c9 30/DEV at src/main/java/com/g4s8/ghman/data/PgUsers.java
Puzzle 18-891197cc 30/DEV at src/main/java/com/g4s8/ghman/data/PgUsers.java
Reading src/main/java/com/g4s8/ghman/data/FlywayDataSource.java...
Puzzle 1-1f46d7fc 30/DEV at src/main/java/com/g4s8/ghman/data/FlywayDataSource.java
Reading src/main/java/com/g4s8/ghman/data/SimpleDataSource.java...
Reading src/main/java/com/g4s8/ghman/data/package-info.java...
Reading src/main/java/com/g4s8/ghman/data/PgUser.java...
Reading src/main/java/com/g4s8/ghman/web/Sync.java...
Reading src/main/java/com/g4s8/ghman/web/TkSync.java...
Puzzle 26-e5ebe138 30/DEV at src/main/java/com/g4s8/ghman/web/TkSync.java
Reading src/main/java/com/g4s8/ghman/web/FkGitHubAuthRedirection.java...
Puzzle 41-a6560248 30/DEV at src/main/java/com/g4s8/ghman/web/FkGitHubAuthRedirection.java
Reading src/main/java/com/g4s8/ghman/web/package-info.java...
Reading src/main/java/com/g4s8/ghman/web/PsUserById.java...
Reading src/main/java/com/g4s8/ghman/web/TkGitHubAuthorization.java...
Puzzle 4-c1ef585e 30/DEV at src/main/java/com/g4s8/ghman/web/TkGitHubAuthorization.java
Puzzle 43-326a137a 30/DEV at src/main/java/com/g4s8/ghman/web/TkGitHubAuthorization.java
Reading src/main/java/com/g4s8/ghman/web/WebApp.java...
Reading src/main/java/com/g4s8/ghman/web/TkApp.java...
Reading Procfile...
Reading .gitlint...
Reading pom.xml...
Puzzle 8-ac152f30 30/DEV at pom.xml
Reading .circleci/config.yml...
Reading .gitattributes...
+ gitlint
\u001b[1mdfc08f9: \u001b[0m\u001b[31msubject does not match regex [\(?#\d+\)? - .+]
\u001b[0m\u001b[1mfaa717c: \u001b[0m\u001b[31msubject does not match regex [\(?#\d+\)? - .+]
\u001b[0m\u001b[1m35cebce: \u001b[0m\u001b[31msubject does not match regex [\(?#\d+\)? - .+]
\u001b[0mcontainer 29a6ce201a405134c312c422db1ed8cccc92b7bdf318aba2d62a41f8f39899cc is dead
Tue Jul 30 09:25:04 CEST 2019

@victornoel
Copy link
Contributor Author

@g4s8 I've rebased to fix the problem with gitlint

@g4s8
Copy link
Owner

g4s8 commented Jul 30, 2019

@rultor merge

@rultor
Copy link
Contributor

rultor commented Jul 30, 2019

@rultor merge

@g4s8 OK, I'll try to merge now. You can check the progress of the merge here

@rultor rultor merged commit 2f40b83 into g4s8:master Jul 30, 2019
@rultor
Copy link
Contributor

rultor commented Jul 30, 2019

@rultor merge

@g4s8 Done! FYI, the full log is here (took me 3min)

@0crat
Copy link

0crat commented Jul 30, 2019

@ammaratef45/z please review this job completed by @olenagerasimova/z, as in §30; the job will be fully closed and all payments will be made when the quality review is completed

@0crat 0crat removed the scope label Jul 30, 2019
@0crat
Copy link

0crat commented Jul 30, 2019

The job #79 is now out of scope

@0crat
Copy link

0crat commented Jul 30, 2019

Payment to ARC for a closed pull request, as in §28: +10 point(s) just awarded to @g4s8/z

@ammaratef45
Copy link

@olenagerasimova You didn't find 3 or more problems in the PR, please confirm that you'll try to find at least 3 problems in next time.

@olenagerasimova
Copy link
Contributor

@ammaratef45 I confirm

@ammaratef45
Copy link

@olenagerasimova thanks

@ammaratef45
Copy link

@0crat quality acceptable

@0crat
Copy link

0crat commented Jul 30, 2019

Order was finished, quality is "acceptable": +15 point(s) just awarded to @olenagerasimova/z

@0crat
Copy link

0crat commented Jul 30, 2019

Quality review completed: +4 point(s) just awarded to @ammaratef45/z

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants