-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
action.yml
52 lines (52 loc) · 1.63 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
41
42
43
44
45
46
47
48
49
50
51
52
name: "changelog-syncer"
description: "Send a pull request description to a Notion Database."
author: "Mergify"
inputs:
NOTION_API_TIMEOUT:
required: false
description: "Notion API timeout"
default: "10"
NOTION_API_KEY:
required: true
description: "Notion API key"
NOTION_DATABASE_ID:
required: true
description: "Notion Database ID"
NOTION_API_VERSION:
required: false
description: "Notion API version"
default: "2022-06-28"
PR_TITLE:
description: "Pull request title"
default: ${{ github.event.pull_request.title }}
PR_DESCRIPTION:
description: "Pull request description"
default: ${{ github.event.pull_request.body }}
PR_MERGED_AT:
description: "Pull request merge date (e.g. 2011-01-26T19:01:12Z)"
default: ${{ github.event.pull_request.merged_at }}
runs:
using: "composite"
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install poetry
shell: bash
run: pipx install poetry
- name: Install Python dependencies
working-directory: ${{ github.action_path }}
shell: bash
run: poetry install --only main --no-interaction
- name: Run action script
working-directory: ${{ github.action_path }}
shell: bash
run: poetry run gha_handler
env:
NOTION_API_TIMEOUT: ${{ inputs.NOTION_API_TIMEOUT }}
NOTION_API_KEY: ${{ inputs.NOTION_API_KEY }}
NOTION_DATABASE_ID: ${{ inputs.NOTION_DATABASE_ID }}
PR_TITLE: ${{ inputs.PR_TITLE }}
PR_DESCRIPTION: ${{ inputs.PR_DESCRIPTION }}
PR_MERGED_AT: ${{ inputs.PR_MERGED_AT }}