Skip to content

Commit 84221cf

Browse files
authored
chore: Sync with repo-template-ts (#1481)
Sync with repo-template-ts and template-action templates. --------- Signed-off-by: Ian Lewis <[email protected]>
1 parent 1a99cfd commit 84221cf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+51860
-48418
lines changed

.eslintrc.json

-56
This file was deleted.

.github/ISSUE_TEMPLATE/bug_report.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name: Bug report
33
about: Create a report to help us improve
44
title: "[bug]"
55
labels: bug, triage
6-
assignees: ianlewis
76
---
87

98
**Describe the bug**
@@ -20,8 +19,8 @@ Steps to reproduce the behavior:
2019
**Expected behavior**
2120
A clear and concise description of what you expected to happen.
2221

23-
**Supporting context**
24-
If applicable, add screenshots, logs, links to workflow runs, etc. to help explain your problem.
22+
**Screenshots**
23+
If applicable, add screenshots to help explain your problem.
2524

2625
**Additional context**
2726
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/docs_issue.md

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name: Documentation
33
about: An idea or bug in docs
44
title: "[docs]"
55
labels: documentation, triage
6-
assignees: ianlewis
76
---
87

98
**Which document are you referring to?**

.github/ISSUE_TEMPLATE/feature_request.md

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name: Feature request
33
about: Suggest an idea
44
title: "[feature]"
55
labels: enhancement, triage
6-
assignees: ianlewis
76
---
87

98
**Is your feature request related to a problem? Please describe.**

.github/dependabot.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Copyright 2023 Google LLC
2+
# Copyright 2024 Ian Lewis
23
#
34
# Licensed under the Apache License, Version 2.0 (the "License");
45
# you may not use this file except in compliance with the License.
@@ -14,10 +15,6 @@
1415

1516
version: 2
1617
updates:
17-
- package-ecosystem: "gomod"
18-
directory: "/"
19-
schedule:
20-
interval: "monthly"
2118
- package-ecosystem: "github-actions"
2219
directory: "/"
2320
schedule:

.github/pull_request_template.md

-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@ proposing them via a Pull Request. -->
1919
- [ ] Add unit tests if applicable.
2020
- [ ] Update documentation if applicable.
2121
- [ ] Add a note in the [CHANGELOG.md](../blob/main/CHANGELOG.md) if applicable.
22-
- [ ] Sign the [Google CLA](https://cla.developers.google.com/about/google-corporate).

.github/workflows/pre-submit.units.yml

+49-39
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Copyright 2023 Google LLC
2+
# Copyright 2024 Ian Lewis
23
#
34
# Licensed under the Apache License, Version 2.0 (the "License");
45
# you may not use this file except in compliance with the License.
@@ -36,7 +37,7 @@ jobs:
3637
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
3738
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
3839
with:
39-
node-version: 20
40+
node-version-file: "package.json"
4041
- name: unit tests
4142
run: |
4243
make unit-test
@@ -57,7 +58,7 @@ jobs:
5758

5859
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
5960
with:
60-
node-version: 20
61+
node-version-file: "package.json"
6162

6263
- name: Rebuild the dist/ directory
6364
run: make clean package
@@ -81,29 +82,49 @@ jobs:
8182
name: dist
8283
path: dist/
8384

84-
# autogen for license headers
85+
# Check license headers
8586
###############################
86-
87-
autogen:
87+
license-headers:
8888
runs-on: ubuntu-latest
8989
steps:
90-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
91-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
90+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
91+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
9292
with:
9393
repository: mbrukman/autogen
9494
ref: 9026b78e17573b5dda4bff79033c352443551dc5
9595
path: autogen
9696
- run: |
9797
echo "${GITHUB_WORKSPACE}/autogen" >> "${GITHUB_PATH}"
98-
- run: make autogen
98+
- run: |
99+
git config user.name "Unknown"
100+
make license-headers
99101
- name: check diff
100102
run: |
101103
set -euo pipefail
102104
if [ "$(GIT_PAGER="cat" git diff --ignore-space-at-eol | wc -l)" -gt "0" ]; then
103-
echo "::error::Detected license header changes. See status below:"
104-
echo "::group::git diff"
105+
echo "Detected license header changes. See status below:"
106+
GIT_PAGER="cat" git diff
107+
exit 1
108+
fi
109+
110+
# formatting
111+
###############################
112+
113+
formatting:
114+
runs-on: ubuntu-latest
115+
steps:
116+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
117+
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
118+
with:
119+
node-version-file: "package.json"
120+
- run: |
121+
make format
122+
- name: check diff
123+
run: |
124+
set -euo pipefail
125+
if [ "$(GIT_PAGER="cat" git diff --ignore-space-at-eol | wc -l)" -gt "0" ]; then
126+
echo "Detected formatting changes. See status below:"
105127
GIT_PAGER="cat" git diff
106-
echo "::endgroup::"
107128
exit 1
108129
fi
109130
@@ -113,32 +134,30 @@ jobs:
113134
actionlint:
114135
runs-on: ubuntu-latest
115136
steps:
116-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
137+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
117138
- name: actionlint
118139
env:
119-
SHELLCHECK_VERSION: "0.9.0"
120-
SHELLCHECK_CHECKSUM: "700324c6dd0ebea0117591c6cc9d7350d9c7c5c287acbad7630fa17b1d4d9e2f"
121-
ACTIONLINT_VERSION: "1.6.26"
122-
ACTIONLINT_CHECKSUM: "f0294c342af98fad4ff917bc32032f28e1b55f76aedf291886ec10bbed7c12e1"
140+
SHELLCHECK_VERSION: "0.10.0"
141+
SHELLCHECK_CHECKSUM: "6c881ab0698e4e6ea235245f22832860544f17ba386442fe7e9d629f8cbedf87"
142+
ACTIONLINT_VERSION: "1.7.3"
143+
ACTIONLINT_CHECKSUM: "37252b4d440b56374b0fc1726e05fd7452d30d6d774f6e9b52e65bb64475f9db"
123144
run: |
124145
set -euo pipefail
125146
126147
# Install shellcheck
127148
curl -sSLo shellcheck.tar.gz "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz"
128-
if ! echo "${SHELLCHECK_CHECKSUM} shellcheck.tar.gz" | sha256sum --strict --check --status; then
129-
echo "::error::Unexpected checksum for shellcheck: expected '${SHELLCHECK_CHECKSUM}', got '$(sha256sum shellcheck.tar.gz | awk '{ print $1 }')'"
130-
exit 1
131-
fi
149+
echo "shellcheck checksum is $(sha256sum shellcheck.tar.gz | awk '{ print $1 }')"
150+
echo "expected checksum is $SHELLCHECK_CHECKSUM"
151+
echo "$SHELLCHECK_CHECKSUM shellcheck.tar.gz" | sha256sum --strict --check --status || exit 1
132152
133153
tar xf shellcheck.tar.gz
134154
mv "shellcheck-v${SHELLCHECK_VERSION}/shellcheck" /usr/local/bin
135155
136156
# Install actionlint
137157
curl -sSLo actionlint.tar.gz "https://github.com/rhysd/actionlint/releases/download/v${ACTIONLINT_VERSION}/actionlint_${ACTIONLINT_VERSION}_linux_amd64.tar.gz"
138-
if ! echo "${ACTIONLINT_CHECKSUM} actionlint.tar.gz" | sha256sum --strict --check --status; then
139-
echo "::error::Unexpected checksum for actionlint: expected '${ACTIONLINT_CHECKSUM}', got '$(sha256sum actionlint.tar.gz | awk '{ print $1 }')'"
140-
exit 1
141-
fi
158+
echo "actionlint checksum is $(sha256sum actionlint.tar.gz | awk '{ print $1 }')"
159+
echo "expected checksum is $ACTIONLINT_CHECKSUM"
160+
echo "$ACTIONLINT_CHECKSUM actionlint.tar.gz" | sha256sum --strict --check --status || exit 1
142161
143162
tar xf actionlint.tar.gz
144163
mv ./actionlint /usr/local/bin
@@ -148,34 +167,25 @@ jobs:
148167
markdownlint:
149168
runs-on: ubuntu-latest
150169
steps:
151-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
152-
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
170+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
171+
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
153172
with:
154-
node-version: 20
173+
node-version-file: "package.json"
155174
- run: make markdownlint
156175

157176
yamllint:
158177
runs-on: ubuntu-latest
159178
steps:
160-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
161-
- env:
162-
YAMLLINT_VERSION: "1.26.3"
163-
run: |
164-
set -euo pipefail
165-
166-
# Install yamllint
167-
pip install -r requirements.txt --require-hashes
168-
169-
# Run yamllint
170-
make yamllint
179+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
180+
- run: make yamllint
171181

172182
eslint:
173183
runs-on: ubuntu-latest
174184
steps:
175185
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
176186
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
177187
with:
178-
node-version: 20
188+
node-version-file: "package.json"
179189
- run: make eslint
180190

181191
# e2e tests.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Copyright 2024 Ian Lewis
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+
15+
name: "TODO Issue Reopener"
16+
17+
on:
18+
workflow_dispatch:
19+
schedule:
20+
- cron: "0 0 * * *"
21+
22+
permissions: {}
23+
24+
jobs:
25+
issue-reopener:
26+
runs-on: ubuntu-latest
27+
permissions:
28+
# NOTE: contents: read is necessary for private repositories.
29+
contents: read
30+
issues: write
31+
steps:
32+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
33+
- name: Issue Reopener
34+
uses: ianlewis/todo-issue-reopener@1a99cfd93fb95eb4f212a1ebaf3e9ef8ba4c46f8 # v1.4.0

.github/workflows/schedule.stale.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Copyright 2024 Google LLC
2+
# Copyright 2024 Ian Lewis
23
#
34
# Licensed under the Apache License, Version 2.0 (the "License");
45
# you may not use this file except in compliance with the License.
@@ -26,7 +27,7 @@ jobs:
2627
issues: write
2728
pull-requests: write
2829
steps:
29-
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0
30+
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0
3031
with:
3132
repo-token: ${{ secrets.GITHUB_TOKEN }}
3233
stale-issue-message: "A friendly reminder that this issue had no activity for 120 days."

.gitignore

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# For markdownlint
22
.git
33

4-
# Dependency directory
5-
node_modules
4+
# Dependency directories (remove the comment below to include it)
5+
node_modules/
6+
.venv/
67

78
# Coverage files
89
coverage

.markdownlint.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Copyright 2023 Google LLC
2+
# Copyright 2024 Ian Lewis
23
#
34
# Licensed under the Apache License, Version 2.0 (the "License");
45
# you may not use this file except in compliance with the License.

.eslintignore .prettierignore

File renamed without changes.

.yamllint.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Copyright 2023 Google LLC
2+
# Copyright 2024 Ian Lewis
23
#
34
# Licensed under the Apache License, Version 2.0 (the "License");
45
# you may not use this file except in compliance with the License.
@@ -15,9 +16,7 @@
1516
---
1617
extends: default
1718

18-
ignore: |
19-
node_modules/
20-
vendor/
19+
ignore-from-file: [.gitignore]
2120

2221
rules:
2322
comments:

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
All notable changes to this project will be documented in this file.
3+
All notable changes will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

0 commit comments

Comments
 (0)