Skip to content

Commit 5aae46e

Browse files
committed
build: address feedback and increase window to 14 days
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: passed - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na ---
1 parent 079b5ac commit 5aae46e

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

.github/workflows/create_address_commit_comment_issues.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,5 @@ jobs:
7070
env:
7171
GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
7272
run: |
73-
. "$GITHUB_WORKSPACE/.github/workflows/scripts/create_address_commit_comments_issues" 1
73+
. "$GITHUB_WORKSPACE/.github/workflows/scripts/create_address_commit_comments_issues" 14
7474
timeout-minutes: 15

.github/workflows/scripts/create_address_commit_comments_issues

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ GITHUB_API_URL="https://api.github.com"
6363
PER_PAGE=100
6464

6565
# Hard-coded list of core contributors:
66-
core_contributors=("kgryte" "Planeshifter" "gunjjoshi" "headlessNode")
66+
core_contributors=("kgryte" "Planeshifter" "gunjjoshi" "headlessNode") # TODO: resolve core contributors from one source of truth going forward
6767

6868
# Define a heartbeat interval to periodically print messages in order to prevent CI from prematurely ending a build due to long running commands:
6969
heartbeat_interval='30s'
@@ -127,7 +127,7 @@ print_success() {
127127
compute_since_date() {
128128
if date --version >/dev/null 2>&1; then
129129
# GNU date:
130-
date -u -d "$days days ago" +"%Y-%m-%dT%H:%M:%SZ"
130+
date -u -d "${days} days ago" +"%Y-%m-%dT%H:%M:%SZ"
131131
else
132132
# macOS date:
133133
date -u -v-"${days}"d +"%Y-%m-%dT%H:%M:%SZ"
@@ -143,7 +143,7 @@ github_api() {
143143
"-H" "Authorization: token ${github_token}" \
144144
"-H" "Accept: application/vnd.github+json")
145145

146-
curl -s "${headers[@]}" "$GITHUB_API_URL$endpoint"
146+
curl -s "${headers[@]}" "${GITHUB_API_URL}${endpoint}"
147147
}
148148

149149
# Makes a GitHub API POST request.
@@ -158,25 +158,24 @@ github_api_post() {
158158
"-H" "Accept: application/vnd.github+json" \
159159
"-H" "Content-Type: application/json" )
160160

161-
curl -s -X POST "${headers[@]}" -d "$data" "$GITHUB_API_URL$endpoint"
161+
curl -s -X POST "${headers[@]}" -d "${data}" "${GITHUB_API_URL}${endpoint}"
162162
}
163163

164164
# Creates a GitHub issue using the provided title and body.
165-
# The issue is tagged with the "Good First Issue" label.
166165
#
167166
# $1 - Issue title
168167
# $2 - Issue body
169168
create_issue() {
170169
local title="$1"
171170
local body="$2"
172171
local payload
172+
local response
173173

174174
# Build the JSON payload including the labels field:
175-
payload=$(jq -n --arg title "$title" --arg body "$body" \
175+
payload=$(jq -n --arg title "${title}" --arg body "${body}" \
176176
'{title: $title, body: $body, labels: ["Good First Issue"]}')
177177

178178
local endpoint="/repos/${owner}/${repo}/issues"
179-
local response
180179
response=$(github_api_post "$endpoint" "$payload")
181180

182181
if ! echo "$response" | jq . >/dev/null 2>&1; then
@@ -192,12 +191,12 @@ create_issue() {
192191
issue_exists_for_commit() {
193192
local commit_sha="$1"
194193
local short_sha=${commit_sha:0:7}
194+
local query
195195

196196
# Build a search query that looks for the commit short SHA in the issue title:
197197
local raw_query="repo:${owner}/${repo} in:title \"commit ${short_sha}\""
198198

199199
# URL-encode the query using jq:
200-
local query
201200
query=$(echo "$raw_query" | jq -sRr @uri)
202201

203202
local endpoint="/search/issues?q=${query}"

0 commit comments

Comments
 (0)