Commit graph

62 commits

Author SHA1 Message Date
Aaron Klaassen 5d3a6044d6 Big ol' overdue refactor. 2021-12-30 17:26:25 -06:00
Aaron Klaassen 481c213a70
Merge pull request #45 from baldoalessandro/patch-1
Fix sample workflow with actual versione tag
2021-10-19 15:36:56 -05:00
Baldo Alessandro 2f2087d594
Fix sample workflow with actual versione tag
The sample provided in the README reported a version number that didn't match any tag in the repo and resulted in:
```bash
Error: Unable to resolve action `unsplash/comment-on-pr@1.3.0`, unable to find version `1.3.0`
```
2021-10-16 00:21:43 +02:00
Aaron Klaassen 41118363ba
Merge pull request #44 from jeffreyguenther/jeff/fix-conditional-args
Fix pattern based options
2021-10-15 16:15:44 -05:00
Jeffrey Guenther 9aac0ab874 Skip retrieving comments if unused
Let's skip retrieving the list of issue comments if none of the options
requiring them will be used.

This restores a previous optimization that was removed.
2021-10-01 17:21:35 -07:00
Jeffrey Guenther aec5cbe272 Use consistent creation of regex
Let's use the same approach for matching the regex to make this file
easier future changes.

This approach uses ruby regex string interpolation, where you can turn a
string into a regex with interpolating it into a regex expression.
2021-10-01 17:17:25 -07:00
Jeffrey Guenther eab3a30f7b Update input descriptions
We want to make thse messages consistent and read in the positive.
"not empty" is harder to understand than "provided".

Also, let's match the description formats.
2021-10-01 17:15:59 -07:00
Jeffrey Guenther d728af3ba7 Check for empty strings rather than falsey values
In Ruby, an empty string is truthy. As a result, passed a value of "" or
"nil", these branches of the code will run.

As a result, we need to change the default values of the input to `""`
and check if the passed value is an empty string.

No parsing is done to the values passed in as args so these are just
strings. `"nil"` doesn't become `nil` and is truthy.
2021-10-01 17:15:19 -07:00
Jeffrey Guenther 8c517e3fa6 Make default regex default values empty strings
We use a YAML nil `~` to provide a default of empty string.
2021-10-01 17:02:27 -07:00
Aaron Klaassen ffe8f97ccc Update README. 2021-10-01 15:08:55 -05:00
Aaron Klaassen 7165e6dee7
Merge pull request #42 from unsplash/fix-nil-coms
Fix possibility of nil comments; minor syntax cleanup.
2021-10-01 14:49:08 -05:00
Aaron Klaassen 9dba68a244 Fix possibility of nil comments; minor syntax cleanup. 2021-10-01 14:44:33 -05:00
Aaron Klaassen 98d26a63b5
Merge pull request #41 from thetorpedodog/patch-1
Fix syntax error in entrypoint.sh.
2021-10-01 14:08:09 -05:00
paul fisher a68c36eecf
Fix syntax error in entrypoint.sh.
Resolves this error:

    /entrypoint.sh:47: syntax error, unexpected local variable or method, expecting ')'
    ...egexp.new duplicate_msg_pattern) }
    ...          ^~~~~~~~~~~~~~~~~~~~~
