Skip to content

Commit

Permalink
Merge branch 'master' into 1877
Browse files Browse the repository at this point in the history
  • Loading branch information
pnatashap committed Feb 15, 2024
2 parents 10dff61 + 74e5a70 commit 43c5377
Show file tree
Hide file tree
Showing 62 changed files with 79 additions and 78 deletions.
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId>
<version>1.12.658</version>
<version>1.12.659</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-dynamodb</artifactId>
<version>1.12.658</version>
<version>1.12.659</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
Expand Down Expand Up @@ -225,7 +225,7 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.9.21</version>
<version>1.9.21.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/rultor/Entry.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
* Command line entry.
*
* @since 1.50
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
*/
@SuppressWarnings("PMD.ExcessiveImports")
public final class Entry {
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/rultor/Routine.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
* Routine.
*
* @since 1.50
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
* @todo #1125:30min Routine should be delegate execution to separate threads.
* Currently com.rultor.Routine#process() is sequentially processing all Talks
* and breaking out of this sequential processing to log occurring exceptions.
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/rultor/agents/Agents.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@
* Agents.
*
* @since 1.0
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
* @checkstyle ClassFanOutComplexityCheck (500 lines)
* @checkstyle MultipleStringLiteralsCheck (500 lines)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
* Marks the daemon as done.
*
* @since 1.0
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
*/
@Immutable
@ToString
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/com/rultor/agents/daemons/DismountDaemon.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@
* daemon is older than a few days.
*
* @since 1.0
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
* @checkstyle MultipleStringLiteralsCheck (500 lines)
*/
@Immutable
@ToString
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/com/rultor/agents/daemons/EndsDaemon.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@
* Marks the daemon as done.
*
* @since 1.0
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
* @todo #1053:30min Reduce the data abstraction coupling of EndsDaemon in order
* to get rid of the checkstyle suppression of
* ClassDataAbstractionCouplingCheck
*/
@Immutable
@ToString
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/rultor/agents/daemons/MkdirDaemon.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
* Make directory for the daemon.
*
* @since 1.0
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
*/
@Immutable
@ToString
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/rultor/agents/daemons/StartsDaemon.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
* Starts daemon.
*
* @since 1.0
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
*/
@Immutable
@ToString
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/rultor/agents/github/Answer.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
* Answer to post.
*
* @since 1.0
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
*/
@Immutable
@ToString
Expand Down
22 changes: 14 additions & 8 deletions src/main/java/com/rultor/agents/github/CommentsTag.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
* Comments a new tag in Github.
*
* @since 1.31
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
*/
@Immutable
@ToString
Expand Down Expand Up @@ -135,7 +134,7 @@ public Iterable<Directive> process(final XML xml) throws IOException {
rels.create(tag.trim())
);
rel.name(CommentsTag.title(req, issue));
rel.prerelease(this.isPrerelease());
rel.prerelease(this.isPrerelease(req));
rel.body(
String.format(
// @checkstyle LineLength (1 line)
Expand All @@ -153,17 +152,24 @@ public Iterable<Directive> process(final XML xml) throws IOException {
/**
* Check if release is prerelease.
* True if profile does not specify release.pre=false.
* @param req Comment's xml
* @return True if prerelease, false otherwise.
*/
private boolean isPrerelease() {
private boolean isPrerelease(final XML req) {
try {
final boolean result;
final List<String> xpath = this.profile.read()
.xpath("/p/entry[@key='release']/entry[@key='pre']/text()");
if (xpath.isEmpty()) {
result = true;
final List<String> comment = req
.xpath("args/arg[@name='pre']/text()");
if (comment.isEmpty()) {
final List<String> xpath = this.profile.read()
.xpath("/p/entry[@key='release']/entry[@key='pre']/text()");
if (xpath.isEmpty()) {
result = true;
} else {
result = "true".equals(xpath.get(0).trim());
}
} else {
result = "true".equals(xpath.get(0).trim());
result = "true".equals(comment.get(0).trim());
}
return result;
} catch (final IOException exception) {
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/rultor/agents/github/CommitsLog.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
* Log of commits.
*
* @since 1.51
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
*/
@Immutable
final class CommitsLog {
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/com/rultor/agents/github/DropsTalk.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ public DropsTalk() {
super("/talk[not(wire) and @later='true']");
}

// @checkstyle ExecutableStatementCountCheck (50 lines)
// @checkstyle CyclomaticComplexityCheck (100 lines)
@Override
public Iterable<Directive> process(final XML xml) throws IOException {
Logger.info(
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/rultor/agents/github/Understands.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
* Understands request.
*
* @since 1.3
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
*/
@Immutable
@ToString
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/com/rultor/agents/github/qtn/QnIfContains.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,14 @@ public QnIfContains(final String ptn, final Question qtn) {
public Req understand(final Comment.Smart comment,
final URI home) throws IOException {
final Req req;
if (comment.body().toLowerCase(Locale.ENGLISH).contains(this.pattern)) {
if (comment.body().toLowerCase(Locale.ENGLISH)
.replaceAll("`[^`]*`", "")
.contains(this.pattern)
) {
req = this.origin.understand(comment, home);
} else {
req = Req.EMPTY;
}
return req;
}

}
1 change: 0 additions & 1 deletion src/main/java/com/rultor/agents/github/qtn/QnLock.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
* Lock branch.
*
* @since 1.53
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
*/
@Immutable
@ToString
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/rultor/agents/github/qtn/QnUnlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
* Unlock branch.
*
* @since 1.53
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
*/
@Immutable
@ToString
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/rultor/agents/req/DockerRun.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
*
* @since 1.0
* @checkstyle MultipleStringLiteralsCheck (500 lines)
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
*/
@Immutable
@ToString
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/rultor/agents/req/StartsRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
* Merges.
*
* @since 1.0
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
* @checkstyle MultipleStringLiteralsCheck (500 lines)
*/
@Immutable
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/rultor/cached/CdTalks.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
* Cached talks.
*
* @since 1.51
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
*/
@Immutable
@ToString
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/rultor/dynamo/DyTalk.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
* Talk in Dynamo.
*
* @since 1.0
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
*/
@Immutable
@ToString
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/rultor/dynamo/DyTalks.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
* Talks in Dynamo.
*
* @since 1.0
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
*/
@Immutable
@ToString
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/rultor/profiles/GithubProfile.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
* in Github.
*
* @since 1.0
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
* @checkstyle AvoidInstantiatingObjectsInLoops
*/
@Immutable
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/rultor/spi/Talks.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
* Talks in a repo.
*
* @since 1.0
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
*/
@Immutable
@SuppressWarnings("PMD.TooManyMethods")
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/rultor/web/RsPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
* Index resource, front page of the website.
*
* @since 1.50
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
*/
@EqualsAndHashCode(callSuper = true)
final class RsPage extends RsWrap {
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/rultor/web/TkApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
* App.
*
* @since 1.50
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
*/
public final class TkApp extends TkWrap {

Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/rultor/web/TkAppAuth.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
* Authenticated app.
*
* @since 1.53
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
*/
final class TkAppAuth extends TkWrap {

Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/rultor/web/TkAppFallback.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
* App with fallback.
*
* @since 1.53
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
*/
final class TkAppFallback extends TkWrap {

Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/rultor/web/TkDaemon.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
* Single daemon.
*
* @since 1.50
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
*/
final class TkDaemon implements TkRegex {

Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/rultor/web/TkHome.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
* Index resource, front page of the website.
*
* @since 1.50
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
*/
final class TkHome implements Take {

Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/rultor/web/TkSiblings.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
* Siblings.
*
* @since 1.50
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
*/
final class TkSiblings implements TkRegex {

Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/rultor/web/TkStatus.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
* Status (OK or not OK).
*
* @since 1.52
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
*/
final class TkStatus implements Take {

Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/rultor/web/TkTicks.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
* PNG with pulse.
*
* @since 1.50
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
*/
final class TkTicks implements Take {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
* Tests for ${@link ArchivesDaemon}.
*
* @since 1.23
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
* @checkstyle MultipleStringLiteralsCheck (500 lines)
*/
final class ArchivesDaemonITCase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
* Tests for {@link DismountDaemon}.
*
* @since 1.2
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
* @checkstyle MultipleStringLiterals (500 lines)
*/
final class DismountDaemonTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
* Tests for {@link EndsDaemon}.
*
* @since 1.2
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
*/
final class EndsDaemonITCase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
* Tests for {@link EndsDaemon}.
*
* @since 1.2
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
* @checkstyle MultipleStringLiterals (500 lines)
*/
final class EndsDaemonTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
* Integration test for ${@link StartsDaemon}.
* @since 1.3.8
* @checkstyle MultipleStringLiteralsCheck (500 lines)
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
*/
@SuppressWarnings("PMD.ExcessiveImports")
final class StartsDaemonITCase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
* Tests for {@link ClosePullRequest}.
*
* @since 1.63
* @checkstyle ClassDataAbstractionCoupling (200 lines)
*/
final class ClosePullRequestTest {

Expand Down
Loading

0 comments on commit 43c5377

Please sign in to comment.