Skip to content

Commit dda5970

Browse files
committed
Update README
1 parent 4871d26 commit dda5970

File tree

6 files changed

+50
-5
lines changed

6 files changed

+50
-5
lines changed

README.md

Lines changed: 50 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
Labels as a Code!
2-
=================
1+
GitHub labels as a Code!
2+
========================
33

4-
![](demo.png)
4+
![](docs/demo.png)
55

66
CLI that sets GitHub labels exactly as written in YAML file
77

@@ -83,6 +83,7 @@ on:
8383
8484
jobs:
8585
sync:
86+
name: Run
8687
runs-on: ubuntu-latest
8788
steps:
8889
- name: Checkout
@@ -95,7 +96,51 @@ jobs:
9596

9697
</details>
9798

98-
<img src="ga-sync.png">
99+
<img src="docs/ga-sync.png">
100+
101+
If you want to make sure what changes to be applied in a pull request step, you can run github-labeler with dryrun option. By having [action-github-comment](https://github.com/b4b4r07/action-github-comment) step, you can also post the github-labeler result to the GitHub comment.
102+
103+
<details><summary><code>.github/workflows/sync_labels_dryrun.yml</code></summary>
104+
</br>
105+
106+
```yaml
107+
name: Sync labels
108+
109+
on: [pull_request]
110+
111+
jobs:
112+
sync:
113+
name: Dry run
114+
runs-on: ubuntu-latest
115+
steps:
116+
- name: Checkout
117+
uses: actions/checkout@v1
118+
- name: Sync labels with dryrun option
119+
uses: b4b4r07/github-labeler@master
120+
with:
121+
dryrun: 'true'
122+
env:
123+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
124+
id: labeler
125+
- name: Post github-labeler command result to GitHub comment
126+
uses: b4b4r07/action-github-comment@master
127+
if: steps.labeler.outputs.result
128+
with:
129+
body: |
130+
## github-labeler result
131+
```
132+
${{ steps.labeler.outputs.result }}
133+
```
134+
env:
135+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
136+
LOG: trace
137+
```
138+
139+
</details>
140+
141+
<img src="docs/ga-sync-dryrun.png">
142+
143+
<img src="docs/ga-sync-dryrun-result.png" width="400">
99144
100145
### YAML for workflows to import labels from existing one to defined one
101146
@@ -144,7 +189,7 @@ jobs:
144189
145190
</details>
146191
147-
<img src="ga-import.png" width="400">
192+
<img src="docs/ga-import.png" width="400">
148193
149194
## Installation
150195
File renamed without changes.
File renamed without changes.

docs/ga-sync-dryrun-result.png

240 KB
Loading

docs/ga-sync-dryrun.png

384 KB
Loading
File renamed without changes.

0 commit comments

Comments
 (0)