2021-10-01 14:02:55 -04:00
Aaron Klaassen d313421e4e
Merge pull request #36 from sadikkuzu/patch-1
Reorder missing token handler
2021-10-01 11:44:34 -05:00
Aaron Klaassen d6d11d34df
Merge pull request #31 from erdnaxeli/master
Don't pull PR's comments if we don't check duplicate
2021-10-01 11:43:49 -05:00
Aaron Klaassen fc87dc5b3d
Merge branch 'master' into master 2021-10-01 11:43:42 -05:00
Aaron Klaassen 2a47e0cc06
Merge pull request #33 from icy95/master
Delete messages matching the given regex. Fixes #32
2021-10-01 11:21:24 -05:00
Aaron Klaassen 73f6fb50a6
Merge branch 'master' into master 2021-10-01 11:20:56 -05:00
Aaron Klaassen c8a724fe18
Merge pull request #25 from ClearVoyage/master
Add option for specifying a pattern to use for checking for duplicates
2021-10-01 11:19:10 -05:00
Aaron Klaassen e9bb9b6a58
Merge pull request #40 from kenke7/master
Fix Ruby2 write permission error
2021-10-01 11:12:36 -05:00
Ken Ke 708d938d70
Fix Ruby2 write permission error 2021-07-20 13:48:07 +08:00
SADIK KUZU c1c31a461e
Reorder missing token handler 2021-03-25 00:25:44 +03:00
ibrahimcanyilmaz 3c12d183ca Delete messages matching the given regex 2021-01-02 16:04:17 +03:00
Alexandre Morignot 5d96454a33
Don't pull PR's comments if we don't check duplicate 2020-09-10 10:57:05 +02:00
Tobias Løfgren c2e0082c08
Update entrypoint.sh 2020-06-29 16:49:48 +02:00
Tobias Løfgren d4b9503ca1
Update entrypoint.sh 2020-06-29 16:42:40 +02:00
Tobias Løfgren b1985c9caa
Update entrypoint.sh 2020-06-29 16:39:02 +02:00
Tobias Løfgren a37a2c6369
Test puts 2020-06-29 16:32:53 +02:00
Tobias Løfgren de6feb6d61
Update entrypoint.sh 2020-06-29 16:29:10 +02:00
Tobias Løfgren d649035ef6
Update entrypoint.sh 2020-06-29 16:19:08 +02:00
Tobias Løfgren a10587a511
Update action.yml 2020-06-29 16:09:17 +02:00
Tobias Løfgren 5e4852e17f Revert "Update Dockerfile"
This reverts commit dfb865e7d2.
2020-06-29 16:05:31 +02:00
Tobias Løfgren dfb865e7d2
Update Dockerfile 2020-06-29 16:04:08 +02:00
Aaron Klaassen 85a56be792
Merge pull request #24 from sarink/patch-1
Ignore user when checking for duplicate message
2020-05-25 11:38:04 -05:00
Kabir Sarin b83079f5b5
Ignore user when checking for duplicate message 2020-05-14 18:05:10 -05:00
Aaron Klaassen 182ec73bcf
Merge pull request #20 from suryasr007/master
Make checking for duplicate msg optional
2020-03-31 14:03:06 -05:00
Surya Teja 758baf5e9f
Make checking for duplicate msg optional 2020-03-30 17:24:33 +05:30
Aaron Klaassen 4f102935dc
Merge pull request #18 from lmammino/patch-1
More generic error message in case of duplication
2020-03-20 16:23:54 -05:00
Luciano Mammino ead93e05a8
More generic error message in case of duplication 2020-03-20 18:26:49 +00:00
Aaron Klaassen 7aa2ad5b57
Merge pull request #12 from mpdude/use-alpine
Use the `alpine` base image variant
2020-01-23 12:05:56 -06:00
Matthias Pigulla e806d254dc Use the alpine base image variant
This leads to a much smaller download and thus faster workflows on GH.
2020-01-22 12:53:50 +00:00
Aaron Klaassen d1a1d5dd1e Update README with supported event types. 2019-12-24 10:49:32 -06:00
Aaron Klaassen a35cc2b139
Merge pull request #10 from patrickeasters/support_pr_event
Support pull_request event types
2019-12-24 11:06:10 -05:00
Patrick Easters a7949e493e Support pull_request event types 2019-11-13 23:24:44 -05:00
Aaron Klaassen 18e8a714e8
Merge pull request #4 from mangelarilla/master
Update to support new workflow syntax
2019-10-01 16:25:07 -05:00
Aaron Klaassen f2225490f4
Merge pull request #3 from unsplash/feature/check-duplicates
Check for existing notification before commenting
2019-09-30 13:40:48 -05:00
Aaron Klaassen 393c0d7eb9 Use && rather than and. 2019-09-30 13:40:17 -05:00
Miguel A. Arilla 466532e69e
update readme for new workflow syntax 2019-09-25 16:00:08 +01:00
Miguel A. Arilla e760aabf79
Add action.yml manifest 2019-09-25 15:54:51 +01:00