Skip to content

Commit a611643

Browse files
authored
Merge pull request #6 from grails-plugins/feedback
Initial Project Feedback
2 parents 49c3cc1 + 362a6f3 commit a611643

82 files changed

Lines changed: 1974 additions & 1402 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ body:
4141
id: actual
4242
attributes:
4343
label: Actual Behavior
44-
description: What actually happened? Include the Server-Timing header value if relevant.
44+
description: What actually happened? Include the `Server-Timing` header value if relevant.
4545
validations:
4646
required: true
4747

.github/SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ using [GitHub's private vulnerability reporting](https://github.com/grails-plugi
2222

2323
## Security Considerations
2424

25-
This plugin injects `Server-Timing` headers that expose server-side timing information. By default, the plugin is *
25+
This plugin injects `Server-Timing` header that expose server-side timing information. By default, the plugin is *
2626
*disabled in production** to mitigate the risk
2727
of [timing attacks](https://w3c.github.io/server-timing/#security-considerations).
2828

2929
If you enable the plugin in production, be aware that:
3030

3131
- Timing data may help attackers infer information about server-side operations (e.g., whether a database lookup found a
3232
record)
33-
- Cross-origin access to `Server-Timing` data requires the `Timing-Allow-Origin` header, which this plugin does **not**
33+
- Cross-origin access to Server Timing data requires the `Timing-Allow-Origin` header, which this plugin does **not**
3434
set automatically
3535

3636
See the [W3C Server Timing Security Considerations](https://w3c.github.io/server-timing/#security-considerations) for

.github/dependabot.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: 2
22
updates:
3-
# Gradle dependencies (root + all subprojects)
3+
# Gradle dependencies and wrapper
44
- package-ecosystem: "gradle"
55
directory: "/"
66
schedule:
@@ -13,15 +13,8 @@ updates:
1313
gradle-dependencies:
1414
patterns:
1515
- "*"
16-
17-
# Gradle wrapper
18-
- package-ecosystem: "gradle"
19-
directory: "/gradle/wrapper"
20-
schedule:
21-
interval: "weekly"
22-
day: "monday"
23-
labels:
24-
- "deps"
16+
exclude-patterns:
17+
- "gradle"
2518
ignore:
2619
- dependency-name: "gradle"
2720
versions: [ ">= 9" ]

.github/workflows/ci.yml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
- 'main'
77
pull_request:
88
workflow_dispatch:
9+
env:
10+
JAVA_DISTRIBUTION: 'liberica'
911
concurrency:
1012
group: ${{ github.workflow }}-${{ github.ref }}
1113
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
@@ -28,12 +30,18 @@ jobs:
2830
- name: "☕️ Setup JDK"
2931
uses: actions/setup-java@v5
3032
with:
31-
distribution: liberica
33+
distribution: ${{ env.JAVA_DISTRIBUTION }}
3234
java-version: ${{ env.SDKMANRC_java }}
3335
- name: 'Ensure Common Build Date' # to ensure a reproducible build
3436
run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> "$GITHUB_ENV"
37+
- name: "Export gradle.properties properties"
38+
uses: apache/grails-github-actions/export-gradle-properties@asf
3539
- name: "🐘 Setup Gradle"
3640
uses: gradle/actions/setup-gradle@v5
41+
with:
42+
build-scan-publish: ${{ env.ciBuildScanPublish }}
43+
build-scan-terms-of-use-url: ${{ env.ciBuildScanTermsOfUseUrl }}
44+
build-scan-terms-of-use-agree: ${{ env.ciBuildScanTermsOfUseAgree }}
3745
- name: "🔨 Build project without tests"
3846
if: ${{ contains(github.event.head_commit.message, '[skip tests]') }}
3947
run: >
@@ -51,9 +59,10 @@ jobs:
5159
--rerun-tasks
5260
-PskipCodeStyle
5361
publish:
54-
# only run the publish task on this repo instead of forks
62+
# only run the publishing task on this repo (not on forks)
5563
if: github.repository_owner == 'grails-plugins' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
56-
needs: [ build ]
64+
needs: build
65+
name: "Publish Snapshot"
5766
runs-on: ubuntu-24.04
5867
steps:
5968
- name: "Output Agent IP" # in the event your agent has network issues, you can use this to debug
@@ -70,28 +79,31 @@ jobs:
7079
- name: "☕️ Setup JDK"
7180
uses: actions/setup-java@v5
7281
with:
73-
distribution: liberica
82+
distribution: ${{ env.JAVA_DISTRIBUTION }}
7483
java-version: ${{ env.SDKMANRC_java }}
7584
- name: 'Ensure Common Build Date' # to ensure a reproducible build
7685
run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> "$GITHUB_ENV"
86+
- name: "Export gradle.properties properties"
87+
uses: apache/grails-github-actions/export-gradle-properties@asf
7788
- name: "🐘 Setup Gradle"
7889
uses: gradle/actions/setup-gradle@v5
90+
with:
91+
build-scan-publish: ${{ env.ciBuildScanPublish }}
92+
build-scan-terms-of-use-url: ${{ env.ciBuildScanTermsOfUseUrl }}
93+
build-scan-terms-of-use-agree: ${{ env.ciBuildScanTermsOfUseAgree }}
7994
- name: "📤 Publish Gradle Snapshot Artifacts"
8095
env:
8196
GRAILS_PUBLISH_RELEASE: 'false'
8297
MAVEN_PUBLISH_URL: 'https://central.sonatype.com/repository/maven-snapshots/'
8398
MAVEN_PUBLISH_USERNAME: ${{ secrets.NEXUS_PUBLISH_USERNAME }}
8499
MAVEN_PUBLISH_PASSWORD: ${{ secrets.NEXUS_PUBLISH_PASSWORD }}
85-
working-directory: './plugin'
86100
run: >
87101
../gradlew publish
88102
--no-build-cache
89103
--rerun-tasks
90104
- name: "📜 Generate Documentation"
91-
if: success()
92105
run: ./gradlew docs
93106
- name: "🚀 Publish to Github Pages"
94-
if: success()
95107
uses: apache/grails-github-actions/deploy-github-pages@asf
96108
env:
97109
GRADLE_PUBLISH_RELEASE: 'false'
Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Coverage"
1+
name: "Code Coverage"
22
on:
33
push:
44
branches:
@@ -28,20 +28,26 @@ jobs:
2828
with:
2929
distribution: liberica
3030
java-version: ${{ env.SDKMANRC_java }}
31+
- name: "Export gradle.properties properties"
32+
uses: apache/grails-github-actions/export-gradle-properties@asf
3133
- name: "🐘 Setup Gradle"
3234
uses: gradle/actions/setup-gradle@v5
35+
with:
36+
build-scan-publish: ${{ env.ciBuildScanPublish }}
37+
build-scan-terms-of-use-url: ${{ env.ciBuildScanTermsOfUseUrl }}
38+
build-scan-terms-of-use-agree: ${{ env.ciBuildScanTermsOfUseAgree }}
3339
- name: "🔨 Build and run tests"
3440
run: >
3541
./gradlew build
3642
--continue
3743
--stacktrace
3844
-PskipCodeStyle
39-
- name: "📊 Post coverage summary"
45+
- name: "📊 Post code coverage summary"
4046
if: always()
4147
run: |
42-
REPORT="coverage/build/reports/jacoco/jacocoAggregatedReport/jacocoAggregatedReport.xml"
48+
REPORT="code-coverage/build/reports/jacoco/jacocoAggregatedReport/jacocoAggregatedReport.xml"
4349
if [ ! -f "$REPORT" ]; then
44-
echo "::warning::Coverage report not found at $REPORT"
50+
echo "::warning::Code Coverage report not found at $REPORT"
4551
exit 0
4652
fi
4753

.github/workflows/code-style.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,14 @@ jobs:
2828
with:
2929
distribution: liberica
3030
java-version: ${{ env.SDKMANRC_java }}
31+
- name: "Export gradle.properties properties"
32+
uses: apache/grails-github-actions/export-gradle-properties@asf
3133
- name: "🐘 Setup Gradle"
3234
uses: gradle/actions/setup-gradle@v5
35+
with:
36+
build-scan-publish: ${{ env.ciBuildScanPublish }}
37+
build-scan-terms-of-use-url: ${{ env.ciBuildScanTermsOfUseUrl }}
38+
build-scan-terms-of-use-agree: ${{ env.ciBuildScanTermsOfUseAgree }}
3339
- name: "🎨 Run code style checks"
3440
run: >
3541
./gradlew codeStyle

.github/workflows/release-notes.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
permissions:
1919
contents: write # write permission is required to create a github release
2020
pull-requests: write # write permission is required for auto-labeler
21-
runs-on: ubuntu-latest
21+
runs-on: ubuntu-24.04
2222
steps:
2323
- name: "📝 Update Release Draft"
2424
uses: release-drafter/release-drafter@v6

.github/workflows/release.yml

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ on:
44
types: [ published ]
55
permissions: { }
66
env:
7-
# to prevent throttling of the github api, include the github token in an environment variable since the build will check for it
7+
# To prevent throttling of the GitHub api,
8+
# include the GitHub token in an environment variable
9+
# since the build will check for it
810
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
911
GRAILS_PUBLISH_RELEASE: 'true'
1012
JAVA_DISTRIBUTION: 'liberica'
@@ -19,7 +21,7 @@ jobs:
1921
name: "Stage Jar Files"
2022
permissions:
2123
packages: read # pre-release workflow
22-
contents: write # to create release
24+
contents: write # to create a release
2325
issues: write # to modify milestones
2426
runs-on: ubuntu-24.04
2527
steps:
@@ -53,8 +55,14 @@ jobs:
5355
with:
5456
distribution: ${{ env.JAVA_DISTRIBUTION }}
5557
java-version: ${{ env.SDKMANRC_java }}
58+
- name: "Export gradle.properties properties"
59+
uses: apache/grails-github-actions/export-gradle-properties@asf
5660
- name: "🐘 Setup Gradle"
5761
uses: gradle/actions/setup-gradle@v5
62+
with:
63+
build-scan-publish: ${{ env.ciBuildScanPublish }}
64+
build-scan-terms-of-use-url: ${{ env.ciBuildScanTermsOfUseUrl }}
65+
build-scan-terms-of-use-agree: ${{ env.ciBuildScanTermsOfUseAgree }}
5866
- name: "⚙️ Run pre-release"
5967
uses: apache/grails-github-actions/pre-release@asf
6068
env:
@@ -71,7 +79,6 @@ jobs:
7179
./gradlew
7280
-Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg
7381
publishMavenPublicationToSonatypeRepository
74-
publishPluginMavenPublicationToSonatypeRepository
7582
closeSonatypeStagingRepository
7683
- name: "Generate Build Date file"
7784
run: echo "$SOURCE_DATE_EPOCH" >> build/BUILD_DATE.txt
@@ -85,7 +92,7 @@ jobs:
8592
name: "Make Release Files Available"
8693
environment: release # this step will be delayed until approved
8794
needs: [ publish ]
88-
runs-on: ubuntu-latest
95+
runs-on: ubuntu-24.04
8996
permissions:
9097
contents: read
9198
steps:
@@ -108,8 +115,14 @@ jobs:
108115
with:
109116
distribution: ${{ env.JAVA_DISTRIBUTION }}
110117
java-version: ${{ env.SDKMANRC_java }}
118+
- name: "Export gradle.properties properties"
119+
uses: apache/grails-github-actions/export-gradle-properties@asf
111120
- name: "🐘 Setup Gradle"
112121
uses: gradle/actions/setup-gradle@v5
122+
with:
123+
build-scan-publish: ${{ env.ciBuildScanPublish }}
124+
build-scan-terms-of-use-url: ${{ env.ciBuildScanTermsOfUseUrl }}
125+
build-scan-terms-of-use-agree: ${{ env.ciBuildScanTermsOfUseAgree }}
113126
- name: "📤 Release staging repository"
114127
env:
115128
NEXUS_PUBLISH_USERNAME: ${{ secrets.MAVEN_USERNAME }}
@@ -124,7 +137,7 @@ jobs:
124137
environment: docs # this step will be delayed until approved
125138
name: "Publish Documentation"
126139
needs: [ publish, release ]
127-
runs-on: ubuntu-latest
140+
runs-on: ubuntu-24.04
128141
permissions:
129142
contents: write # required to publish documentation to github pages branches
130143
steps:
@@ -147,8 +160,14 @@ jobs:
147160
with:
148161
distribution: ${{ env.JAVA_DISTRIBUTION }}
149162
java-version: ${{ env.SDKMANRC_java }}
163+
- name: "Export gradle.properties properties"
164+
uses: apache/grails-github-actions/export-gradle-properties@asf
150165
- name: "🐘 Setup Gradle"
151166
uses: gradle/actions/setup-gradle@v5
167+
with:
168+
build-scan-publish: ${{ env.ciBuildScanPublish }}
169+
build-scan-terms-of-use-url: ${{ env.ciBuildScanTermsOfUseUrl }}
170+
build-scan-terms-of-use-agree: ${{ env.ciBuildScanTermsOfUseAgree }}
152171
- name: "🔨 Build Documentation"
153172
run: ./gradlew docs
154173
- name: "🚀 Publish to Github Pages"
@@ -162,32 +181,11 @@ jobs:
162181
name: "To Next Version"
163182
environment: close # this step will be delayed until approved
164183
needs: [ publish, docs, release ]
165-
runs-on: ubuntu-latest
184+
runs-on: ubuntu-24.04
166185
permissions:
167186
contents: write # required for gradle.properties revert
168187
issues: write # required for milestone closing
169188
pull-requests: write # to create the PR that will increment the version
170189
steps:
171-
- name: "📝 Establish release version"
172-
run: echo "VERSION=${TAG#v}" >> "$GITHUB_ENV"
173-
- name: "📥 Checkout repository"
174-
uses: actions/checkout@v6
175-
with:
176-
token: ${{ secrets.GITHUB_TOKEN }}
177-
ref: ${{ env.TAG }}
178-
- name: "Export .sdkmanrc properties"
179-
uses: apache/grails-github-actions/export-gradle-properties@asf
180-
with:
181-
file: ".sdkmanrc"
182-
prefix: "SDKMANRC_"
183-
- name: "Determine Java Version"
184-
run: echo "SDKMANRC_java=${{ env.SDKMANRC_java }}" | sed 's/-.*//' >> $GITHUB_ENV
185-
- name: "☕️ Setup JDK"
186-
uses: actions/setup-java@v5
187-
with:
188-
distribution: ${{ env.JAVA_DISTRIBUTION }}
189-
java-version: ${{ env.SDKMANRC_java }}
190-
- name: "🐘 Setup Gradle"
191-
uses: gradle/actions/setup-gradle@v5
192190
- name: "⚙️ Run post-release"
193191
uses: apache/grails-github-actions/post-release@asf

0 commit comments

Comments
 (0)