Skip to content

Commit d9ab2c9

Browse files
committed
Merge branch 'add/gutenberg-merge-commit-change-log-workflow' into trunk
2 parents 130bd60 + 027b9d0 commit d9ab2c9

3 files changed

Lines changed: 28 additions & 2 deletions

File tree

.github/workflows/detect-gutenberg-sha-change.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ jobs:
3737
if: ${{ needs.detect-hash-change.outputs.sha_changed == 'true' }}
3838
permissions:
3939
contents: read
40+
with:
41+
base-sha: ${{ needs.detect-hash-change.outputs.base_sha }}
42+
head-sha: ${{ needs.detect-hash-change.outputs.head_sha }}
4043

4144
# Drafts a commit message containing a detailed list of changes being merged.
4245
#

.github/workflows/reusable-detect-gutenberg-hash-change-v1.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ name: Detect hash change (reusable)
55

66
on:
77
workflow_call:
8+
outputs:
9+
sha_changed:
10+
description: 'Whether the pinned Gutenberg hash has changed.'
11+
value: ${{ jobs.detect-hash-change.outputs.sha_changed }}
12+
base_sha:
13+
description: 'The previous pinned Gutenberg hash.'
14+
value: ${{ jobs.detect-hash-change.outputs.base_sha }}
15+
head_sha:
16+
description: 'The new pinned Gutenberg hash.'
17+
value: ${{ jobs.detect-hash-change.outputs.head_sha }}
818

919
# Disable permissions for all available scopes by default.
1020
# Any needed permissions should be configured at the job level.

.github/workflows/reusable-generate-gutenberg-changelog-v1.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ name: Detect hash change (reusable)
55

66
on:
77
workflow_call:
8+
inputs:
9+
base-sha:
10+
description: 'The previous pinned Gutenberg hash.'
11+
type: string
12+
required: true
13+
head-sha:
14+
description: 'The new pinned Gutenberg hash.'
15+
type: string
16+
required: true
17+
outputs:
18+
has_changes:
19+
description: 'Whether any pull request-linked changes were found between the two hashes.'
20+
value: ${{ jobs.generate-changelog.outputs.has_changes }}
821

922
# Disable permissions for all available scopes by default.
1023
# Any needed permissions should be configured at the job level.
@@ -37,8 +50,8 @@ jobs:
3750
- name: Generate a list of changes
3851
id: change-list
3952
env:
40-
BASE_SHA: ${{ needs.detect-hash-change.outputs.base_sha }}
41-
HEAD_SHA: ${{ needs.detect-hash-change.outputs.head_sha }}
53+
BASE_SHA: ${{ inputs.base-sha }}
54+
HEAD_SHA: ${{ inputs.head-sha }}
4255
run: |
4356
git log --reverse --format="- %s" "$BASE_SHA".."$HEAD_SHA" | \
4457
sed 's|#\([0-9][0-9]*\)|https://github.com/WordPress/gutenberg/pull/\1|g; /github\.com\/WordPress\/gutenberg\/pull/!d' \

0 commit comments

Comments
 (0)