-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (56 loc) · 2.13 KB
/
rulicka-bot.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
name: 🧻 Rulička bot
on:
workflow_dispatch:
inputs:
filename:
description: 'Filename (without extension)'
required: true
default: ''
content:
description: 'Content (JSON data)'
required: true
default: ''
title:
description: 'Business name'
required: true
default: ''
jobs:
create_json:
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v3
- name: Create a json file
run: |
cd _toilets
echo '${{ github.event.inputs.content }}' > ${{ github.event.inputs.filename }}.json
cat ${{ github.event.inputs.filename }}.json
- name: Create a pull request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.PAT }}
commit-message: Add ${{ github.event.inputs.filename }}.json toilet
committer: Rulicka [Bot] <[email protected]>
author: Rulica <[email protected]>
signoff: false
branch: new-toilet-${{ github.event.inputs.filename }}
delete-branch: true
title: 'A new toilet request: ${{ github.event.inputs.title }}'
body: |
| KEY | VALUE |
| ------ | ---------- |
| placeName | **${{ fromJSON(github.event.inputs.content).placeName }}** |
| coords | `${{ fromJSON(github.event.inputs.content).latitude }}` `${{ fromJSON(github.event.inputs.content).longtitude }}` |
| wayDescription | ${{ fromJSON(github.event.inputs.content).wayDescription }} |
| toiletType | ${{ fromJSON(github.event.inputs.content).toiletType }} |
| comment | ${{ fromJSON(github.event.inputs.content).comment }} |
| nickName | ${{ fromJSON(github.event.inputs.content).nickName }} |
| timeStamp | ${{ fromJSON(github.event.inputs.content).timeStamp }} |
Filename: ${{ github.event.inputs.filename }}.json
```json
${{ toJSON(fromJSON(github.event.inputs.content)) }}
```
labels: |
toilet
reviewers: petrkucerak
draft: false