-
Notifications
You must be signed in to change notification settings - Fork 3
/
action.yml
40 lines (40 loc) · 1.31 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: "PR history in description"
description: "Add pull request commit history to description"
inputs:
fence:
description: Marker fences for commit history positions in pull request bodies
required: false
default: "=== GH HISTORY FENCE ==="
format:
description: git-log format
required: false
default: "### %H %s%n%n%b%n"
format_fence:
description: Marker fences for git-log format strings in pull request bodies
required: false
default: "=== GH HISTORY FORMAT FENCE ==="
gh_template:
description: Preprocess git-log format using gh Go template
required: false
default: "1"
debug:
description: Enable debugging mode
required: false
default: "0"
runs:
using: "composite"
steps:
- run: |
git checkout "$GITHUB_BASE_REF"
gh pr checkout "$GH_PH_PULL_REQUEST_ID"
printf 'y' | \
GH_PH_PAGER='cat' \
GH_PH_DEBUG='${{ inputs.debug }}' \
GH_PH_HISTORY_FENCE='${{ inputs.fence }}' \
GH_PH_HISTORY_FORMAT='${{ inputs.format }}' \
GH_PH_HISTORY_FORMAT_FENCE='${{ inputs.format_fence }}' \
GH_PH_HISTORY_FORMAT_GH_TEMPLATE='${{ inputs.gh_template }}' \
$GITHUB_ACTION_PATH/gh-ph
shell: bash
env:
GH_PH_PULL_REQUEST_ID: ${{ github.event.pull_request.number }}