Initial commit
This commit is contained in:
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
target
|
||||
.classpath
|
||||
.project
|
||||
.settings
|
||||
BIN
.mvn/wrapper/maven-wrapper.jar
vendored
Normal file
BIN
.mvn/wrapper/maven-wrapper.jar
vendored
Normal file
Binary file not shown.
1
.mvn/wrapper/maven-wrapper.properties
vendored
Normal file
1
.mvn/wrapper/maven-wrapper.properties
vendored
Normal file
@@ -0,0 +1 @@
|
||||
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.3/apache-maven-3.3.3-bin.zip
|
||||
17
config/checkstyle/checkstyle-header.txt
Normal file
17
config/checkstyle/checkstyle-header.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
^\Q/*\E$
|
||||
^\Q * Copyright \E2015\Q the original author or authors.\E$
|
||||
^\Q *\E$
|
||||
^\Q * Licensed under the Apache License, Version 2.0 (the "License");\E$
|
||||
^\Q * you may not use this file except in compliance with the License.\E$
|
||||
^\Q * You may obtain a copy of the License at\E$
|
||||
^\Q *\E$
|
||||
^\Q * http://www.apache.org/licenses/LICENSE-2.0\E$
|
||||
^\Q *\E$
|
||||
^\Q * Unless required by applicable law or agreed to in writing, software\E$
|
||||
^\Q * distributed under the License is distributed on an "AS IS" BASIS,\E$
|
||||
^\Q * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\E$
|
||||
^\Q * See the License for the specific language governing permissions and\E$
|
||||
^\Q * limitations under the License.\E$
|
||||
^\Q */\E$
|
||||
^$
|
||||
^.*$
|
||||
10
config/checkstyle/checkstyle-suppressions.xml
Normal file
10
config/checkstyle/checkstyle-suppressions.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE suppressions PUBLIC
|
||||
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
|
||||
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
|
||||
<suppressions>
|
||||
<suppress files="[\\/]src[\\/]test[\\/]java[\\/]" checks="JavadocVariable" />
|
||||
<suppress files="[\\/]src[\\/]test[\\/]java[\\/]" checks="JavadocMethod" />
|
||||
<suppress files="IssueBotApplication\.java" checks="HideUtilityClassConstructor" />
|
||||
<suppress files="IssueBotApplication\.java" checks="Javadoc*" />
|
||||
</suppressions>
|
||||
153
config/checkstyle/checkstyle.xml
Normal file
153
config/checkstyle/checkstyle.xml
Normal file
@@ -0,0 +1,153 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
|
||||
<module name="Checker">
|
||||
|
||||
<!-- Root Checks -->
|
||||
<module name="RegexpHeader">
|
||||
<property name="headerFile" value="${checkstyle.header.file}" />
|
||||
<property name="fileExtensions" value="java" />
|
||||
</module>
|
||||
<module name="NewlineAtEndOfFile" />
|
||||
|
||||
<!-- <module name="SuppressionFilter">
|
||||
<property name="file" value="${checkstyle.config.dir}/checkstyle-suppressions.xml"/>
|
||||
</module> -->
|
||||
|
||||
<!-- TreeWalker Checks -->
|
||||
<module name="TreeWalker">
|
||||
|
||||
<!-- Annotations -->
|
||||
<module name="AnnotationUseStyle">
|
||||
<property name="elementStyle" value="compact" />
|
||||
</module>
|
||||
<module name="MissingOverride" />
|
||||
<module name="PackageAnnotation" />
|
||||
<module name="AnnotationLocation">
|
||||
<property name="allowSamelineSingleParameterlessAnnotation"
|
||||
value="false" />
|
||||
</module>
|
||||
|
||||
<!-- Block Checks -->
|
||||
<module name="EmptyBlock">
|
||||
<property name="option" value="text" />
|
||||
</module>
|
||||
<module name="LeftCurly" />
|
||||
<module name="RightCurly">
|
||||
<property name="option" value="alone" />
|
||||
</module>
|
||||
<module name="NeedBraces" />
|
||||
<module name="AvoidNestedBlocks" />
|
||||
|
||||
<!-- Class Design -->
|
||||
<module name="FinalClass" />
|
||||
<module name="InterfaceIsType" />
|
||||
<module name="HideUtilityClassConstructor" />
|
||||
<module name="MutableException" />
|
||||
<module name="InnerTypeLast" />
|
||||
<module name="OneTopLevelClass" />
|
||||
|
||||
<!-- Coding -->
|
||||
<module name="CovariantEquals" />
|
||||
<module name="EmptyStatement" />
|
||||
<module name="EqualsHashCode" />
|
||||
<module name="InnerAssignment" />
|
||||
<module name="SimplifyBooleanExpression" />
|
||||
<module name="SimplifyBooleanReturn" />
|
||||
<module name="StringLiteralEquality" />
|
||||
<module name="NestedForDepth">
|
||||
<property name="max" value="3" />
|
||||
</module>
|
||||
<module name="NestedIfDepth">
|
||||
<property name="max" value="3" />
|
||||
</module>
|
||||
<module name="NestedTryDepth">
|
||||
<property name="max" value="3" />
|
||||
</module>
|
||||
<module name="MultipleVariableDeclarations" />
|
||||
<module name="RequireThis">
|
||||
<property name="checkMethods" value="false" />
|
||||
</module>
|
||||
<module name="OneStatementPerLine" />
|
||||
|
||||
<!-- Imports -->
|
||||
<module name="AvoidStarImport" />
|
||||
<module name="AvoidStaticImport">
|
||||
<property name="excludes"
|
||||
value="org.junit.Assert.*, org.junit.Assume.*, org.hamcrest.CoreMatchers.*, org.hamcrest.Matchers.*, org.mockito.Mockito.*, org.mockito.BDDMockito.*, org.mockito.Matchers.*, org.springframework.test.web.client.match.MockRestRequestMatchers.*, org.springframework.test.web.client.response.MockRestResponseCreators.*" />
|
||||
</module>
|
||||
<module name="IllegalImport" />
|
||||
<module name="RedundantImport" />
|
||||
<module name="UnusedImports">
|
||||
<property name="processJavadoc" value="true" />
|
||||
</module>
|
||||
<module name="ImportOrder">
|
||||
<property name="groups" value="java,/^javax?\./,*,io.spring.issuebot" />
|
||||
<property name="ordered" value="true" />
|
||||
<property name="separated" value="true" />
|
||||
<property name="option" value="bottom" />
|
||||
<property name="sortStaticImportsAlphabetically" value="true" />
|
||||
</module>
|
||||
|
||||
<!-- Javadoc Comments -->
|
||||
<module name="JavadocType">
|
||||
<property name="scope" value="package"/>
|
||||
<property name="authorFormat" value=".+\s.+"/>
|
||||
</module>
|
||||
<module name="JavadocMethod">
|
||||
<property name="scope" value="protected"/>
|
||||
</module>
|
||||
<module name="JavadocVariable">
|
||||
<property name="scope" value="protected"/>
|
||||
</module>
|
||||
<module name="JavadocStyle">
|
||||
<property name="checkEmptyJavadoc" value="true"/>
|
||||
</module>
|
||||
<module name="NonEmptyAtclauseDescription"/>
|
||||
<module name="JavadocTagContinuationIndentation">
|
||||
<property name="offset" value="0"/>
|
||||
</module>
|
||||
<module name="AtclauseOrder">
|
||||
<property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF"/>
|
||||
<property name="tagOrder" value="@param, @author, @since, @see, @version, @serial, @deprecated"/>
|
||||
</module>
|
||||
<module name="AtclauseOrder">
|
||||
<property name="target" value="METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
|
||||
<property name="tagOrder" value="@param, @return, @throws, @since, @deprecated, @see"/>
|
||||
</module>
|
||||
|
||||
<!-- Miscellaneous -->
|
||||
<module name="CommentsIndentation" />
|
||||
<module name="UpperEll" />
|
||||
<module name="ArrayTypeStyle" />
|
||||
<module name="OuterTypeFilename" />
|
||||
|
||||
<!-- Modifiers -->
|
||||
<module name="RedundantModifier" />
|
||||
|
||||
<!-- Regexp -->
|
||||
<module name="RegexpSinglelineJava">
|
||||
<property name="format" value="^\t* +\t*\S" />
|
||||
<property name="message"
|
||||
value="Line has leading space characters; indentation should be performed with tabs only." />
|
||||
<property name="ignoreComments" value="true" />
|
||||
</module>
|
||||
<module name="Regexp">
|
||||
<property name="format" value="[ \t]+$" />
|
||||
<property name="illegalPattern" value="true" />
|
||||
<property name="message" value="Trailing whitespace" />
|
||||
</module>
|
||||
|
||||
<!-- Whitespace -->
|
||||
<module name="GenericWhitespace" />
|
||||
<module name="MethodParamPad" />
|
||||
<module name="NoWhitespaceAfter" >
|
||||
<property name="tokens" value="BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS, UNARY_PLUS, ARRAY_DECLARATOR"/>
|
||||
</module>
|
||||
<module name="NoWhitespaceBefore" />
|
||||
<module name="ParenPad" />
|
||||
<module name="TypecastParenPad" />
|
||||
<module name="WhitespaceAfter" />
|
||||
<module name="WhitespaceAround" />
|
||||
|
||||
</module>
|
||||
</module>
|
||||
295
config/eclipse/eclipse-code-formatter.xml
Normal file
295
config/eclipse/eclipse-code-formatter.xml
Normal file
@@ -0,0 +1,295 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<profiles version="12">
|
||||
<profile kind="CodeFormatterProfile" name="Spring Boot Java Conventions" version="12">
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="90"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_lambda_body" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.compiler.source" value="1.8"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.8"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_binary_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.8"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="tab"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="90"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
|
||||
</profile>
|
||||
</profiles>
|
||||
391
config/eclipse/org.eclipse.jdt.core.prefs
Normal file
391
config/eclipse/org.eclipse.jdt.core.prefs
Normal file
@@ -0,0 +1,391 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.codeComplete.argumentPrefixes=
|
||||
org.eclipse.jdt.core.codeComplete.argumentSuffixes=
|
||||
org.eclipse.jdt.core.codeComplete.fieldPrefixes=
|
||||
org.eclipse.jdt.core.codeComplete.fieldSuffixes=
|
||||
org.eclipse.jdt.core.codeComplete.localPrefixes=
|
||||
org.eclipse.jdt.core.codeComplete.localSuffixes=
|
||||
org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
|
||||
org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
|
||||
org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
|
||||
org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.doc.comment.support=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deadCode=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deprecation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
|
||||
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
|
||||
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
|
||||
org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=default
|
||||
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=default
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
|
||||
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.nullReference=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
|
||||
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
||||
org.eclipse.jdt.core.compiler.processAnnotations=disabled
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
||||
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_assignment=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
|
||||
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
|
||||
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
|
||||
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_field=0
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_method=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_package=0
|
||||
org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
|
||||
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
|
||||
org.eclipse.jdt.core.formatter.comment.format_block_comments=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_header=false
|
||||
org.eclipse.jdt.core.formatter.comment.format_html=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_line_comments=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_source_code=false
|
||||
org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
|
||||
org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
|
||||
org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=do not insert
|
||||
org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
|
||||
org.eclipse.jdt.core.formatter.comment.line_length=90
|
||||
org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
|
||||
org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
|
||||
org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
|
||||
org.eclipse.jdt.core.formatter.compact_else_if=true
|
||||
org.eclipse.jdt.core.formatter.continuation_indentation=2
|
||||
org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
|
||||
org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
|
||||
org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
|
||||
org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
|
||||
org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
|
||||
org.eclipse.jdt.core.formatter.indent_empty_lines=false
|
||||
org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
|
||||
org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
|
||||
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
|
||||
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
|
||||
org.eclipse.jdt.core.formatter.indentation.size=4
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.join_lines_in_comments=true
|
||||
org.eclipse.jdt.core.formatter.join_wrapped_lines=true
|
||||
org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
|
||||
org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
|
||||
org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
|
||||
org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
|
||||
org.eclipse.jdt.core.formatter.lineSplit=90
|
||||
org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
|
||||
org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
|
||||
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
|
||||
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
|
||||
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
|
||||
org.eclipse.jdt.core.formatter.tabulation.char=tab
|
||||
org.eclipse.jdt.core.formatter.tabulation.size=4
|
||||
org.eclipse.jdt.core.formatter.use_on_off_tags=false
|
||||
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
|
||||
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
|
||||
org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
|
||||
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
|
||||
org.eclipse.jdt.core.javaFormatter=org.springframework.ide.eclipse.jdt.formatter.javaformatter
|
||||
125
config/eclipse/org.eclipse.jdt.ui.prefs
Normal file
125
config/eclipse/org.eclipse.jdt.ui.prefs
Normal file
File diff suppressed because one or more lines are too long
233
mvnw
vendored
Normal file
233
mvnw
vendored
Normal file
@@ -0,0 +1,233 @@
|
||||
#!/bin/sh
|
||||
# ----------------------------------------------------------------------------
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Maven2 Start Up Batch script
|
||||
#
|
||||
# Required ENV vars:
|
||||
# ------------------
|
||||
# JAVA_HOME - location of a JDK home dir
|
||||
#
|
||||
# Optional ENV vars
|
||||
# -----------------
|
||||
# M2_HOME - location of maven2's installed home dir
|
||||
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||
# e.g. to debug Maven itself, use
|
||||
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
if [ -z "$MAVEN_SKIP_RC" ] ; then
|
||||
|
||||
if [ -f /etc/mavenrc ] ; then
|
||||
. /etc/mavenrc
|
||||
fi
|
||||
|
||||
if [ -f "$HOME/.mavenrc" ] ; then
|
||||
. "$HOME/.mavenrc"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
# OS specific support. $var _must_ be set to either true or false.
|
||||
cygwin=false;
|
||||
darwin=false;
|
||||
mingw=false
|
||||
case "`uname`" in
|
||||
CYGWIN*) cygwin=true ;;
|
||||
MINGW*) mingw=true;;
|
||||
Darwin*) darwin=true
|
||||
#
|
||||
# Look for the Apple JDKs first to preserve the existing behaviour, and then look
|
||||
# for the new JDKs provided by Oracle.
|
||||
#
|
||||
if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK ] ; then
|
||||
#
|
||||
# Apple JDKs
|
||||
#
|
||||
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
|
||||
fi
|
||||
|
||||
if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Java/JavaVirtualMachines/CurrentJDK ] ; then
|
||||
#
|
||||
# Apple JDKs
|
||||
#
|
||||
export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
|
||||
fi
|
||||
|
||||
if [ -z "$JAVA_HOME" ] && [ -L "/Library/Java/JavaVirtualMachines/CurrentJDK" ] ; then
|
||||
#
|
||||
# Oracle JDKs
|
||||
#
|
||||
export JAVA_HOME=/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
|
||||
fi
|
||||
|
||||
if [ -z "$JAVA_HOME" ] && [ -x "/usr/libexec/java_home" ]; then
|
||||
#
|
||||
# Apple JDKs
|
||||
#
|
||||
export JAVA_HOME=`/usr/libexec/java_home`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "$JAVA_HOME" ] ; then
|
||||
if [ -r /etc/gentoo-release ] ; then
|
||||
JAVA_HOME=`java-config --jre-home`
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$M2_HOME" ] ; then
|
||||
## resolve links - $0 may be a link to maven's home
|
||||
PRG="$0"
|
||||
|
||||
# need this for relative symlinks
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG="`dirname "$PRG"`/$link"
|
||||
fi
|
||||
done
|
||||
|
||||
saveddir=`pwd`
|
||||
|
||||
M2_HOME=`dirname "$PRG"`/..
|
||||
|
||||
# make it fully qualified
|
||||
M2_HOME=`cd "$M2_HOME" && pwd`
|
||||
|
||||
cd "$saveddir"
|
||||
# echo Using m2 at $M2_HOME
|
||||
fi
|
||||
|
||||
# For Cygwin, ensure paths are in UNIX format before anything is touched
|
||||
if $cygwin ; then
|
||||
[ -n "$M2_HOME" ] &&
|
||||
M2_HOME=`cygpath --unix "$M2_HOME"`
|
||||
[ -n "$JAVA_HOME" ] &&
|
||||
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||
[ -n "$CLASSPATH" ] &&
|
||||
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
|
||||
fi
|
||||
|
||||
# For Migwn, ensure paths are in UNIX format before anything is touched
|
||||
if $mingw ; then
|
||||
[ -n "$M2_HOME" ] &&
|
||||
M2_HOME="`(cd "$M2_HOME"; pwd)`"
|
||||
[ -n "$JAVA_HOME" ] &&
|
||||
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
|
||||
# TODO classpath?
|
||||
fi
|
||||
|
||||
if [ -z "$JAVA_HOME" ]; then
|
||||
javaExecutable="`which javac`"
|
||||
if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
|
||||
# readlink(1) is not available as standard on Solaris 10.
|
||||
readLink=`which readlink`
|
||||
if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
|
||||
if $darwin ; then
|
||||
javaHome="`dirname \"$javaExecutable\"`"
|
||||
javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
|
||||
else
|
||||
javaExecutable="`readlink -f \"$javaExecutable\"`"
|
||||
fi
|
||||
javaHome="`dirname \"$javaExecutable\"`"
|
||||
javaHome=`expr "$javaHome" : '\(.*\)/bin'`
|
||||
JAVA_HOME="$javaHome"
|
||||
export JAVA_HOME
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$JAVACMD" ] ; then
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
else
|
||||
JAVACMD="`which java`"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
echo "Error: JAVA_HOME is not defined correctly." >&2
|
||||
echo " We cannot execute $JAVACMD" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$JAVA_HOME" ] ; then
|
||||
echo "Warning: JAVA_HOME environment variable is not set."
|
||||
fi
|
||||
|
||||
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin; then
|
||||
[ -n "$M2_HOME" ] &&
|
||||
M2_HOME=`cygpath --path --windows "$M2_HOME"`
|
||||
[ -n "$JAVA_HOME" ] &&
|
||||
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
|
||||
[ -n "$CLASSPATH" ] &&
|
||||
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
|
||||
fi
|
||||
|
||||
# traverses directory structure from process work directory to filesystem root
|
||||
# first directory with .mvn subdirectory is considered project base directory
|
||||
find_maven_basedir() {
|
||||
local basedir=$(pwd)
|
||||
local wdir=$(pwd)
|
||||
while [ "$wdir" != '/' ] ; do
|
||||
if [ -d "$wdir"/.mvn ] ; then
|
||||
basedir=$wdir
|
||||
break
|
||||
fi
|
||||
wdir=$(cd "$wdir/.."; pwd)
|
||||
done
|
||||
echo "${basedir}"
|
||||
}
|
||||
|
||||
# concatenates all lines of a file
|
||||
concat_lines() {
|
||||
if [ -f "$1" ]; then
|
||||
echo "$(tr -s '\n' ' ' < "$1")"
|
||||
fi
|
||||
}
|
||||
|
||||
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-$(find_maven_basedir)}
|
||||
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
|
||||
|
||||
# Provide a "standardized" way to retrieve the CLI args that will
|
||||
# work with both Windows and non-Windows executions.
|
||||
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
|
||||
export MAVEN_CMD_LINE_ARGS
|
||||
|
||||
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||
|
||||
exec "$JAVACMD" \
|
||||
$MAVEN_OPTS \
|
||||
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
|
||||
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
|
||||
${WRAPPER_LAUNCHER} "$@"
|
||||
145
mvnw.cmd
vendored
Normal file
145
mvnw.cmd
vendored
Normal file
@@ -0,0 +1,145 @@
|
||||
@REM ----------------------------------------------------------------------------
|
||||
@REM Licensed to the Apache Software Foundation (ASF) under one
|
||||
@REM or more contributor license agreements. See the NOTICE file
|
||||
@REM distributed with this work for additional information
|
||||
@REM regarding copyright ownership. The ASF licenses this file
|
||||
@REM to you under the Apache License, Version 2.0 (the
|
||||
@REM "License"); you may not use this file except in compliance
|
||||
@REM with the License. You may obtain a copy of the License at
|
||||
@REM
|
||||
@REM http://www.apache.org/licenses/LICENSE-2.0
|
||||
@REM
|
||||
@REM Unless required by applicable law or agreed to in writing,
|
||||
@REM software distributed under the License is distributed on an
|
||||
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
@REM KIND, either express or implied. See the License for the
|
||||
@REM specific language governing permissions and limitations
|
||||
@REM under the License.
|
||||
@REM ----------------------------------------------------------------------------
|
||||
|
||||
@REM ----------------------------------------------------------------------------
|
||||
@REM Maven2 Start Up Batch script
|
||||
@REM
|
||||
@REM Required ENV vars:
|
||||
@REM JAVA_HOME - location of a JDK home dir
|
||||
@REM
|
||||
@REM Optional ENV vars
|
||||
@REM M2_HOME - location of maven2's installed home dir
|
||||
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
|
||||
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
|
||||
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||
@REM e.g. to debug Maven itself, use
|
||||
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||
@REM ----------------------------------------------------------------------------
|
||||
|
||||
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
|
||||
@echo off
|
||||
@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
|
||||
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
|
||||
|
||||
@REM set %HOME% to equivalent of $HOME
|
||||
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
|
||||
|
||||
@REM Execute a user defined script before this one
|
||||
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
|
||||
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
|
||||
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
|
||||
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
|
||||
:skipRcPre
|
||||
|
||||
@setlocal
|
||||
|
||||
set ERROR_CODE=0
|
||||
|
||||
@REM To isolate internal variables from possible post scripts, we use another setlocal
|
||||
@setlocal
|
||||
|
||||
@REM ==== START VALIDATION ====
|
||||
if not "%JAVA_HOME%" == "" goto OkJHome
|
||||
|
||||
echo.
|
||||
echo Error: JAVA_HOME not found in your environment. >&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||
echo location of your Java installation. >&2
|
||||
echo.
|
||||
goto error
|
||||
|
||||
:OkJHome
|
||||
if exist "%JAVA_HOME%\bin\java.exe" goto init
|
||||
|
||||
echo.
|
||||
echo Error: JAVA_HOME is set to an invalid directory. >&2
|
||||
echo JAVA_HOME = "%JAVA_HOME%" >&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||
echo location of your Java installation. >&2
|
||||
echo.
|
||||
goto error
|
||||
|
||||
@REM ==== END VALIDATION ====
|
||||
|
||||
:init
|
||||
|
||||
set MAVEN_CMD_LINE_ARGS=%*
|
||||
|
||||
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
|
||||
@REM Fallback to current working directory if not found.
|
||||
|
||||
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
|
||||
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
|
||||
|
||||
set EXEC_DIR=%CD%
|
||||
set WDIR=%EXEC_DIR%
|
||||
:findBaseDir
|
||||
IF EXIST "%WDIR%"\.mvn goto baseDirFound
|
||||
cd ..
|
||||
IF "%WDIR%"=="%CD%" goto baseDirNotFound
|
||||
set WDIR=%CD%
|
||||
goto findBaseDir
|
||||
|
||||
:baseDirFound
|
||||
set MAVEN_PROJECTBASEDIR=%WDIR%
|
||||
cd "%EXEC_DIR%"
|
||||
goto endDetectBaseDir
|
||||
|
||||
:baseDirNotFound
|
||||
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
|
||||
cd "%EXEC_DIR%"
|
||||
|
||||
:endDetectBaseDir
|
||||
|
||||
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
|
||||
|
||||
@setlocal EnableExtensions EnableDelayedExpansion
|
||||
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
|
||||
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
|
||||
|
||||
:endReadAdditionalConfig
|
||||
|
||||
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
|
||||
|
||||
set WRAPPER_JAR="".\.mvn\wrapper\maven-wrapper.jar""
|
||||
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||
|
||||
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CMD_LINE_ARGS%
|
||||
if ERRORLEVEL 1 goto error
|
||||
goto end
|
||||
|
||||
:error
|
||||
set ERROR_CODE=1
|
||||
|
||||
:end
|
||||
@endlocal & set ERROR_CODE=%ERROR_CODE%
|
||||
|
||||
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
|
||||
@REM check for post script, once with legacy .bat ending and once with .cmd ending
|
||||
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
|
||||
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
|
||||
:skipRcPost
|
||||
|
||||
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
|
||||
if "%MAVEN_BATCH_PAUSE%" == "on" pause
|
||||
|
||||
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
|
||||
|
||||
exit /B %ERROR_CODE%
|
||||
160
pom.xml
Normal file
160
pom.xml
Normal file
@@ -0,0 +1,160 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>io.spring.issuebot</groupId>
|
||||
<artifactId>issue-bot</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>issue-bot</name>
|
||||
<description>GitHub Issue Bot</description>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>1.3.0.RELEASE</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.16.6</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-commons</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<version>2.16</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.puppycrawl.tools</groupId>
|
||||
<artifactId>checkstyle</artifactId>
|
||||
<version>6.10.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>checkstyle-validation</id>
|
||||
<phase>validate</phase>
|
||||
<configuration>
|
||||
<skip>${disable.checks}</skip>
|
||||
<configLocation>config/checkstyle/checkstyle.xml</configLocation>
|
||||
<suppressionsLocation>config/checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
|
||||
<headerLocation>config/checkstyle/checkstyle-header.txt</headerLocation>
|
||||
<propertyExpansion>checkstyle.build.directory=${project.build.directory}</propertyExpansion>
|
||||
<encoding>UTF-8</encoding>
|
||||
<consoleOutput>true</consoleOutput>
|
||||
<failsOnError>true</failsOnError>
|
||||
<includeTestSourceDirectory>true</includeTestSourceDirectory>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>check</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-eclipse-plugin</artifactId>
|
||||
<configuration>
|
||||
<useProjectReferences>false</useProjectReferences>
|
||||
<additionalConfig>
|
||||
<file>
|
||||
<name>.settings/org.eclipse.jdt.ui.prefs</name>
|
||||
<location>${basedir}/config/eclipse/org.eclipse.jdt.ui.prefs</location>
|
||||
</file>
|
||||
<file>
|
||||
<name>.settings/org.eclipse.jdt.core.prefs</name>
|
||||
<location>${basedir}/config/eclipse/org.eclipse.jdt.core.prefs</location>
|
||||
</file>
|
||||
</additionalConfig>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>jacoco-maven-plugin</artifactId>
|
||||
<version>0.7.5.201505241946</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>jacoco-initialize</id>
|
||||
<goals>
|
||||
<goal>prepare-agent</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>jacoco-report</id>
|
||||
<goals>
|
||||
<goal>report</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.eclipse.m2e</groupId>
|
||||
<artifactId>lifecycle-mapping</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<configuration>
|
||||
<lifecycleMappingMetadata>
|
||||
<pluginExecutions>
|
||||
<pluginExecution>
|
||||
<pluginExecutionFilter>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<versionRange>[2.16,)</versionRange>
|
||||
<goals>
|
||||
<goal>check</goal>
|
||||
</goals>
|
||||
</pluginExecutionFilter>
|
||||
<action>
|
||||
<ignore/>
|
||||
</action>
|
||||
</pluginExecution>
|
||||
</pluginExecutions>
|
||||
</lifecycleMappingMetadata>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
</project>
|
||||
34
src/main/java/io/spring/issuebot/IssueBotApplication.java
Normal file
34
src/main/java/io/spring/issuebot/IssueBotApplication.java
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* Main class for launching Issue Bot.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@SpringBootApplication
|
||||
public class IssueBotApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(IssueBotApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage;
|
||||
|
||||
import io.spring.issuebot.triage.github.GitHubOperations;
|
||||
import io.spring.issuebot.triage.github.Issue;
|
||||
|
||||
/**
|
||||
* A {@link TriageListener} that applies a label to any issues that require triage.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
public class LabelApplyingTriageListener implements TriageListener {
|
||||
|
||||
private final GitHubOperations gitHub;
|
||||
|
||||
/**
|
||||
* Creates a new {@code LabelApplyingTriageListener} that will use the given
|
||||
* {@code gitHubOperations} to apply a label to any issues that require triage.
|
||||
*
|
||||
* @param gitHubOperations the GitHubOperations
|
||||
*/
|
||||
public LabelApplyingTriageListener(GitHubOperations gitHubOperations) {
|
||||
this.gitHub = gitHubOperations;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void requiresTriage(Issue issue, MonitoredRepository repository) {
|
||||
this.gitHub.addLabel(issue, repository.getLabel());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* A repository that should be monitored.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class MonitoredRepository {
|
||||
|
||||
/**
|
||||
* The name of the organization that owns the repository.
|
||||
*/
|
||||
private String organization;
|
||||
|
||||
/**
|
||||
* The name of the repository.
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* The names of the project collaborators whose issues do not require triage.
|
||||
*/
|
||||
private List<String> collaborators;
|
||||
|
||||
/**
|
||||
* The name of the label that should be applied to issues that are waiting for triage.
|
||||
*/
|
||||
private String label;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
|
||||
import io.spring.issuebot.triage.filter.TriageFilter;
|
||||
import io.spring.issuebot.triage.filter.TriageFilters;
|
||||
import io.spring.issuebot.triage.github.GitHubOperations;
|
||||
import io.spring.issuebot.triage.github.Issue;
|
||||
import io.spring.issuebot.triage.github.Page;
|
||||
|
||||
/**
|
||||
* Central class for monitoring the configured repositories and labeling issues as waiting
|
||||
* for triage.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
class RepositoryMonitor {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(RepositoryMonitor.class);
|
||||
|
||||
private final List<MonitoredRepository> repositoryConfigurations;
|
||||
|
||||
private final TriageFilters filters;
|
||||
|
||||
private final GitHubOperations gitHub;
|
||||
|
||||
private final TriageListener listener;
|
||||
|
||||
RepositoryMonitor(GitHubOperations gitHub, TriageFilters filters,
|
||||
TriageListener listener, List<MonitoredRepository> repositoryConfigurations) {
|
||||
this.gitHub = gitHub;
|
||||
this.filters = filters;
|
||||
this.listener = listener;
|
||||
this.repositoryConfigurations = repositoryConfigurations;
|
||||
}
|
||||
|
||||
@Scheduled(fixedRate = 5 * 60 * 1000)
|
||||
void monitor() {
|
||||
for (MonitoredRepository configuration : this.repositoryConfigurations) {
|
||||
monitor(configuration);
|
||||
}
|
||||
}
|
||||
|
||||
private void monitor(MonitoredRepository repository) {
|
||||
log.info("Monitoring {}/{}", repository.getOrganization(), repository.getName());
|
||||
TriageFilter filter = this.filters.filterForRepository(repository);
|
||||
Page<Issue> page = this.gitHub.getIssues(repository.getOrganization(),
|
||||
repository.getName());
|
||||
while (page != null) {
|
||||
for (Issue issue : page.getContent()) {
|
||||
if (!filter.triaged(issue)) {
|
||||
this.listener.requiresTriage(issue, repository);
|
||||
}
|
||||
}
|
||||
page = page.next();
|
||||
}
|
||||
log.info("Monitoring of {}/{} completed", repository.getOrganization(),
|
||||
repository.getName());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
import io.spring.issuebot.triage.filter.StandardTriageFilters;
|
||||
import io.spring.issuebot.triage.github.GitHubTemplate;
|
||||
import io.spring.issuebot.triage.github.RegexLinkParser;
|
||||
|
||||
/**
|
||||
* Central configuration for the beans involved in identifying issues that require triage.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@Configuration
|
||||
@EnableScheduling
|
||||
class TriageConfiguration {
|
||||
|
||||
@Bean
|
||||
TriageProperties triageProperties() {
|
||||
return new TriageProperties();
|
||||
}
|
||||
|
||||
@Bean
|
||||
LabelApplyingTriageListener triageListener() {
|
||||
return new LabelApplyingTriageListener(gitHubTemplate());
|
||||
}
|
||||
|
||||
@Bean
|
||||
RepositoryMonitor repositoryMonitor() {
|
||||
return new RepositoryMonitor(gitHubTemplate(), triageFilters(), triageListener(),
|
||||
triageProperties().getRepositories());
|
||||
}
|
||||
|
||||
@Bean
|
||||
GitHubTemplate gitHubTemplate() {
|
||||
TriageProperties triageProperties = triageProperties();
|
||||
return new GitHubTemplate(triageProperties.getUsername(),
|
||||
triageProperties.getPassword(), linkParser());
|
||||
}
|
||||
|
||||
@Bean
|
||||
StandardTriageFilters triageFilters() {
|
||||
return new StandardTriageFilters(gitHubTemplate());
|
||||
}
|
||||
|
||||
@Bean
|
||||
RegexLinkParser linkParser() {
|
||||
return new RegexLinkParser();
|
||||
}
|
||||
|
||||
}
|
||||
35
src/main/java/io/spring/issuebot/triage/TriageListener.java
Normal file
35
src/main/java/io/spring/issuebot/triage/TriageListener.java
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage;
|
||||
|
||||
import io.spring.issuebot.triage.github.Issue;
|
||||
|
||||
/**
|
||||
* A {@code TriageListener} is notified of issues that require triage.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
public interface TriageListener {
|
||||
|
||||
/**
|
||||
* Notification that the given {@code issue} requires triage.
|
||||
*
|
||||
* @param issue the issue
|
||||
* @param repository the monitored repository to which the issue belongs
|
||||
*/
|
||||
void requiresTriage(Issue issue, MonitoredRepository repository);
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
|
||||
/**
|
||||
* {@link EnableConfigurationProperties Configuration properties} for triaging GitHub
|
||||
* issues.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ConfigurationProperties(prefix = "issuebot.triage")
|
||||
public class TriageProperties {
|
||||
|
||||
/**
|
||||
* Repositories that will be monitored.
|
||||
*/
|
||||
private List<MonitoredRepository> repositories;
|
||||
|
||||
/**
|
||||
* GitHub username.
|
||||
*/
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* GitHub password.
|
||||
*/
|
||||
private String password;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage.filter;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import io.spring.issuebot.triage.github.Comment;
|
||||
import io.spring.issuebot.triage.github.GitHubOperations;
|
||||
import io.spring.issuebot.triage.github.Issue;
|
||||
import io.spring.issuebot.triage.github.Page;
|
||||
|
||||
/**
|
||||
* A {@code TriageFilter} that considers an issue has having been triaged if a
|
||||
* collaborator has commented on it.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
final class CommentedByCollaboratorTriageFilter implements TriageFilter {
|
||||
|
||||
private static final Logger log = LoggerFactory
|
||||
.getLogger(CommentedByCollaboratorTriageFilter.class);
|
||||
|
||||
private final List<String> collaborators;
|
||||
|
||||
private final GitHubOperations gitHub;
|
||||
|
||||
CommentedByCollaboratorTriageFilter(List<String> collaborators,
|
||||
GitHubOperations gitHub) {
|
||||
this.collaborators = collaborators == null ? Collections.emptyList()
|
||||
: collaborators;
|
||||
this.gitHub = gitHub;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean triaged(Issue issue) {
|
||||
Page<Comment> page = this.gitHub.getComments(issue);
|
||||
while (page != null) {
|
||||
for (Comment comment : page.getContent()) {
|
||||
if (this.collaborators.contains(comment.getUser().getLogin())) {
|
||||
log.debug("{} has been triaged. It was commented on by {}",
|
||||
issue.getUrl(), comment.getUser().getLogin());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
page = page.next();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage.filter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import io.spring.issuebot.triage.github.Issue;
|
||||
|
||||
/**
|
||||
* A {@link TriageFilter} that delegates to one or more filters.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
final class DelegatingTriageFilter implements TriageFilter {
|
||||
|
||||
private static final Logger log = LoggerFactory
|
||||
.getLogger(DelegatingTriageFilter.class);
|
||||
|
||||
private final List<TriageFilter> filters;
|
||||
|
||||
DelegatingTriageFilter(List<TriageFilter> filters) {
|
||||
this.filters = filters;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean triaged(Issue issue) {
|
||||
for (TriageFilter filter : this.filters) {
|
||||
if (filter.triaged(issue)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
log.info("{} is waiting for triage", issue.getUrl());
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage.filter;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import io.spring.issuebot.triage.github.Issue;
|
||||
|
||||
/**
|
||||
* A {@link TriageFilter} that considers an issue as having been triaged if any labels
|
||||
* have been applied to it.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
final class LabelledTriageFilter implements TriageFilter {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(LabelledTriageFilter.class);
|
||||
|
||||
@Override
|
||||
public boolean triaged(Issue issue) {
|
||||
if (issue.getLabels() != null && !issue.getLabels().isEmpty()) {
|
||||
log.debug("{} has been triaged. It has been labelled.", issue.getUrl());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage.filter;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import io.spring.issuebot.triage.github.Issue;
|
||||
|
||||
/**
|
||||
* A {@link TriageFilter} that considers an issue as having been triaged if a milestone
|
||||
* has been applied to it.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
public class MilestoneAppliedTriageFilter implements TriageFilter {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(LabelledTriageFilter.class);
|
||||
|
||||
@Override
|
||||
public boolean triaged(Issue issue) {
|
||||
if (issue.getMilestone() != null) {
|
||||
log.debug("Issue has been triaged. It has been added to milestone {}",
|
||||
issue.getMilestone().getTitle());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage.filter;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import io.spring.issuebot.triage.github.Issue;
|
||||
|
||||
/**
|
||||
* A {@link TriageFilter} that considers an issue as having been triaged if it was opened
|
||||
* by a collaborator.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
final class OpenedByCollaboratorTriageFilter implements TriageFilter {
|
||||
|
||||
private static final Logger log = LoggerFactory
|
||||
.getLogger(OpenedByCollaboratorTriageFilter.class);
|
||||
|
||||
private final List<String> collaborators;
|
||||
|
||||
OpenedByCollaboratorTriageFilter(List<String> collaborators) {
|
||||
this.collaborators = collaborators == null ? Collections.emptyList()
|
||||
: collaborators;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean triaged(Issue issue) {
|
||||
if (this.collaborators.contains(issue.getUser().getLogin())) {
|
||||
log.debug("{} has been triaged. It was opened by {}", issue.getUrl(),
|
||||
issue.getUser().getLogin());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage.filter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import io.spring.issuebot.triage.MonitoredRepository;
|
||||
import io.spring.issuebot.triage.github.GitHubOperations;
|
||||
|
||||
/**
|
||||
* Standard implementation of {@code TriageFilters}.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
public class StandardTriageFilters implements TriageFilters {
|
||||
|
||||
private final GitHubOperations gitHub;
|
||||
|
||||
/**
|
||||
* Creates a new {@code StandardTriageFilters} that will use the given
|
||||
* {@code gitHubOperations} to interact with GitHub.
|
||||
*
|
||||
* @param gitHubOperations the GitHubOperations
|
||||
*/
|
||||
public StandardTriageFilters(GitHubOperations gitHubOperations) {
|
||||
this.gitHub = gitHubOperations;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TriageFilter filterForRepository(MonitoredRepository repository) {
|
||||
return new DelegatingTriageFilter(Arrays.asList(
|
||||
new OpenedByCollaboratorTriageFilter(repository.getCollaborators()),
|
||||
new LabelledTriageFilter(), new MilestoneAppliedTriageFilter(),
|
||||
new CommentedByCollaboratorTriageFilter(repository.getCollaborators(),
|
||||
this.gitHub)));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage.filter;
|
||||
|
||||
import io.spring.issuebot.triage.github.Issue;
|
||||
|
||||
/**
|
||||
* A {@code TriageFilter} is used to identify issues which are waiting for triage.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
public interface TriageFilter {
|
||||
|
||||
/**
|
||||
* Returns {@code true} if the given issue has already been triaged, otherwise
|
||||
* {@code false}.
|
||||
*
|
||||
* @param issue the issue
|
||||
* @return {@code true} if the issue has been triaged, {@code false} otherwise
|
||||
*/
|
||||
boolean triaged(Issue issue);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage.filter;
|
||||
|
||||
import io.spring.issuebot.triage.MonitoredRepository;
|
||||
|
||||
/**
|
||||
* {@code TriageFilters} is used to retrieve a {@code TriageFilter} for a particular
|
||||
* {@link MonitoredRepository repository}.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
public interface TriageFilters {
|
||||
|
||||
/**
|
||||
* Returns the {@code TriageFilter} that should be used to process issues for the
|
||||
* given {@code repository}.
|
||||
*
|
||||
* @param repository the repository
|
||||
* @return the filter for the repository
|
||||
*/
|
||||
TriageFilter filterForRepository(MonitoredRepository repository);
|
||||
|
||||
}
|
||||
43
src/main/java/io/spring/issuebot/triage/github/Comment.java
Normal file
43
src/main/java/io/spring/issuebot/triage/github/Comment.java
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage.github;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* A comment that has been made on a GitHub issue.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@Getter
|
||||
public final class Comment {
|
||||
|
||||
private final User user;
|
||||
|
||||
/**
|
||||
* Creates a new comment that was authored by the given {@code user}.
|
||||
*
|
||||
* @param user the user
|
||||
*/
|
||||
@JsonCreator
|
||||
public Comment(@JsonProperty("user") User user) {
|
||||
this.user = user;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage.github;
|
||||
|
||||
/**
|
||||
* Operations that can be performed against the GitHub API.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
public interface GitHubOperations {
|
||||
|
||||
/**
|
||||
* Returns the open issues in the {@code repository} owned by the given
|
||||
* {@code organization}.
|
||||
*
|
||||
* @param organization the name of the organization
|
||||
* @param repository the name of the repository
|
||||
* @return the issues
|
||||
*/
|
||||
Page<Issue> getIssues(String organization, String repository);
|
||||
|
||||
/**
|
||||
* Returns the comments that have been made on the given {@code issue}.
|
||||
*
|
||||
* @param issue the issue
|
||||
* @return the comments
|
||||
*/
|
||||
Page<Comment> getComments(Issue issue);
|
||||
|
||||
/**
|
||||
* Adds the given {@code label} to the given {@code issue}.
|
||||
*
|
||||
* @param issue the issue
|
||||
* @param label the label;
|
||||
* @return the updated issue
|
||||
*/
|
||||
Issue addLabel(Issue issue, String label);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,175 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage.github;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.http.HttpMethod;
|
||||
import org.springframework.http.HttpRequest;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.RequestEntity;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.http.client.ClientHttpRequestExecution;
|
||||
import org.springframework.http.client.ClientHttpRequestInterceptor;
|
||||
import org.springframework.http.client.ClientHttpResponse;
|
||||
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
|
||||
import org.springframework.util.Base64Utils;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.client.DefaultResponseErrorHandler;
|
||||
import org.springframework.web.client.RestOperations;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
/**
|
||||
* Central class for interacting with GitHub's REST API.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
public class GitHubTemplate implements GitHubOperations {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(GitHubTemplate.class);
|
||||
|
||||
private final RestOperations rest;
|
||||
|
||||
private final LinkParser linkParser;
|
||||
|
||||
/**
|
||||
* Creates a new {@code GitHubTemplate} that will use the given {@code username} and
|
||||
* {@code password} to authenticate, and the given {@code linkParser} to parse links
|
||||
* from responses' {@code Link} header.
|
||||
*
|
||||
* @param username the username
|
||||
* @param password the password
|
||||
* @param linkParser the link parser
|
||||
*/
|
||||
public GitHubTemplate(String username, String password, LinkParser linkParser) {
|
||||
this(createDefaultRestTemplate(username, password), linkParser);
|
||||
}
|
||||
|
||||
GitHubTemplate(RestOperations rest, LinkParser linkParser) {
|
||||
this.rest = rest;
|
||||
this.linkParser = linkParser;
|
||||
}
|
||||
|
||||
RestOperations getRestOperations() {
|
||||
return this.rest;
|
||||
}
|
||||
|
||||
static RestTemplate createDefaultRestTemplate(String username, String password) {
|
||||
RestTemplate rest = new RestTemplate();
|
||||
rest.setErrorHandler(new DefaultResponseErrorHandler() {
|
||||
@Override
|
||||
public void handleError(ClientHttpResponse response) throws IOException {
|
||||
if (response.getStatusCode() == HttpStatus.FORBIDDEN && response
|
||||
.getHeaders().getFirst("X-RateLimit-Remaining").equals("0")) {
|
||||
throw new IllegalStateException(
|
||||
"Rate limit exceeded. Limit will reset at "
|
||||
+ new Date(Long
|
||||
.valueOf(response.getHeaders()
|
||||
.getFirst("X-RateLimit-Reset"))
|
||||
* 1000));
|
||||
}
|
||||
}
|
||||
});
|
||||
rest.setRequestFactory(new HttpComponentsClientHttpRequestFactory());
|
||||
rest.setInterceptors(Collections
|
||||
.singletonList(new BasicAuthorizationInterceptor(username, password)));
|
||||
return rest;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<Issue> getIssues(String organization, String repository) {
|
||||
String url = "https://api.github.com/repos/" + organization + "/" + repository
|
||||
+ "/issues";
|
||||
return getIssues(url);
|
||||
}
|
||||
|
||||
private Page<Issue> getIssues(String url) {
|
||||
if (!StringUtils.hasText(url)) {
|
||||
return null;
|
||||
}
|
||||
ResponseEntity<Issue[]> issues = this.rest.getForEntity(url, Issue[].class);
|
||||
return new StandardPage<Issue>(Arrays.asList(issues.getBody()),
|
||||
() -> getIssues(getNextUrl(issues)));
|
||||
}
|
||||
|
||||
private String getNextUrl(ResponseEntity<?> response) {
|
||||
return this.linkParser.parse(response.getHeaders().getFirst("Link")).get("next");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<Comment> getComments(Issue issue) {
|
||||
return getComments(issue.getCommentsUrl());
|
||||
}
|
||||
|
||||
private Page<Comment> getComments(String url) {
|
||||
if (!StringUtils.hasText(url)) {
|
||||
return null;
|
||||
}
|
||||
ResponseEntity<Comment[]> comments = this.rest.getForEntity(url, Comment[].class);
|
||||
return new StandardPage<Comment>(Arrays.asList(comments.getBody()),
|
||||
() -> getComments(getNextUrl(comments)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Issue addLabel(Issue issue, String labelName) {
|
||||
Map<String, Object> body = new HashMap<>();
|
||||
body.put("labels", Arrays.asList(labelName));
|
||||
ResponseEntity<Issue> exchange = this.rest.exchange(
|
||||
new RequestEntity<>(body, HttpMethod.POST, URI.create(issue.getUrl())),
|
||||
Issue.class);
|
||||
if (exchange.getStatusCode() != HttpStatus.OK) {
|
||||
log.warn("Failed to add label to issue. Response status: "
|
||||
+ exchange.getStatusCode());
|
||||
}
|
||||
return exchange.getBody();
|
||||
}
|
||||
|
||||
private static class BasicAuthorizationInterceptor
|
||||
implements ClientHttpRequestInterceptor {
|
||||
|
||||
private static final Charset UTF_8 = Charset.forName("UTF-8");
|
||||
|
||||
private final String username;
|
||||
|
||||
private final String password;
|
||||
|
||||
BasicAuthorizationInterceptor(String username, String password) {
|
||||
this.username = username;
|
||||
this.password = (password == null ? "" : password);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClientHttpResponse intercept(HttpRequest request, byte[] body,
|
||||
ClientHttpRequestExecution execution) throws IOException {
|
||||
String token = Base64Utils.encodeToString(
|
||||
(this.username + ":" + this.password).getBytes(UTF_8));
|
||||
request.getHeaders().add("Authorization", "Basic " + token);
|
||||
return execution.execute(request, body);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
64
src/main/java/io/spring/issuebot/triage/github/Issue.java
Normal file
64
src/main/java/io/spring/issuebot/triage/github/Issue.java
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage.github;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* A GitHub issue.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@Getter
|
||||
public class Issue {
|
||||
|
||||
private final String url;
|
||||
|
||||
private final String commentsUrl;
|
||||
|
||||
private final User user;
|
||||
|
||||
private final List<Label> labels;
|
||||
|
||||
private final Milestone milestone;
|
||||
|
||||
/**
|
||||
* Creates a new {@code Issue}.
|
||||
*
|
||||
* @param url the url of the issue in the GitHub API
|
||||
* @param commentsUrl the url of the comments on the issue in the GitHub API
|
||||
* @param user the user that created the issue
|
||||
* @param labels the labels applied to the issue
|
||||
* @param milestone the milestone applied to the issue
|
||||
*/
|
||||
@JsonCreator
|
||||
public Issue(@JsonProperty("url") String url,
|
||||
@JsonProperty("comments_url") String commentsUrl,
|
||||
@JsonProperty("user") User user, @JsonProperty("labels") List<Label> labels,
|
||||
@JsonProperty("milestone") Milestone milestone) {
|
||||
this.url = url;
|
||||
this.commentsUrl = commentsUrl;
|
||||
this.user = user;
|
||||
this.labels = labels;
|
||||
this.milestone = milestone;
|
||||
}
|
||||
|
||||
}
|
||||
43
src/main/java/io/spring/issuebot/triage/github/Label.java
Normal file
43
src/main/java/io/spring/issuebot/triage/github/Label.java
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage.github;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* A label that can be applied to a GitHub issue.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@Getter
|
||||
public class Label {
|
||||
|
||||
private final String name;
|
||||
|
||||
/**
|
||||
* Creates a new label with the given {@code name}.
|
||||
*
|
||||
* @param name the name of the label
|
||||
*/
|
||||
@JsonCreator
|
||||
public Label(@JsonProperty("name") String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage.github;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* A {@code LinkParser} can be used to parse the
|
||||
* <a href="https://developer.github.com/v3/#link-header">{@code Link} header</a> that is
|
||||
* returned by the GitHub API.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
interface LinkParser {
|
||||
|
||||
/**
|
||||
* Parse the given {@code header} into a map of rel:url pairs.
|
||||
*
|
||||
* @param header the header to parse
|
||||
* @return the map of links
|
||||
*/
|
||||
Map<String, String> parse(String header);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage.github;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* A milestone to which a GitHub Issue can be added.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@Getter
|
||||
public class Milestone {
|
||||
|
||||
private final String title;
|
||||
|
||||
/**
|
||||
* Creates a new {@code Milestone} with the given {@code title}.
|
||||
*
|
||||
* @param title the title
|
||||
*/
|
||||
@JsonCreator
|
||||
public Milestone(@JsonProperty("title") String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
}
|
||||
43
src/main/java/io/spring/issuebot/triage/github/Page.java
Normal file
43
src/main/java/io/spring/issuebot/triage/github/Page.java
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage.github;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A page of results.
|
||||
*
|
||||
* @param <T> the type of the contents of the page
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
public interface Page<T> {
|
||||
|
||||
/**
|
||||
* Returns the next page, if any.
|
||||
*
|
||||
* @return The next page or {@code null}
|
||||
*/
|
||||
Page<T> next();
|
||||
|
||||
/**
|
||||
* Returns the contents of the page.
|
||||
*
|
||||
* @return the contents
|
||||
*/
|
||||
List<T> getContent();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage.github;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* A {@code LinkParser} that uses a regular expression to parse the header.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
public class RegexLinkParser implements LinkParser {
|
||||
|
||||
private static final Pattern LINK_PATTERN = Pattern.compile("<(.+)>; rel=\"(.+)\"");
|
||||
|
||||
@Override
|
||||
public Map<String, String> parse(String input) {
|
||||
Map<String, String> links = new HashMap<>();
|
||||
for (String link : StringUtils.commaDelimitedListToStringArray(input)) {
|
||||
Matcher matcher = LINK_PATTERN.matcher(link.trim());
|
||||
if (matcher.matches()) {
|
||||
links.put(matcher.group(2), matcher.group(1));
|
||||
}
|
||||
}
|
||||
return links;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage.github;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/**
|
||||
* Standard implementation of {@link Page}.
|
||||
*
|
||||
* @param <T> the type of the contents of the page
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
public class StandardPage<T> implements Page<T> {
|
||||
|
||||
private List<T> content;
|
||||
|
||||
private Supplier<Page<T>> nextSupplier;
|
||||
|
||||
/**
|
||||
* Creates a new {@code StandardPage} that has the given {@code content}. The given
|
||||
* {@code nextSupplier} will be used to obtain the next page {@link #next when
|
||||
* requested}.
|
||||
*
|
||||
* @param content the content
|
||||
* @param nextSupplier the supplier of the next page
|
||||
*/
|
||||
public StandardPage(List<T> content, Supplier<Page<T>> nextSupplier) {
|
||||
this.content = content;
|
||||
this.nextSupplier = nextSupplier;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<T> next() {
|
||||
return this.nextSupplier.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<T> getContent() {
|
||||
return this.content;
|
||||
}
|
||||
|
||||
}
|
||||
43
src/main/java/io/spring/issuebot/triage/github/User.java
Normal file
43
src/main/java/io/spring/issuebot/triage/github/User.java
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage.github;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* A GitHub user.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@Getter
|
||||
public class User {
|
||||
|
||||
private final String login;
|
||||
|
||||
/**
|
||||
* Creates a new {@code User} with the given login.
|
||||
*
|
||||
* @param login the login
|
||||
*/
|
||||
@JsonCreator
|
||||
public User(@JsonProperty("login") String login) {
|
||||
this.login = login;
|
||||
}
|
||||
|
||||
}
|
||||
11
src/main/resources/application.yml
Normal file
11
src/main/resources/application.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
issuebot:
|
||||
triage:
|
||||
repositories:
|
||||
- organization: spring-projects
|
||||
name: spring-boot
|
||||
label: waiting-for-triage
|
||||
collaborators:
|
||||
- awilkinson
|
||||
- dsyer
|
||||
- philwebb
|
||||
- snicoll
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
/**
|
||||
* Tests for {@link IssueBotApplication}.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@SpringApplicationConfiguration(IssueBotApplication.class)
|
||||
public class IssueBotApplicationTests {
|
||||
|
||||
@Test
|
||||
public void contextLoads() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import io.spring.issuebot.triage.github.GitHubOperations;
|
||||
import io.spring.issuebot.triage.github.Issue;
|
||||
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
/**
|
||||
* Tests for {@link LabelApplyingTriageListener}.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
public class LabelApplyingTriageListenerTests {
|
||||
|
||||
private GitHubOperations gitHub = mock(GitHubOperations.class);
|
||||
|
||||
private final MonitoredRepository repository = new MonitoredRepository();
|
||||
|
||||
private final LabelApplyingTriageListener listener = new LabelApplyingTriageListener(
|
||||
this.gitHub);
|
||||
|
||||
@Test
|
||||
public void requiresTriage() {
|
||||
Issue issue = new Issue(null, null, null, null, null);
|
||||
this.repository.setLabel("test");
|
||||
this.listener.requiresTriage(issue, this.repository);
|
||||
verify(this.gitHub).addLabel(issue, "test");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import io.spring.issuebot.triage.filter.TriageFilter;
|
||||
import io.spring.issuebot.triage.filter.TriageFilters;
|
||||
import io.spring.issuebot.triage.github.GitHubOperations;
|
||||
import io.spring.issuebot.triage.github.Issue;
|
||||
import io.spring.issuebot.triage.github.Page;
|
||||
|
||||
import static org.mockito.BDDMockito.given;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.verifyNoMoreInteractions;
|
||||
|
||||
/**
|
||||
* Tests for {@link RepositoryMonitor}.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
public class RepositoryMonitorTests {
|
||||
|
||||
private final GitHubOperations gitHub = mock(GitHubOperations.class);
|
||||
|
||||
private final TriageFilters triageFilters = mock(TriageFilters.class);
|
||||
|
||||
private final TriageFilter triageFilter = mock(TriageFilter.class);
|
||||
|
||||
private final TriageListener listener = mock(TriageListener.class);
|
||||
|
||||
@Test
|
||||
public void repositoryWithNoIssues() {
|
||||
MonitoredRepository repository = new MonitoredRepository();
|
||||
repository.setOrganization("test");
|
||||
repository.setName("test");
|
||||
RepositoryMonitor repositoryMonitor = new RepositoryMonitor(this.gitHub,
|
||||
this.triageFilters, this.listener, Arrays.asList(repository));
|
||||
given(this.triageFilters.filterForRepository(repository))
|
||||
.willReturn(this.triageFilter);
|
||||
given(this.gitHub.getIssues("test", "test")).willReturn(null);
|
||||
|
||||
repositoryMonitor.monitor();
|
||||
|
||||
verifyNoMoreInteractions(this.listener);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void repositoryWithIssueRequiringTriage() {
|
||||
MonitoredRepository repository = new MonitoredRepository();
|
||||
repository.setOrganization("test");
|
||||
repository.setName("test");
|
||||
RepositoryMonitor repositoryMonitor = new RepositoryMonitor(this.gitHub,
|
||||
this.triageFilters, this.listener, Arrays.asList(repository));
|
||||
given(this.triageFilters.filterForRepository(repository))
|
||||
.willReturn(this.triageFilter);
|
||||
@SuppressWarnings("unchecked")
|
||||
Page<Issue> page = mock(Page.class);
|
||||
Issue issue = new Issue(null, null, null, null, null);
|
||||
given(page.getContent()).willReturn(Arrays.asList(issue));
|
||||
given(this.gitHub.getIssues("test", "test")).willReturn(page);
|
||||
given(this.triageFilter.triaged(issue)).willReturn(false);
|
||||
|
||||
repositoryMonitor.monitor();
|
||||
|
||||
verify(this.listener).requiresTriage(issue, repository);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void repositoryWithIssueThatHasAlreadyBeenTriaged() {
|
||||
MonitoredRepository repository = new MonitoredRepository();
|
||||
repository.setOrganization("test");
|
||||
repository.setName("test");
|
||||
RepositoryMonitor repositoryMonitor = new RepositoryMonitor(this.gitHub,
|
||||
this.triageFilters, this.listener, Arrays.asList(repository));
|
||||
given(this.triageFilters.filterForRepository(repository))
|
||||
.willReturn(this.triageFilter);
|
||||
@SuppressWarnings("unchecked")
|
||||
Page<Issue> page = mock(Page.class);
|
||||
Issue issue = new Issue(null, null, null, null, null);
|
||||
given(page.getContent()).willReturn(Arrays.asList(issue));
|
||||
given(this.gitHub.getIssues("test", "test")).willReturn(page);
|
||||
given(this.triageFilter.triaged(issue)).willReturn(true);
|
||||
|
||||
repositoryMonitor.monitor();
|
||||
|
||||
verifyNoMoreInteractions(this.listener);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage.filter;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import io.spring.issuebot.triage.github.Comment;
|
||||
import io.spring.issuebot.triage.github.GitHubOperations;
|
||||
import io.spring.issuebot.triage.github.Issue;
|
||||
import io.spring.issuebot.triage.github.Page;
|
||||
import io.spring.issuebot.triage.github.User;
|
||||
|
||||
import static org.hamcrest.Matchers.is;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.mockito.BDDMockito.given;
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
||||
/**
|
||||
* Tests for {@link CommentedByCollaboratorTriageFilter}.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*
|
||||
*/
|
||||
public class CommentedByCollaboratorTriageFilterTests {
|
||||
|
||||
private final GitHubOperations gitHub = mock(GitHubOperations.class);
|
||||
|
||||
private final TriageFilter filter = new CommentedByCollaboratorTriageFilter(
|
||||
Arrays.asList("Adam", "Brenda", "Charlie"), this.gitHub);
|
||||
|
||||
private final Issue issue = new Issue(null, null, null, null, null);
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
public void noComments() {
|
||||
Page<Comment> pageOne = mock(Page.class);
|
||||
given(pageOne.getContent()).willReturn(Collections.emptyList());
|
||||
given(this.gitHub.getComments(this.issue)).willReturn(pageOne);
|
||||
assertThat(this.filter.triaged(this.issue), is(false));
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
public void noCommentsByCollaborators() {
|
||||
Page<Comment> pageOne = mock(Page.class);
|
||||
given(pageOne.getContent())
|
||||
.willReturn(Arrays.asList(new Comment(new User("Debbie"))));
|
||||
given(this.gitHub.getComments(this.issue)).willReturn(pageOne);
|
||||
assertThat(this.filter.triaged(this.issue), is(false));
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
public void commentByCollaboratorOnFirstPage() {
|
||||
Page<Comment> pageOne = mock(Page.class);
|
||||
given(pageOne.getContent())
|
||||
.willReturn(Arrays.asList(new Comment(new User("Brenda"))));
|
||||
given(this.gitHub.getComments(this.issue)).willReturn(pageOne);
|
||||
assertThat(this.filter.triaged(this.issue), is(true));
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
public void commentByCollaboratorOnLaterPage() {
|
||||
Page<Comment> pageOne = mock(Page.class);
|
||||
given(pageOne.getContent())
|
||||
.willReturn(Arrays.asList(new Comment(new User("Debbie"))));
|
||||
Page<Comment> pageTwo = mock(Page.class);
|
||||
given(pageTwo.getContent())
|
||||
.willReturn(Arrays.asList(new Comment(new User("Brenda"))));
|
||||
given(pageOne.next()).willReturn(pageTwo);
|
||||
given(this.gitHub.getComments(this.issue)).willReturn(pageOne);
|
||||
assertThat(this.filter.triaged(this.issue), is(true));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage.filter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import io.spring.issuebot.triage.github.Issue;
|
||||
|
||||
import static org.hamcrest.Matchers.is;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.mockito.BDDMockito.given;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.verifyNoMoreInteractions;
|
||||
|
||||
/**
|
||||
* Tests for {@link DelegatingTriageFilter}.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
public class DelegatingTriageFilterTests {
|
||||
|
||||
private TriageFilter delegate1 = mock(TriageFilter.class);
|
||||
|
||||
private TriageFilter delegate2 = mock(TriageFilter.class);
|
||||
|
||||
private TriageFilter delegate3 = mock(TriageFilter.class);
|
||||
|
||||
private TriageFilter filter = new DelegatingTriageFilter(
|
||||
Arrays.asList(this.delegate1, this.delegate2, this.delegate3));
|
||||
|
||||
@Test
|
||||
public void notTriagedWhenAllDelegatesReturnFalse() {
|
||||
Issue issue = new Issue(null, null, null, null, null);
|
||||
assertThat(this.filter.triaged(issue), is(false));
|
||||
verify(this.delegate1).triaged(issue);
|
||||
verify(this.delegate2).triaged(issue);
|
||||
verify(this.delegate3).triaged(issue);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void triagedAsSoonAsADelegateReturnsTrue() {
|
||||
Issue issue = new Issue(null, null, null, null, null);
|
||||
given(this.delegate2.triaged(issue)).willReturn(true);
|
||||
assertThat(this.filter.triaged(issue), is(true));
|
||||
verify(this.delegate1).triaged(issue);
|
||||
verify(this.delegate2).triaged(issue);
|
||||
verifyNoMoreInteractions(this.delegate3);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage.filter;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import io.spring.issuebot.triage.github.Issue;
|
||||
import io.spring.issuebot.triage.github.Label;
|
||||
|
||||
import static org.hamcrest.Matchers.is;
|
||||
import static org.junit.Assert.assertThat;
|
||||
|
||||
/**
|
||||
* Tests for {@link LabelledTriageFilter}.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
public class LabelledTriageFilterTests {
|
||||
|
||||
private TriageFilter filter = new LabelledTriageFilter();
|
||||
|
||||
@Test
|
||||
public void issueWithLabels() {
|
||||
assertThat(this.filter.triaged(
|
||||
new Issue(null, null, null, Arrays.asList(new Label("test")), null)),
|
||||
is(true));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void issueWithNullLabels() {
|
||||
assertThat(this.filter.triaged(new Issue(null, null, null, null, null)),
|
||||
is(false));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void issueWithNoLabels() {
|
||||
assertThat(
|
||||
this.filter.triaged(
|
||||
new Issue(null, null, null, Collections.emptyList(), null)),
|
||||
is(false));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage.filter;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import io.spring.issuebot.triage.github.Issue;
|
||||
import io.spring.issuebot.triage.github.Milestone;
|
||||
|
||||
import static org.hamcrest.Matchers.is;
|
||||
import static org.junit.Assert.assertThat;
|
||||
|
||||
/**
|
||||
* Tests for {@link MilestoneAppliedTriageFilter}.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*
|
||||
*/
|
||||
public class MilestoneAppliedTriageFilterTests {
|
||||
|
||||
private TriageFilter filter = new MilestoneAppliedTriageFilter();
|
||||
|
||||
@Test
|
||||
public void issueWithMilestoneApplied() {
|
||||
assertThat(
|
||||
this.filter.triaged(
|
||||
new Issue(null, null, null, null, new Milestone("test"))),
|
||||
is(true));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void issueWithNoMilestoneApplied() {
|
||||
assertThat(this.filter.triaged(new Issue(null, null, null, null, null)),
|
||||
is(false));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage.filter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import io.spring.issuebot.triage.github.Issue;
|
||||
import io.spring.issuebot.triage.github.User;
|
||||
|
||||
import static org.hamcrest.Matchers.is;
|
||||
import static org.junit.Assert.assertThat;
|
||||
|
||||
/**
|
||||
* Tests for {@link OpenedByCollaboratorTriageFilter}.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
public class OpenedByCollaboratorTriageFilterTests {
|
||||
|
||||
private TriageFilter filter = new OpenedByCollaboratorTriageFilter(
|
||||
Arrays.asList("Adam", "Brenda", "Charlie"));
|
||||
|
||||
@Test
|
||||
public void openedByCollaborator() {
|
||||
assertThat(
|
||||
this.filter.triaged(new Issue(null, null, new User("Adam"), null, null)),
|
||||
is(true));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void openedByAnotherUser() {
|
||||
assertThat(
|
||||
this.filter
|
||||
.triaged(new Issue(null, null, new User("Debbie"), null, null)),
|
||||
is(false));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,196 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage.github;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.ExpectedException;
|
||||
import org.springframework.core.io.UrlResource;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpMethod;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.test.web.client.MockRestServiceServer;
|
||||
import org.springframework.test.web.client.RequestMatcher;
|
||||
import org.springframework.test.web.client.response.DefaultResponseCreator;
|
||||
import org.springframework.util.Base64Utils;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import static org.hamcrest.Matchers.equalToIgnoringCase;
|
||||
import static org.hamcrest.Matchers.hasSize;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
import static org.hamcrest.Matchers.not;
|
||||
import static org.hamcrest.Matchers.nullValue;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.springframework.test.web.client.match.MockRestRequestMatchers.content;
|
||||
import static org.springframework.test.web.client.match.MockRestRequestMatchers.header;
|
||||
import static org.springframework.test.web.client.match.MockRestRequestMatchers.method;
|
||||
import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo;
|
||||
import static org.springframework.test.web.client.response.MockRestResponseCreators.withStatus;
|
||||
import static org.springframework.test.web.client.response.MockRestResponseCreators.withSuccess;
|
||||
|
||||
/**
|
||||
* Tests for {@link GitHubTemplate}.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
public class GitHubTemplateTests {
|
||||
|
||||
private final RestTemplate rest = GitHubTemplate.createDefaultRestTemplate("username",
|
||||
"password");
|
||||
|
||||
private final MockRestServiceServer server = MockRestServiceServer
|
||||
.createServer(this.rest);
|
||||
|
||||
private GitHubTemplate gitHub = new GitHubTemplate(this.rest, new RegexLinkParser());
|
||||
|
||||
@Rule
|
||||
public ExpectedException thrown = ExpectedException.none();
|
||||
|
||||
@Test
|
||||
public void noIssues() {
|
||||
this.server.expect(requestTo("https://api.github.com/repos/org/repo/issues"))
|
||||
.andExpect(method(HttpMethod.GET)).andExpect(basicAuth())
|
||||
.andRespond(withSuccess("[]", MediaType.APPLICATION_JSON));
|
||||
Page<Issue> issues = this.gitHub.getIssues("org", "repo");
|
||||
assertThat(issues.getContent().size(), is(0));
|
||||
assertThat(issues.next(), is(nullValue()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void singlePageOfIssues() {
|
||||
this.server.expect(requestTo("https://api.github.com/repos/org/repo/issues"))
|
||||
.andExpect(method(HttpMethod.GET)).andExpect(basicAuth())
|
||||
.andRespond(withResource("issues-page-one.json"));
|
||||
Page<Issue> issues = this.gitHub.getIssues("org", "repo");
|
||||
assertThat(issues.getContent().size(), is(15));
|
||||
assertThat(issues.next(), is(nullValue()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void multiplePagesOfIssues() {
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.set("Link", "<page-two>; rel=\"next\"");
|
||||
this.server.expect(requestTo("https://api.github.com/repos/org/repo/issues"))
|
||||
.andExpect(method(HttpMethod.GET)).andExpect(basicAuth())
|
||||
.andRespond(withResource("issues-page-one.json",
|
||||
"Link:<page-two>; rel=\"next\""));
|
||||
this.server.expect(requestTo("page-two")).andExpect(method(HttpMethod.GET))
|
||||
.andExpect(basicAuth()).andRespond(withResource("issues-page-two.json"));
|
||||
Page<Issue> pageOne = this.gitHub.getIssues("org", "repo");
|
||||
assertThat(pageOne.getContent().size(), is(15));
|
||||
Page<Issue> pageTwo = pageOne.next();
|
||||
assertThat(pageTwo, is(not(nullValue())));
|
||||
assertThat(pageTwo.getContent().size(), is(15));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void rateLimited() {
|
||||
long reset = System.currentTimeMillis();
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.set("X-RateLimit-Remaining", "0");
|
||||
headers.set("X-RateLimit-Reset", Long.toString(reset / 1000));
|
||||
this.server.expect(requestTo("https://api.github.com/repos/org/repo/issues"))
|
||||
.andExpect(method(HttpMethod.GET)).andExpect(basicAuth())
|
||||
.andRespond(withStatus(HttpStatus.FORBIDDEN).headers(headers));
|
||||
this.thrown.expect(IllegalStateException.class);
|
||||
this.thrown.expectMessage(equalToIgnoringCase(
|
||||
"Rate limit exceeded. Limit will reset at " + new Date(reset)));
|
||||
this.gitHub.getIssues("org", "repo");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void noComments() {
|
||||
this.server.expect(requestTo("commentsUrl")).andExpect(method(HttpMethod.GET))
|
||||
.andExpect(basicAuth())
|
||||
.andRespond(withSuccess("[]", MediaType.APPLICATION_JSON));
|
||||
Page<Comment> comments = this.gitHub
|
||||
.getComments(new Issue(null, "commentsUrl", null, null, null));
|
||||
assertThat(comments.getContent().size(), is(0));
|
||||
assertThat(comments.next(), is(nullValue()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void singlePageOfComments() {
|
||||
this.server.expect(requestTo("commentsUrl")).andExpect(method(HttpMethod.GET))
|
||||
.andExpect(basicAuth())
|
||||
.andRespond(withResource("comments-page-one.json"));
|
||||
Page<Comment> comments = this.gitHub
|
||||
.getComments(new Issue(null, "commentsUrl", null, null, null));
|
||||
assertThat(comments.getContent().size(), is(17));
|
||||
assertThat(comments.next(), is(nullValue()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void multiplePagesOfComments() {
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.set("Link", "<page-two>; rel=\"next\"");
|
||||
this.server.expect(requestTo("commentsUrl")).andExpect(method(HttpMethod.GET))
|
||||
.andExpect(basicAuth()).andRespond(withResource("comments-page-one.json",
|
||||
"Link:<page-two>; rel=\"next\""));
|
||||
this.server.expect(requestTo("page-two")).andExpect(method(HttpMethod.GET))
|
||||
.andExpect(basicAuth())
|
||||
.andRespond(withResource("comments-page-two.json"));
|
||||
Page<Comment> pageOne = this.gitHub
|
||||
.getComments(new Issue(null, "commentsUrl", null, null, null));
|
||||
assertThat(pageOne.getContent().size(), is(17));
|
||||
Page<Comment> pageTwo = pageOne.next();
|
||||
assertThat(pageTwo, is(not(nullValue())));
|
||||
assertThat(pageTwo.getContent().size(), is(3));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void addLabelToUnlabelledIssue() {
|
||||
this.server.expect(requestTo("issueUrl")).andExpect(method(HttpMethod.POST))
|
||||
.andExpect(basicAuth())
|
||||
.andExpect(content().string("{\"labels\":[\"test\"]}"))
|
||||
.andRespond(withResource("issue-single-label.json"));
|
||||
Issue issue = new Issue("issueUrl", null, null, Arrays.asList(), null);
|
||||
Issue labelledIssue = this.gitHub.addLabel(issue, "test");
|
||||
assertThat(labelledIssue.getLabels(), hasSize(1));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void addAdditionalLabelToIssue() {
|
||||
this.server.expect(requestTo("issueUrl")).andExpect(method(HttpMethod.POST))
|
||||
.andExpect(basicAuth())
|
||||
.andExpect(content().string("{\"labels\":[\"test\"]}"))
|
||||
.andRespond(withResource("issue-two-labels.json"));
|
||||
Issue issue = new Issue("issueUrl", null, null, Arrays.asList(), null);
|
||||
Issue labelledIssue = this.gitHub.addLabel(issue, "test");
|
||||
assertThat(labelledIssue.getLabels(), hasSize(2));
|
||||
}
|
||||
|
||||
private DefaultResponseCreator withResource(String resource, String... headers) {
|
||||
HttpHeaders httpHeaders = new HttpHeaders();
|
||||
for (String header : headers) {
|
||||
String[] components = header.split(":");
|
||||
httpHeaders.set(components[0], components[1]);
|
||||
}
|
||||
return withSuccess(new UrlResource(getClass().getResource(resource)),
|
||||
MediaType.APPLICATION_JSON).headers(httpHeaders);
|
||||
}
|
||||
|
||||
private RequestMatcher basicAuth() {
|
||||
return header("Authorization", "Basic "
|
||||
+ new String(Base64Utils.encode("username:password".getBytes())));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.spring.issuebot.triage.github;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.hamcrest.Matchers.hasEntry;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
import static org.junit.Assert.assertThat;
|
||||
|
||||
/**
|
||||
* Tests for {@link RegexLinkParser}.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
public class RegexLinkParserTests {
|
||||
|
||||
private final LinkParser linkParser = new RegexLinkParser();
|
||||
|
||||
@Test
|
||||
public void emptyInput() {
|
||||
assertThat(this.linkParser.parse("").size(), is(0));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void nullInput() {
|
||||
assertThat(this.linkParser.parse(null).size(), is(0));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void singleLink() {
|
||||
Map<String, String> links = this.linkParser.parse("<url>; rel=\"foo\"");
|
||||
assertThat(links.size(), is(1));
|
||||
assertThat(links, hasEntry("foo", "url"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void notALink() {
|
||||
Map<String, String> links = this.linkParser.parse("<url>; foo bar");
|
||||
assertThat(links.size(), is(0));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void multipleLinks() {
|
||||
Map<String, String> links = this.linkParser
|
||||
.parse("<url-one>; rel=\"foo\", <url-two>; rel=\"bar\"");
|
||||
assertThat(links.size(), is(2));
|
||||
assertThat(links, hasEntry("foo", "url-one"));
|
||||
assertThat(links, hasEntry("bar", "url-two"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,478 @@
|
||||
[
|
||||
{
|
||||
"url": "https://api.github.com/repos/spring-projects/spring-boot/issues/comments/42658986",
|
||||
"html_url": "https://github.com/spring-projects/spring-boot/issues/739#issuecomment-42658986",
|
||||
"issue_url": "https://api.github.com/repos/spring-projects/spring-boot/issues/739",
|
||||
"id": 42658986,
|
||||
"user": {
|
||||
"login": "alex-konkov",
|
||||
"id": 5979834,
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/5979834?v=3",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/alex-konkov",
|
||||
"html_url": "https://github.com/alex-konkov",
|
||||
"followers_url": "https://api.github.com/users/alex-konkov/followers",
|
||||
"following_url": "https://api.github.com/users/alex-konkov/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/alex-konkov/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/alex-konkov/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/alex-konkov/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/alex-konkov/orgs",
|
||||
"repos_url": "https://api.github.com/users/alex-konkov/repos",
|
||||
"events_url": "https://api.github.com/users/alex-konkov/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/alex-konkov/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"created_at": "2014-05-09T12:07:27Z",
|
||||
"updated_at": "2014-05-09T12:07:44Z",
|
||||
"body": "Would be interesting what do people think on that and if there is a chance to get it done in spring-boot some day. Any thoughts? thx"
|
||||
},
|
||||
{
|
||||
"url": "https://api.github.com/repos/spring-projects/spring-boot/issues/comments/42822369",
|
||||
"html_url": "https://github.com/spring-projects/spring-boot/issues/739#issuecomment-42822369",
|
||||
"issue_url": "https://api.github.com/repos/spring-projects/spring-boot/issues/739",
|
||||
"id": 42822369,
|
||||
"user": {
|
||||
"login": "MuzuMatt",
|
||||
"id": 5112682,
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/5112682?v=3",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/MuzuMatt",
|
||||
"html_url": "https://github.com/MuzuMatt",
|
||||
"followers_url": "https://api.github.com/users/MuzuMatt/followers",
|
||||
"following_url": "https://api.github.com/users/MuzuMatt/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/MuzuMatt/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/MuzuMatt/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/MuzuMatt/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/MuzuMatt/orgs",
|
||||
"repos_url": "https://api.github.com/users/MuzuMatt/repos",
|
||||
"events_url": "https://api.github.com/users/MuzuMatt/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/MuzuMatt/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"created_at": "2014-05-12T11:47:36Z",
|
||||
"updated_at": "2014-05-12T11:47:36Z",
|
||||
"body": "I would certainly welcome this as an enhancement. This is the one limitation that prevents some of my apps from being contained in a single jar file."
|
||||
},
|
||||
{
|
||||
"url": "https://api.github.com/repos/spring-projects/spring-boot/issues/comments/46397356",
|
||||
"html_url": "https://github.com/spring-projects/spring-boot/issues/739#issuecomment-46397356",
|
||||
"issue_url": "https://api.github.com/repos/spring-projects/spring-boot/issues/739",
|
||||
"id": 46397356,
|
||||
"user": {
|
||||
"login": "mahe-kl",
|
||||
"id": 689801,
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/689801?v=3",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/mahe-kl",
|
||||
"html_url": "https://github.com/mahe-kl",
|
||||
"followers_url": "https://api.github.com/users/mahe-kl/followers",
|
||||
"following_url": "https://api.github.com/users/mahe-kl/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/mahe-kl/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/mahe-kl/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/mahe-kl/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/mahe-kl/orgs",
|
||||
"repos_url": "https://api.github.com/users/mahe-kl/repos",
|
||||
"events_url": "https://api.github.com/users/mahe-kl/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/mahe-kl/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"created_at": "2014-06-18T05:27:22Z",
|
||||
"updated_at": "2014-06-18T05:27:22Z",
|
||||
"body": "This would be very much appreciated. So far we've been stuck with Spring dynamic proxy based AOP and its limitations which has lead to all kinds of ugliness such as static support classes duplicating the aspect's behaviour etc.\r\n\r\nThe reason for this has been that we have been running our applications with Maven Jetty plugin and don't want to ship the aspectj agent jar separately with the application. Ideally it should come from repository just like any other dependency without the need to specify it's exact location on command line.\r\n\r\nWe're at the moment changing over to spring boot, gradle and other cool stuff and this would be a huge plus."
|
||||
},
|
||||
{
|
||||
"url": "https://api.github.com/repos/spring-projects/spring-boot/issues/comments/58429597",
|
||||
"html_url": "https://github.com/spring-projects/spring-boot/issues/739#issuecomment-58429597",
|
||||
"issue_url": "https://api.github.com/repos/spring-projects/spring-boot/issues/739",
|
||||
"id": 58429597,
|
||||
"user": {
|
||||
"login": "kmandeville",
|
||||
"id": 1746424,
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/1746424?v=3",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/kmandeville",
|
||||
"html_url": "https://github.com/kmandeville",
|
||||
"followers_url": "https://api.github.com/users/kmandeville/followers",
|
||||
"following_url": "https://api.github.com/users/kmandeville/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/kmandeville/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/kmandeville/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/kmandeville/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/kmandeville/orgs",
|
||||
"repos_url": "https://api.github.com/users/kmandeville/repos",
|
||||
"events_url": "https://api.github.com/users/kmandeville/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/kmandeville/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"created_at": "2014-10-08T21:19:45Z",
|
||||
"updated_at": "2014-10-08T21:19:45Z",
|
||||
"body": "Any progress on this? Looks like it keeps slipping milestones..."
|
||||
},
|
||||
{
|
||||
"url": "https://api.github.com/repos/spring-projects/spring-boot/issues/comments/58470893",
|
||||
"html_url": "https://github.com/spring-projects/spring-boot/issues/739#issuecomment-58470893",
|
||||
"issue_url": "https://api.github.com/repos/spring-projects/spring-boot/issues/739",
|
||||
"id": 58470893,
|
||||
"user": {
|
||||
"login": "benneq",
|
||||
"id": 1627305,
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/1627305?v=3",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/benneq",
|
||||
"html_url": "https://github.com/benneq",
|
||||
"followers_url": "https://api.github.com/users/benneq/followers",
|
||||
"following_url": "https://api.github.com/users/benneq/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/benneq/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/benneq/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/benneq/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/benneq/orgs",
|
||||
"repos_url": "https://api.github.com/users/benneq/repos",
|
||||
"events_url": "https://api.github.com/users/benneq/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/benneq/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"created_at": "2014-10-09T07:05:05Z",
|
||||
"updated_at": "2014-10-09T07:05:05Z",
|
||||
"body": "Would be cool if this makes it in 1.2.0."
|
||||
},
|
||||
{
|
||||
"url": "https://api.github.com/repos/spring-projects/spring-boot/issues/comments/58511066",
|
||||
"html_url": "https://github.com/spring-projects/spring-boot/issues/739#issuecomment-58511066",
|
||||
"issue_url": "https://api.github.com/repos/spring-projects/spring-boot/issues/739",
|
||||
"id": 58511066,
|
||||
"user": {
|
||||
"login": "wilkinsona",
|
||||
"id": 914682,
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/914682?v=3",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/wilkinsona",
|
||||
"html_url": "https://github.com/wilkinsona",
|
||||
"followers_url": "https://api.github.com/users/wilkinsona/followers",
|
||||
"following_url": "https://api.github.com/users/wilkinsona/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/wilkinsona/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/wilkinsona/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/wilkinsona/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/wilkinsona/orgs",
|
||||
"repos_url": "https://api.github.com/users/wilkinsona/repos",
|
||||
"events_url": "https://api.github.com/users/wilkinsona/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/wilkinsona/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"created_at": "2014-10-09T13:46:12Z",
|
||||
"updated_at": "2014-10-09T13:46:12Z",
|
||||
"body": "I have some doubts about the usability of this feature. Perhaps those who are interested in it can allay my fears. My primary concern is that launching your app via `java -jar` would give you load-time weaving automatically, whereas launching it via the main method in your IDE would not. A similar problem would exist when running integration tests (there's [an issue](https://jira.spring.io/browse/SPR-9938) open against Spring's Test framework for this).\r\n\r\nWhile having to configure the agent is clunky, I like the fact that it's consistent."
|
||||
},
|
||||
{
|
||||
"url": "https://api.github.com/repos/spring-projects/spring-boot/issues/comments/59260372",
|
||||
"html_url": "https://github.com/spring-projects/spring-boot/issues/739#issuecomment-59260372",
|
||||
"issue_url": "https://api.github.com/repos/spring-projects/spring-boot/issues/739",
|
||||
"id": 59260372,
|
||||
"user": {
|
||||
"login": "dwelch2344",
|
||||
"id": 160142,
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/160142?v=3",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/dwelch2344",
|
||||
"html_url": "https://github.com/dwelch2344",
|
||||
"followers_url": "https://api.github.com/users/dwelch2344/followers",
|
||||
"following_url": "https://api.github.com/users/dwelch2344/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/dwelch2344/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/dwelch2344/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/dwelch2344/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/dwelch2344/orgs",
|
||||
"repos_url": "https://api.github.com/users/dwelch2344/repos",
|
||||
"events_url": "https://api.github.com/users/dwelch2344/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/dwelch2344/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"created_at": "2014-10-15T19:19:15Z",
|
||||
"updated_at": "2014-10-15T19:19:15Z",
|
||||
"body": "+1 to this"
|
||||
},
|
||||
{
|
||||
"url": "https://api.github.com/repos/spring-projects/spring-boot/issues/comments/59425934",
|
||||
"html_url": "https://github.com/spring-projects/spring-boot/issues/739#issuecomment-59425934",
|
||||
"issue_url": "https://api.github.com/repos/spring-projects/spring-boot/issues/739",
|
||||
"id": 59425934,
|
||||
"user": {
|
||||
"login": "alex-konkov",
|
||||
"id": 5979834,
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/5979834?v=3",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/alex-konkov",
|
||||
"html_url": "https://github.com/alex-konkov",
|
||||
"followers_url": "https://api.github.com/users/alex-konkov/followers",
|
||||
"following_url": "https://api.github.com/users/alex-konkov/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/alex-konkov/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/alex-konkov/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/alex-konkov/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/alex-konkov/orgs",
|
||||
"repos_url": "https://api.github.com/users/alex-konkov/repos",
|
||||
"events_url": "https://api.github.com/users/alex-konkov/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/alex-konkov/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"created_at": "2014-10-16T20:34:31Z",
|
||||
"updated_at": "2014-10-16T20:34:31Z",
|
||||
"body": "**wilkinsona**, your point is valid but it is rather consistently not implemented in either usage case. The change towards LTW support appears to be evolutionary as long as spring boot brings the idea of self-sufficient package."
|
||||
},
|
||||
{
|
||||
"url": "https://api.github.com/repos/spring-projects/spring-boot/issues/comments/93217370",
|
||||
"html_url": "https://github.com/spring-projects/spring-boot/issues/739#issuecomment-93217370",
|
||||
"issue_url": "https://api.github.com/repos/spring-projects/spring-boot/issues/739",
|
||||
"id": 93217370,
|
||||
"user": {
|
||||
"login": "beihaifeiwu",
|
||||
"id": 5372382,
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/5372382?v=3",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/beihaifeiwu",
|
||||
"html_url": "https://github.com/beihaifeiwu",
|
||||
"followers_url": "https://api.github.com/users/beihaifeiwu/followers",
|
||||
"following_url": "https://api.github.com/users/beihaifeiwu/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/beihaifeiwu/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/beihaifeiwu/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/beihaifeiwu/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/beihaifeiwu/orgs",
|
||||
"repos_url": "https://api.github.com/users/beihaifeiwu/repos",
|
||||
"events_url": "https://api.github.com/users/beihaifeiwu/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/beihaifeiwu/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"created_at": "2015-04-15T06:22:02Z",
|
||||
"updated_at": "2015-04-15T06:22:02Z",
|
||||
"body": "+1 to this"
|
||||
},
|
||||
{
|
||||
"url": "https://api.github.com/repos/spring-projects/spring-boot/issues/comments/99082508",
|
||||
"html_url": "https://github.com/spring-projects/spring-boot/issues/739#issuecomment-99082508",
|
||||
"issue_url": "https://api.github.com/repos/spring-projects/spring-boot/issues/739",
|
||||
"id": 99082508,
|
||||
"user": {
|
||||
"login": "kjozsa",
|
||||
"id": 203229,
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/203229?v=3",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/kjozsa",
|
||||
"html_url": "https://github.com/kjozsa",
|
||||
"followers_url": "https://api.github.com/users/kjozsa/followers",
|
||||
"following_url": "https://api.github.com/users/kjozsa/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/kjozsa/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/kjozsa/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/kjozsa/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/kjozsa/orgs",
|
||||
"repos_url": "https://api.github.com/users/kjozsa/repos",
|
||||
"events_url": "https://api.github.com/users/kjozsa/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/kjozsa/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"created_at": "2015-05-05T13:46:19Z",
|
||||
"updated_at": "2015-05-05T13:46:19Z",
|
||||
"body": "I would also need this feature, count me in please. +1"
|
||||
},
|
||||
{
|
||||
"url": "https://api.github.com/repos/spring-projects/spring-boot/issues/comments/99091536",
|
||||
"html_url": "https://github.com/spring-projects/spring-boot/issues/739#issuecomment-99091536",
|
||||
"issue_url": "https://api.github.com/repos/spring-projects/spring-boot/issues/739",
|
||||
"id": 99091536,
|
||||
"user": {
|
||||
"login": "kjozsa",
|
||||
"id": 203229,
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/203229?v=3",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/kjozsa",
|
||||
"html_url": "https://github.com/kjozsa",
|
||||
"followers_url": "https://api.github.com/users/kjozsa/followers",
|
||||
"following_url": "https://api.github.com/users/kjozsa/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/kjozsa/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/kjozsa/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/kjozsa/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/kjozsa/orgs",
|
||||
"repos_url": "https://api.github.com/users/kjozsa/repos",
|
||||
"events_url": "https://api.github.com/users/kjozsa/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/kjozsa/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"created_at": "2015-05-05T14:15:48Z",
|
||||
"updated_at": "2015-05-05T14:15:48Z",
|
||||
"body": "Also, a quick comment above as \"being consistent\" - if you have a spring-boot project with Eclipselink which does require LTW, running it with \"mvn spring-boot:run\" will work and running the packaged jar file with \"java -jar\" will just fail. \r\n\r\nAn example of this problem is demonstrated with this project: https://github.com/dsyer/spring-boot-sample-data-eclipselink - clone it, mvn package and java -jar the built jar, it fails badly."
|
||||
},
|
||||
{
|
||||
"url": "https://api.github.com/repos/spring-projects/spring-boot/issues/comments/99105236",
|
||||
"html_url": "https://github.com/spring-projects/spring-boot/issues/739#issuecomment-99105236",
|
||||
"issue_url": "https://api.github.com/repos/spring-projects/spring-boot/issues/739",
|
||||
"id": 99105236,
|
||||
"user": {
|
||||
"login": "wilkinsona",
|
||||
"id": 914682,
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/914682?v=3",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/wilkinsona",
|
||||
"html_url": "https://github.com/wilkinsona",
|
||||
"followers_url": "https://api.github.com/users/wilkinsona/followers",
|
||||
"following_url": "https://api.github.com/users/wilkinsona/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/wilkinsona/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/wilkinsona/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/wilkinsona/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/wilkinsona/orgs",
|
||||
"repos_url": "https://api.github.com/users/wilkinsona/repos",
|
||||
"events_url": "https://api.github.com/users/wilkinsona/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/wilkinsona/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"created_at": "2015-05-05T14:59:08Z",
|
||||
"updated_at": "2015-05-05T14:59:08Z",
|
||||
"body": "It only works with `mvn spring-boot:run` because the [agent is configured in the `pom.xml`](https://github.com/dsyer/spring-boot-sample-data-eclipselink/blob/master/pom.xml#L83-L85):\r\n\r\n```\r\n<configuration>\r\n <agent>${settings.localRepository}/org/springframework/spring-instrument/${spring.version}/spring-instrument-${spring.version}.jar</agent>\r\n</configuration>\r\n```\r\n\r\nIf you don't supply the equivalent configuration when running the application using `java -jar` it will, quite reasonably, fail.\r\n"
|
||||
},
|
||||
{
|
||||
"url": "https://api.github.com/repos/spring-projects/spring-boot/issues/comments/132124896",
|
||||
"html_url": "https://github.com/spring-projects/spring-boot/issues/739#issuecomment-132124896",
|
||||
"issue_url": "https://api.github.com/repos/spring-projects/spring-boot/issues/739",
|
||||
"id": 132124896,
|
||||
"user": {
|
||||
"login": "imod",
|
||||
"id": 543297,
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/543297?v=3",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/imod",
|
||||
"html_url": "https://github.com/imod",
|
||||
"followers_url": "https://api.github.com/users/imod/followers",
|
||||
"following_url": "https://api.github.com/users/imod/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/imod/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/imod/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/imod/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/imod/orgs",
|
||||
"repos_url": "https://api.github.com/users/imod/repos",
|
||||
"events_url": "https://api.github.com/users/imod/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/imod/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"created_at": "2015-08-18T08:56:52Z",
|
||||
"updated_at": "2015-08-18T08:56:52Z",
|
||||
"body": "is there anything we can do to make this happen?"
|
||||
},
|
||||
{
|
||||
"url": "https://api.github.com/repos/spring-projects/spring-boot/issues/comments/132125365",
|
||||
"html_url": "https://github.com/spring-projects/spring-boot/issues/739#issuecomment-132125365",
|
||||
"issue_url": "https://api.github.com/repos/spring-projects/spring-boot/issues/739",
|
||||
"id": 132125365,
|
||||
"user": {
|
||||
"login": "wilkinsona",
|
||||
"id": 914682,
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/914682?v=3",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/wilkinsona",
|
||||
"html_url": "https://github.com/wilkinsona",
|
||||
"followers_url": "https://api.github.com/users/wilkinsona/followers",
|
||||
"following_url": "https://api.github.com/users/wilkinsona/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/wilkinsona/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/wilkinsona/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/wilkinsona/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/wilkinsona/orgs",
|
||||
"repos_url": "https://api.github.com/users/wilkinsona/repos",
|
||||
"events_url": "https://api.github.com/users/wilkinsona/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/wilkinsona/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"created_at": "2015-08-18T08:59:45Z",
|
||||
"updated_at": "2015-08-18T08:59:45Z",
|
||||
"body": "I've yet to see a compelling argument against my [usability concerns described above](https://github.com/spring-projects/spring-boot/issues/739#issuecomment-58511066)."
|
||||
},
|
||||
{
|
||||
"url": "https://api.github.com/repos/spring-projects/spring-boot/issues/comments/132140683",
|
||||
"html_url": "https://github.com/spring-projects/spring-boot/issues/739#issuecomment-132140683",
|
||||
"issue_url": "https://api.github.com/repos/spring-projects/spring-boot/issues/739",
|
||||
"id": 132140683,
|
||||
"user": {
|
||||
"login": "imod",
|
||||
"id": 543297,
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/543297?v=3",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/imod",
|
||||
"html_url": "https://github.com/imod",
|
||||
"followers_url": "https://api.github.com/users/imod/followers",
|
||||
"following_url": "https://api.github.com/users/imod/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/imod/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/imod/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/imod/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/imod/orgs",
|
||||
"repos_url": "https://api.github.com/users/imod/repos",
|
||||
"events_url": "https://api.github.com/users/imod/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/imod/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"created_at": "2015-08-18T09:28:08Z",
|
||||
"updated_at": "2015-08-18T09:29:32Z",
|
||||
"body": "hmm, not sure the miss of a feature on the test framework is a compelling argument...\r\n\r\nFor us, this missing feature means we can't use load time weaving on cloudfoundry with any spring boot application. Because the deploy unit is a single JAR - if we wanna change this, then we have to fork the java_buildpack and add this functionality (that's nothing I really wanna do). \r\nLooking at the importance of spring for cloudfoundry (in both ways) I would assume this argument is stronger then the one about the test framework.\r\n\r\nIn fact implementing it here will maybe have @sbrannen to take an other look at the mention issue in the test framework too."
|
||||
},
|
||||
{
|
||||
"url": "https://api.github.com/repos/spring-projects/spring-boot/issues/comments/132148778",
|
||||
"html_url": "https://github.com/spring-projects/spring-boot/issues/739#issuecomment-132148778",
|
||||
"issue_url": "https://api.github.com/repos/spring-projects/spring-boot/issues/739",
|
||||
"id": 132148778,
|
||||
"user": {
|
||||
"login": "wilkinsona",
|
||||
"id": 914682,
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/914682?v=3",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/wilkinsona",
|
||||
"html_url": "https://github.com/wilkinsona",
|
||||
"followers_url": "https://api.github.com/users/wilkinsona/followers",
|
||||
"following_url": "https://api.github.com/users/wilkinsona/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/wilkinsona/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/wilkinsona/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/wilkinsona/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/wilkinsona/orgs",
|
||||
"repos_url": "https://api.github.com/users/wilkinsona/repos",
|
||||
"events_url": "https://api.github.com/users/wilkinsona/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/wilkinsona/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"created_at": "2015-08-18T09:51:32Z",
|
||||
"updated_at": "2015-08-18T09:51:32Z",
|
||||
"body": "> hmm, not sure the miss of a feature on the test framework is a compelling argument...\r\n\r\nAs I said above, that's a secondary concern. My primary concern is about the complexity of having things behave differently when you run using `java -jar`, vs launching the main method in your IDE, vs launching via our Maven or Gradle plugins. Rather than having to document different behaviour depending on how you launch your application, I like the consistency of the current behaviour. As things stand, you consistently have to configure the agent. Adding some magic to `java -jar` would break that consistency.\r\n\r\nThe Java buildpack already has support for a number of Java agents. Another way to tackle your particular problem would be via an enhancement to the buildpack. /cc @cgfrost"
|
||||
},
|
||||
{
|
||||
"url": "https://api.github.com/repos/spring-projects/spring-boot/issues/comments/132182069",
|
||||
"html_url": "https://github.com/spring-projects/spring-boot/issues/739#issuecomment-132182069",
|
||||
"issue_url": "https://api.github.com/repos/spring-projects/spring-boot/issues/739",
|
||||
"id": 132182069,
|
||||
"user": {
|
||||
"login": "lukiano",
|
||||
"id": 686213,
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/686213?v=3",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/lukiano",
|
||||
"html_url": "https://github.com/lukiano",
|
||||
"followers_url": "https://api.github.com/users/lukiano/followers",
|
||||
"following_url": "https://api.github.com/users/lukiano/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/lukiano/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/lukiano/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/lukiano/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/lukiano/orgs",
|
||||
"repos_url": "https://api.github.com/users/lukiano/repos",
|
||||
"events_url": "https://api.github.com/users/lukiano/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/lukiano/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"created_at": "2015-08-18T11:34:37Z",
|
||||
"updated_at": "2015-08-18T11:34:37Z",
|
||||
"body": "This is what I did to make it work:\r\n\r\n*pom.xml*\r\n\r\n```xml\r\n<plugin>\r\n <groupId>org.springframework.boot</groupId>\r\n <artifactId>spring-boot-maven-plugin</artifactId>\r\n <configuration>\r\n <layout>ZIP</layout>\r\n <mainClass>org.springframework.boot.SpringApplication</mainClass>\r\n </configuration>\r\n</plugin>\r\n```\r\nZIP layout so that it uses the `org.springframework.boot.loader.PropertiesLauncher`\r\n\r\n*application.properties*\r\n```properties\r\nloader.classLoader=packageName.TransformingClassLoader\r\nloader.main=org.springframework.boot.SpringApplication\r\nspring.main.sources=packageName.Config\r\n```\r\nHere I tell the PropertiesLauncher to use my own classLoader, and that the main program is the standard `SpringApplication`, with `packageName.Config` as my Spring configuration file.\r\n\r\n*TransformingClassLoader.java*\r\nhttps://gist.github.com/lukiano/114cb01a59ddd9880aa7\r\nbased on `org.springframework.instrument.classloading.ShadowingClassLoader` and `org.springframework.core.OverridingClassLoader`\r\n\r\nAnd then my Config file implements LoadTimeWeavingConfigurer\r\n```java\r\npublic LoadTimeWeaver getLoadTimeWeaver() {\r\n return new ReflectiveLoadTimeWeaver(Thread.currentThread().getContextClassLoader());\r\n}\r\n```\r\n\r\nSo basically it loads the entire Spring context under my own ClassLoader which implements the transformer methods that `ReflectiveLoadTimeWeaver` expects. And it still works when it creates a fat-jar, so it doesn't depend on being run with `mvn spring-boot:run`"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,86 @@
|
||||
[
|
||||
{
|
||||
"url": "https://api.github.com/repos/spring-projects/spring-boot/issues/comments/132184484",
|
||||
"html_url": "https://github.com/spring-projects/spring-boot/issues/739#issuecomment-132184484",
|
||||
"issue_url": "https://api.github.com/repos/spring-projects/spring-boot/issues/739",
|
||||
"id": 132184484,
|
||||
"user": {
|
||||
"login": "imod",
|
||||
"id": 543297,
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/543297?v=3",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/imod",
|
||||
"html_url": "https://github.com/imod",
|
||||
"followers_url": "https://api.github.com/users/imod/followers",
|
||||
"following_url": "https://api.github.com/users/imod/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/imod/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/imod/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/imod/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/imod/orgs",
|
||||
"repos_url": "https://api.github.com/users/imod/repos",
|
||||
"events_url": "https://api.github.com/users/imod/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/imod/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"created_at": "2015-08-18T11:45:53Z",
|
||||
"updated_at": "2015-08-18T11:45:53Z",
|
||||
"body": "@lukiano nice, that looks like a solution which would also solve the concerns @wilkinsona has, with some further work this might be doable even without the ZIP packaging and therefore integrate it into boot directly.\r\nI just found an other solution which might be interesting too: https://github.com/subes/invesdwin-instrument"
|
||||
},
|
||||
{
|
||||
"url": "https://api.github.com/repos/spring-projects/spring-boot/issues/comments/132186762",
|
||||
"html_url": "https://github.com/spring-projects/spring-boot/issues/739#issuecomment-132186762",
|
||||
"issue_url": "https://api.github.com/repos/spring-projects/spring-boot/issues/739",
|
||||
"id": 132186762,
|
||||
"user": {
|
||||
"login": "lukiano",
|
||||
"id": 686213,
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/686213?v=3",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/lukiano",
|
||||
"html_url": "https://github.com/lukiano",
|
||||
"followers_url": "https://api.github.com/users/lukiano/followers",
|
||||
"following_url": "https://api.github.com/users/lukiano/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/lukiano/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/lukiano/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/lukiano/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/lukiano/orgs",
|
||||
"repos_url": "https://api.github.com/users/lukiano/repos",
|
||||
"events_url": "https://api.github.com/users/lukiano/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/lukiano/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"created_at": "2015-08-18T11:59:43Z",
|
||||
"updated_at": "2015-08-18T11:59:43Z",
|
||||
"body": "I see, that one uses tools.jar to inject the agent itself by retrieving the jvm's process id. A solution I considered before, but discarded to avoid a dependency on the JDK"
|
||||
},
|
||||
{
|
||||
"url": "https://api.github.com/repos/spring-projects/spring-boot/issues/comments/155556639",
|
||||
"html_url": "https://github.com/spring-projects/spring-boot/issues/739#issuecomment-155556639",
|
||||
"issue_url": "https://api.github.com/repos/spring-projects/spring-boot/issues/739",
|
||||
"id": 155556639,
|
||||
"user": {
|
||||
"login": "laxika",
|
||||
"id": 1862574,
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/1862574?v=3",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/laxika",
|
||||
"html_url": "https://github.com/laxika",
|
||||
"followers_url": "https://api.github.com/users/laxika/followers",
|
||||
"following_url": "https://api.github.com/users/laxika/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/laxika/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/laxika/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/laxika/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/laxika/orgs",
|
||||
"repos_url": "https://api.github.com/users/laxika/repos",
|
||||
"events_url": "https://api.github.com/users/laxika/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/laxika/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"created_at": "2015-11-10T20:30:50Z",
|
||||
"updated_at": "2015-11-10T20:30:50Z",
|
||||
"body": "+1 it's really needed if possible"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,79 @@
|
||||
{
|
||||
"url": "https://api.github.com/repos/spring-projects/spring-boot/issues/4644",
|
||||
"labels_url": "https://api.github.com/repos/spring-projects/spring-boot/issues/4644/labels{/name}",
|
||||
"comments_url": "https://api.github.com/repos/spring-projects/spring-boot/issues/4644/comments",
|
||||
"events_url": "https://api.github.com/repos/spring-projects/spring-boot/issues/4644/events",
|
||||
"html_url": "https://github.com/spring-projects/spring-boot/issues/4644",
|
||||
"id": 119467644,
|
||||
"number": 4644,
|
||||
"title": "Upgrade to Spring Framework 4.2.4.RELEASE",
|
||||
"user": {
|
||||
"login": "wilkinsona",
|
||||
"id": 914682,
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/914682?v=3",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/wilkinsona",
|
||||
"html_url": "https://github.com/wilkinsona",
|
||||
"followers_url": "https://api.github.com/users/wilkinsona/followers",
|
||||
"following_url": "https://api.github.com/users/wilkinsona/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/wilkinsona/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/wilkinsona/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/wilkinsona/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/wilkinsona/orgs",
|
||||
"repos_url": "https://api.github.com/users/wilkinsona/repos",
|
||||
"events_url": "https://api.github.com/users/wilkinsona/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/wilkinsona/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"labels": [
|
||||
{
|
||||
"url": "https://api.github.com/repos/spring-projects/spring-boot/labels/test",
|
||||
"name": "test",
|
||||
"color": "e11d21"
|
||||
}
|
||||
],
|
||||
"state": "open",
|
||||
"locked": false,
|
||||
"assignee": null,
|
||||
"milestone": {
|
||||
"url": "https://api.github.com/repos/spring-projects/spring-boot/milestones/49",
|
||||
"html_url": "https://github.com/spring-projects/spring-boot/milestones/1.3.1",
|
||||
"labels_url": "https://api.github.com/repos/spring-projects/spring-boot/milestones/49/labels",
|
||||
"id": 1396509,
|
||||
"number": 49,
|
||||
"title": "1.3.1",
|
||||
"description": "",
|
||||
"creator": {
|
||||
"login": "philwebb",
|
||||
"id": 519772,
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/519772?v=3",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/philwebb",
|
||||
"html_url": "https://github.com/philwebb",
|
||||
"followers_url": "https://api.github.com/users/philwebb/followers",
|
||||
"following_url": "https://api.github.com/users/philwebb/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/philwebb/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/philwebb/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/philwebb/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/philwebb/orgs",
|
||||
"repos_url": "https://api.github.com/users/philwebb/repos",
|
||||
"events_url": "https://api.github.com/users/philwebb/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/philwebb/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"open_issues": 41,
|
||||
"closed_issues": 31,
|
||||
"state": "open",
|
||||
"created_at": "2015-11-05T22:07:18Z",
|
||||
"updated_at": "2015-11-30T10:51:50Z",
|
||||
"due_on": "2015-12-16T00:00:00Z",
|
||||
"closed_at": null
|
||||
},
|
||||
"comments": 0,
|
||||
"created_at": "2015-11-30T10:51:50Z",
|
||||
"updated_at": "2015-11-30T10:52:18Z",
|
||||
"closed_at": null,
|
||||
"body": ""
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
{
|
||||
"url": "https://api.github.com/repos/spring-projects/spring-boot/issues/4644",
|
||||
"labels_url": "https://api.github.com/repos/spring-projects/spring-boot/issues/4644/labels{/name}",
|
||||
"comments_url": "https://api.github.com/repos/spring-projects/spring-boot/issues/4644/comments",
|
||||
"events_url": "https://api.github.com/repos/spring-projects/spring-boot/issues/4644/events",
|
||||
"html_url": "https://github.com/spring-projects/spring-boot/issues/4644",
|
||||
"id": 119467644,
|
||||
"number": 4644,
|
||||
"title": "Upgrade to Spring Framework 4.2.4.RELEASE",
|
||||
"user": {
|
||||
"login": "wilkinsona",
|
||||
"id": 914682,
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/914682?v=3",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/wilkinsona",
|
||||
"html_url": "https://github.com/wilkinsona",
|
||||
"followers_url": "https://api.github.com/users/wilkinsona/followers",
|
||||
"following_url": "https://api.github.com/users/wilkinsona/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/wilkinsona/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/wilkinsona/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/wilkinsona/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/wilkinsona/orgs",
|
||||
"repos_url": "https://api.github.com/users/wilkinsona/repos",
|
||||
"events_url": "https://api.github.com/users/wilkinsona/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/wilkinsona/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"labels": [
|
||||
{
|
||||
"url": "https://api.github.com/repos/spring-projects/spring-boot/labels/existing",
|
||||
"name": "existing",
|
||||
"color": "e11d21"
|
||||
},
|
||||
{
|
||||
"url": "https://api.github.com/repos/spring-projects/spring-boot/labels/test",
|
||||
"name": "test",
|
||||
"color": "e11d21"
|
||||
}
|
||||
],
|
||||
"state": "open",
|
||||
"locked": false,
|
||||
"assignee": null,
|
||||
"milestone": {
|
||||
"url": "https://api.github.com/repos/spring-projects/spring-boot/milestones/49",
|
||||
"html_url": "https://github.com/spring-projects/spring-boot/milestones/1.3.1",
|
||||
"labels_url": "https://api.github.com/repos/spring-projects/spring-boot/milestones/49/labels",
|
||||
"id": 1396509,
|
||||
"number": 49,
|
||||
"title": "1.3.1",
|
||||
"description": "",
|
||||
"creator": {
|
||||
"login": "philwebb",
|
||||
"id": 519772,
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/519772?v=3",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/philwebb",
|
||||
"html_url": "https://github.com/philwebb",
|
||||
"followers_url": "https://api.github.com/users/philwebb/followers",
|
||||
"following_url": "https://api.github.com/users/philwebb/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/philwebb/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/philwebb/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/philwebb/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/philwebb/orgs",
|
||||
"repos_url": "https://api.github.com/users/philwebb/repos",
|
||||
"events_url": "https://api.github.com/users/philwebb/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/philwebb/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false
|
||||
},
|
||||
"open_issues": 41,
|
||||
"closed_issues": 31,
|
||||
"state": "open",
|
||||
"created_at": "2015-11-05T22:07:18Z",
|
||||
"updated_at": "2015-11-30T10:51:50Z",
|
||||
"due_on": "2015-12-16T00:00:00Z",
|
||||
"closed_at": null
|
||||
},
|
||||
"comments": 0,
|
||||
"created_at": "2015-11-30T10:51:50Z",
|
||||
"updated_at": "2015-11-30T10:52:18Z",
|
||||
"closed_at": null,
|
||||
"body": ""
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user