Skip to content

Commit ea13843

Browse files
committed
Refactor
1 parent e05be8e commit ea13843

File tree

4 files changed

+35
-23
lines changed

4 files changed

+35
-23
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Similar to check-release-notes.yml, but verifies that check-release-notes-reusable.yml itself.
2+
# Runs not against rules/scripts in the main branch but against the PR branch
3+
4+
name: Check "check-release-notes-reusable.yml" workflow
5+
on:
6+
pull_request:
7+
types: [opened, edited, synchronize]
8+
paths:
9+
- '.github/workflows/check-release-notes-reusable.yml'
10+
- '.github/workflows/check-release-notes-reusable-check.yml'
11+
- 'tools'
12+
13+
jobs:
14+
check:
15+
uses: .github/workflows/check-release-notes-reusable.yml
16+
with:
17+
checkout_ref: '$GITHUB_REF'

.github/workflows/reusable-check-release-notes.yml renamed to .github/workflows/check-release-notes-reusable.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
# Reusable GitHub action needed to check Release Notes in the PR description. Used by multiple Compose repositories.
22
#
3-
# Runs from master branch by default, to apply the latest Release Notes rules.
4-
#
5-
# Usually dependent worflows run on each desription change:
6-
# on:
7-
# pull_request:
8-
# types: [opened, edited, synchronize]
9-
#
10-
# opened - when PR is opened
11-
# edited - whe the title/description are changed
12-
# synchronize - when new commits appeared. We don't actually use the new content, but we still need to mark this commit Green in GitHub UI
3+
# Runs from master branch by default to apply the latest Release Notes rules.
134

145
name: Check Release Notes in the description
156
on:
@@ -32,6 +23,4 @@ jobs:
3223
shell: bash
3324
run: |
3425
cd tools
35-
# https://github.com/actions/checkout/issues/58#issuecomment-2264361099
36-
PR_NUMBER=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; /^refs\/pull/ { print $3 }')
37-
kotlin changelog.main.kts action=checkPr ${{ github.repository }} $PR_NUMBER token=""
26+
kotlin changelog.main.kts action=checkPr ${{ github.repository }} ${{ github.event.number }} token=""

.github/workflows/check-release-notes-with-rules-in-main.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Checks Release Notes in the PR description, runs with rules from the main branch, when:
2+
# opened - PR is opened
3+
# edited - The title/description are changed
4+
# synchronize - New commits appeared.
5+
# We don't use the new content, but we still need to mark this commit Green in GitHub UI
6+
7+
name: Check Release Notes in the description
8+
on:
9+
pull_request:
10+
types: [opened, edited, synchronize]
11+
12+
jobs:
13+
check:
14+
uses: JetBrains/compose-multiplatform/.github/workflows/check-release-notes-reusable.yml@igordmn-patch-7
15+
with:
16+
checkout_ref: 'igordmn-patch-7'

0 commit comments

Comments
 (0)