|
| 1 | +name: receive-pr |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + types: [opened, synchronize] |
| 6 | + branches: |
| 7 | + - main |
| 8 | + |
| 9 | +concurrency: |
| 10 | + group: '${{ github.workflow }} @ ${{ github.ref }}' |
| 11 | + cancel-in-progress: true |
| 12 | + |
| 13 | +# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ |
| 14 | +# Since this pull request receives untrusted code, we should **NOT** have any secrets in the environment. |
| 15 | +jobs: |
| 16 | + upload-patch: |
| 17 | + uses: openrewrite/gh-automation/.github/workflows/receive-pr.yml@main |
| 18 | + with: |
| 19 | + recipe: 'org.openrewrite.recipes.OpenRewriteBestPracticesSubset' |
| 20 | + rewrite_yml: | |
| 21 | + --- |
| 22 | + type: specs.openrewrite.org/v1beta/recipe |
| 23 | + name: org.openrewrite.recipes.OpenRewriteBestPracticesSubset |
| 24 | + displayName: OpenRewrite best practices |
| 25 | + description: Best practices for OpenRewrite recipe development. |
| 26 | + recipeList: |
| 27 | + - org.openrewrite.recipes.JavaRecipeBestPracticesSubset |
| 28 | + - org.openrewrite.recipes.RecipeTestingBestPracticesSubset |
| 29 | + - org.openrewrite.recipes.RecipeNullabilityBestPractices |
| 30 | + #- org.openrewrite.java.OrderImports |
| 31 | + - org.openrewrite.java.format.EmptyNewlineAtEndOfFile |
| 32 | + - org.openrewrite.staticanalysis.InlineVariable |
| 33 | + - org.openrewrite.staticanalysis.MissingOverrideAnnotation |
| 34 | + - org.openrewrite.staticanalysis.UseDiamondOperator |
| 35 | + --- |
| 36 | + type: specs.openrewrite.org/v1beta/recipe |
| 37 | + name: org.openrewrite.recipes.JavaRecipeBestPracticesSubset |
| 38 | + displayName: Java Recipe best practices |
| 39 | + description: Best practices for Java recipe development. |
| 40 | + preconditions: |
| 41 | + - org.openrewrite.java.search.FindTypes: |
| 42 | + fullyQualifiedTypeName: org.openrewrite.Recipe |
| 43 | + checkAssignability: true |
| 44 | + recipeList: |
| 45 | + - org.openrewrite.java.recipes.ExecutionContextParameterName |
| 46 | + - org.openrewrite.java.recipes.MissingOptionExample |
| 47 | + - org.openrewrite.java.recipes.RecipeEqualsAndHashCodeCallSuper |
| 48 | + - org.openrewrite.java.recipes.UseTreeRandomId |
| 49 | + - org.openrewrite.staticanalysis.NeedBraces |
| 50 | + #- org.openrewrite.staticanalysis.RemoveSystemOutPrintln |
| 51 | + --- |
| 52 | + type: specs.openrewrite.org/v1beta/recipe |
| 53 | + name: org.openrewrite.recipes.RecipeTestingBestPracticesSubset |
| 54 | + displayName: Recipe testing best practices |
| 55 | + description: Best practices for testing recipes. |
| 56 | + preconditions: |
| 57 | + - org.openrewrite.java.search.FindTypes: |
| 58 | + fullyQualifiedTypeName: org.openrewrite.test.RewriteTest |
| 59 | + checkAssignability: true |
| 60 | + recipeList: |
| 61 | + - org.openrewrite.java.recipes.RewriteTestClassesShouldNotBePublic |
| 62 | + #- org.openrewrite.java.recipes.SelectRecipeExamples |
| 63 | + - org.openrewrite.java.recipes.SourceSpecTextBlockIndentation |
| 64 | + - org.openrewrite.java.testing.cleanup.RemoveTestPrefix |
| 65 | + - org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic |
| 66 | + - org.openrewrite.staticanalysis.NeedBraces |
| 67 | + - org.openrewrite.staticanalysis.RemoveSystemOutPrintln |
0 commit comments