reviewdog / action-rubocop

Run rubocop with reviewdog 🐶
MIT License
115 stars 75 forks source link

Set default token to `github_token` input parameter #51

Closed ybiquitous closed 3 years ago

ybiquitous commented 3 years ago

Hi there,

In this issue, I suggest making the github_token input parameter optional by setting the default token (secrets.GITHUB_TOKEN or github.token). The reason is that people can use this action with less configuration code.

https://github.com/reviewdog/action-rubocop/blob/bc5455ef2cd8f9e77232dc19c79bc0e450df8ed3/action.yml#L5-L7

For example, the change would be like this:

 github_token: 
   description: 'GITHUB_TOKEN' 
-  required: true
+  default: ${{ github.token }}

See also:

mgrachev commented 3 years ago

@ybiquitous Hi 👋

Sorry for the long answer and thank you for your offer. I like it 🙂

ybiquitous commented 3 years ago

@mgrachev Thank you so much! 🎉

ybiquitous commented 3 years ago

In addition, it would be very nice if other reviewdog actions could support the optional github_token parameter as well. 😄

mgrachev commented 3 years ago

Good idea! Thanks!

ybiquitous commented 3 years ago

Oh, super fast! Thank you! ⚡ 😁