forked from stdlib-js/stdlib
-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (88 loc) · 3.4 KB
/
track_todos.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#/
# @license Apache-2.0
#
# Copyright (c) 2023 The Stdlib Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#/
# Workflow name:
name: track_todos
# Workflow triggers:
on:
schedule:
# Run the workflow once a month on the 1st day of every month:
- cron: "0 0 1 * *"
# Allow the workflow to be manually run:
workflow_dispatch:
# Global permissions:
permissions:
# Allow read-only access to the repository contents:
contents: read
# Workflow jobs:
jobs:
# Define a job for running tests affected by changes to the repository...
process:
# Define a display name:
name: 'Track TODO and FIXME comments'
# Ensure the job does not run on forks:
if: github.repository == 'stdlib-js/stdlib'
# Define the type of virtual host machine:
runs-on: ubuntu-latest
# Define the sequence of job steps...
steps:
# Checkout the repository:
- name: 'Checkout repository'
# Pin action to full length commit SHA
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
# Specify whether to remove untracked files before checking out the repository:
clean: true
# Limit clone depth to the most recent commit:
fetch-depth: 1
# Specify whether to download Git-LFS files:
lfs: false
timeout-minutes: 10
# Create content of tracking issue for TODO comments:
- name: 'Create content of tracking issue for TODO comments'
run: |
. "$GITHUB_WORKSPACE/.github/workflows/scripts/track_todos" > tracking_issue_todos.md
cat tracking_issue_todos.md >> $GITHUB_STEP_SUMMARY
# Create content of tracking issue for FIXME comments:
- name: 'Create content of tracking issue for FIXME comments'
run: |
. "$GITHUB_WORKSPACE/.github/workflows/scripts/track_fixmes" > tracking_issue_fixmes.md
cat tracking_issue_fixmes.md >> $GITHUB_STEP_SUMMARY
# Create or update issue for TODO comments:
- name: 'Create or update issue for TODO comments'
# Pin action to full length commit SHA
uses: peter-evans/create-issue-from-file@24452a72d85239eacf1468b0f1982a9f3fec4c94 # v5.0.0
with:
title: 'TODO comments'
content-filepath: ./tracking_issue_todos.md
issue-number: 803
token: ${{ secrets.PULL_REQUEST_TOKEN }}
labels: |
todos
automated-issue
# Create or update issue for FIXME comments:
- name: 'Create or update issue for FIXME comments'
# Pin action to full length commit SHA
uses: peter-evans/create-issue-from-file@24452a72d85239eacf1468b0f1982a9f3fec4c94 # v5.0.0
with:
title: 'FIXME comments'
content-filepath: ./tracking_issue_fixmes.md
issue-number: 804
token: ${{ secrets.PULL_REQUEST_TOKEN }}
labels: |
fixmes
automated-issue