-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
93 lines (93 loc) · 3.52 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: 'Simple Net Experience'
author: Neelix.IO
branding:
icon: message-square
color: white
description: >
'Action for generating Neelix experiences from merged PR reviews with net '
'weight of keyword occurrences.'
inputs:
api-token:
description: 'Neelix API token (should be stored as secret)'
required: true
consortium-id:
description: 'ID of consortium that created experiences will belong to'
required: true
experience-summary:
description: 'Message to appear above table in experience commentary'
required: true
keywords:
description: >
'Keywords and weights to use in calculating weight for Neelix experiences '
'provided as a JSON string.'
required: true
activity-id:
description: >
'ID of an activity belonging to same consortium as experience.'
'Sets `activity_id` field of new experience. '
category-ids:
description: >
'IDs of categoris belonging to same consortium as experience. Use '
'comma-separated list for multiple values (e.g. "1,2,3"). Adds '
'specified categories to new experience. '
team-ids:
description: >
'IDs of teams belonging to same consortium as experience. Use '
'comma-separated list for multiple values (e.g. "1,2,3"). Adds specified '
'teams to new experience. '
table-header-keyword:
description: 'Name used for "keyword" column. Default: "keyword"'
table-header-weight:
description: 'Name used for "weight" column. Default: "weight"'
table-header-count:
description: 'Name used for "count" column. Default: "count"'
table-header-total-impact:
description: 'Name used for "total impact" column. Default: "total impact"'
github-token:
description: >
'GitHub token used to authenticate against GitHub API to retrieve PR '
'review data.'
default: ${{ github.token }}
skip-setup:
description: 'Skips checkout. Used for testing only.'
required: false
default: 'false'
runs:
using: composite
steps:
- name: Setup
if: ${{ inputs.skip-setup != 'true' }}
uses: actions/checkout@v3
with:
repository: neelix-io/simple-net-experience-action
ref: v1.0.0
- name: Get PR review data
id: get-review-data
uses: ./.github/actions/get-review-data
with:
pr-number: ${{ github.event.number }}
github-token: ${{ inputs.github-token }}
- name: Process review data
id: process-reviews
uses: ./.github/actions/process-reviews
with:
experience-summary: ${{ inputs.experience-summary }}
keywords: ${{ inputs.keywords }}
review-data: ${{ steps.get-review-data.outputs.data }}
table-header-keyword: ${{ inputs.table-header-keyword }}
table-header-weight: ${{ inputs.table-header-weight }}
table-header-count: ${{ inputs.table-header-count }}
table-header-total-impact: ${{ inputs.table-header-total-impact }}
- name: Send request
id: send-request
if: ${{ steps.process-reviews.outputs.no-match != 'true' }}
uses: neelix-io/create-experience-action@v1.0.0
with:
api-token: ${{ inputs.api-token }}
consortium-id: ${{ inputs.consortium-id }}
commentary: ${{ steps.process-reviews.outputs.commentary }}
weight: ${{ steps.process-reviews.outputs.weight }}
activity-id: ${{ inputs.activity-id }}
category-ids: ${{ inputs.category-ids }}
team-ids: ${{ inputs.team-ids }}
external-ref: "https://github.com/${{ github.repository }}/pull/${{ github.event.number }}"