Commit Graph

36 Commits

Author SHA1 Message Date
Emanuele Stoppa
e21423b3d8
fix: find-comment version (#164) 2023-04-06 00:15:43 +09:00
Peter Evans
3383acd359
v3 (#161)
* typescript

* fix reactions input

* test comma separated

* bump version

* append-separator

* refactor

* refactor reactions

* get reactions

* handle default token

* return reaction id

* remove reactions

* reactions-edit-mode

* readme

* test-command

* fix step order

* deprecate body-file

* update ci to body-path
2023-04-05 16:14:13 +09:00
Kurt von Laven
7b468d20c2
Update some links in the README
The URL of a number of GitHub Docs was changed upstream.
2023-02-27 03:20:56 -08:00
Peter Evans
40bf395e0a Minor refactor and tests for body-file input 2022-10-24 15:38:52 +09:00
Umang Galaiya
1fdf65a50f Update README 2022-06-01 23:43:03 +05:30
Peter Evans
704bc87a2d Update readme 2022-03-22 16:43:29 +09:00
Peter Evans
862a968b68 Update runtime to node 16 2022-03-22 14:58:13 +09:00
Markus Podar
6484e4d98f
Use double quotes to preserve adjacent spaces correctly
I used this action as part of a workflow to add code formatted blocks.
Using the guide in the readme I, adjacent spaces where not correctly
preserved, i.e. the following
```
      - name: yolo
        id: get-comment-body
        run: |
          echo "\`\`\`" > tmp/comment.md
          echo "+--------------+" >> tmp/comment.md
          echo "|This is a test|" >> tmp/comment.md
          echo "+--------------+" >> tmp/comment.md
          echo "|     yolo     |" >> tmp/comment.md
          echo "+--------------+" >> tmp/comment.md
          echo "\`\`\`" >> tmp/comment.md

          cat tmp/comment.md

          # https://github.com/peter-evans/create-or-update-comment#setting-the-comment-body-from-a-file
          body="$(cat tmp/comment.md)"
          body="${body//'%'/'%25'}"
          body="${body//$'\n'/'%0A'}"
          body="${body//$'\r'/'%0D'}"
          echo ::set-output name=body::$body

      - name: Create or update comment
        uses: peter-evans/create-or-update-comment@v1
        with:
          body: ${{ steps.get-comment-body.outputs.body }}
          issue-number: ${{ github.event.pull_request.number }}
```
produced this
```
+--------------+
|This is a test|
+--------------+
| yolo |
+--------------+
```
Adding the double quotes around `set-output` fixed this:
```
+--------------+
|This is a test|
+--------------+
|     yolo     |
+--------------+
```
Further I added double quotes also around the initial `cat`, because of
this comment https://github.community/t/set-output-truncates-multiline-strings/16852/5
> Here are a few observation. First, it is important to suppress word-splitting upon expansion in bash. This is easiest done by enclosing with double quotes:
2021-10-26 23:09:52 +02:00
Peter Evans
a481189ebf Update readme 2021-05-22 09:13:55 +09:00
Peter Evans
2a57ba60e3 Update readme 2021-05-13 10:19:27 +09:00
Peter Evans
bc6652c441 Add note to see readme for a particular error 2021-04-10 15:39:56 +09:00
Peter Evans
90e17f05b7 Update readme 2021-04-09 14:45:59 +09:00
Peter Evans
2435e87a9c Update readme 2021-02-16 10:37:28 +09:00
Peter Evans
42d0000ec4 Update readme 2020-12-07 11:34:01 +09:00
DanielHabenicht
56603d7af0
Update README.md
Co-authored-by: Peter Evans <18365890+peter-evans@users.noreply.github.com>
2020-10-15 09:27:20 +02:00
DanielHabenicht
51c15391ae
Update README.md
Co-authored-by: Peter Evans <18365890+peter-evans@users.noreply.github.com>
2020-10-15 07:54:13 +02:00
DanielHabenicht
08f8c2cea3
Update README.md
remove previous example
2020-10-14 15:12:44 +02:00
DanielHabenicht
910158d07e
Update README.md
Add example for automatically updating a previously created comment.
2020-10-14 15:08:11 +02:00
Peter Evans
07044e08a9 Update readme 2020-08-04 15:52:06 +09:00
Lars Hvam
a797d011c7
README: fix get comment body example 2020-08-02 07:43:20 +02:00
Peter Evans
c60de30c46 Update readme 2020-07-31 10:19:36 +09:00
Peter Evans
229435c07f Update readme 2020-07-31 10:18:08 +09:00
Peter Evans
9470f7e873 Add sparkles emoji 2020-06-08 08:38:27 +09:00
Peter Evans
d7cb4f280b Update README 2020-05-17 14:47:42 +09:00
Peter Evans
946fe8fa2a Add ci badge 2020-05-05 14:33:10 +09:00
Peter Evans
44138f1f05 Update README 2020-04-29 12:04:46 +09:00
Peter Evans
5005703541 Deprecate reaction-type in favour of reactions 2020-04-17 16:31:30 +09:00
Peter Evans
bfe8b63d3c Add comment-id output 2020-04-09 16:03:32 +09:00
Peter Evans
e9eda88d56 Default token to github.token 2020-04-04 17:59:22 +09:00
Peter Evans
79d3c3c51f Update README 2019-12-02 17:37:16 +09:00
Peter Evans
0c6f574027 Update README 2019-12-02 11:11:59 +09:00
Peter Evans
72bb526881 Update description 2019-11-24 23:14:30 +09:00
Peter Evans
1fdbcbf1d5 Update README 2019-11-24 18:17:54 +09:00
Peter Evans
963f29af6f Update README 2019-11-24 17:55:58 +09:00
Peter Evans
03a4ec0930 Update README 2019-11-24 17:25:41 +09:00
Peter Evans
911d287d94
Initial commit 2019-11-24 16:35:05 +09:00