Skip to content

Commit

Permalink
feat: Add issue.user.login (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
peaceiris authored Sep 12, 2020
1 parent 3f66b95 commit 7f5d590
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/label-commenter-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ labels:
labeled:
issue:
body: |
Thank you @{{ user.login }} for suggesting this.
Thank you @{{ issue.user.login }} for suggesting this.
2 changes: 1 addition & 1 deletion .github/workflows/label-commenter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
ref: master

- name: Label Commenter
uses: peaceiris/[email protected]0
uses: peaceiris/[email protected]1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# config_file: .github/label-commenter-config.yml
6 changes: 4 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,10 @@ export async function run(): Promise<void> {

// Render template
const commentBodyView = {
user: {
login: (context.payload as any).user.login // eslint-disable-line @typescript-eslint/no-explicit-any
issue: {
user: {
login: (context.payload as any).issue.user.login // eslint-disable-line @typescript-eslint/no-explicit-any
}
},
sender: {
login: (context.payload as any).sender.login // eslint-disable-line @typescript-eslint/no-explicit-any
Expand Down

0 comments on commit 7f5d590

Please sign in to comment.