Skip to content

Commit 4cd16c7

Browse files
committed
chore(gh): update greeting workflow
Updates to Issue Greeting workflow: - Limits workflow permissions. - Simplifies types reference. - Pins actions to release commit hash. Signed-off-by: Ryan Johnson <[email protected]>
1 parent 060d9d0 commit 4cd16c7

File tree

1 file changed

+11
-23
lines changed

1 file changed

+11
-23
lines changed
Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,35 @@
1-
# Copyright (c) 2021 VMware, Inc. All Rights Reserved.
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
14-
151
name: Greeting
162

3+
permissions:
4+
issues: write
5+
contents: read
6+
177
on:
188
issues:
19-
types: ["opened"]
9+
types: opened
2010

2111
jobs:
2212
greeting:
2313
name: Send Greeting
2414
runs-on: ubuntu-latest
25-
# only send message to users not (yet) associated with repo
26-
# https://docs.github.com/en/graphql/reference/enums#commentauthorassociation
2715
if: github.event.issue.author_association == 'NONE'
2816

2917
steps:
30-
- name: Checkout
31-
uses: actions/checkout@v4
18+
- name: Checkout Repository
19+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3220
with:
3321
fetch-depth: 1
3422

35-
- name: Render template
23+
- name: Render Template
3624
id: template
37-
uses: chuhlomin/[email protected]
25+
uses: chuhlomin/render-template@807354a04d9300c9c2ac177c0aa41556c92b3f75 # v1.10
3826
with:
3927
template: .github/comment-template.md
4028
vars: |
4129
author: ${{ github.actor }}
4230
43-
- name: Create comment
44-
uses: peter-evans/create-or-update-comment@v4
31+
- name: Create Comment
32+
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.1.0
4533
with:
4634
issue-number: ${{ github.event.issue.number }}
4735
body: ${{ steps.template.outputs.result }}

0 commit comments

Comments
 (0)