-
Notifications
You must be signed in to change notification settings - Fork 0
[pull] gh-pages from expressjs:gh-pages #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: gh-pages
Are you sure you want to change the base?
Changes from all commits
e99a818
b2ba2c6
8df6578
1106ae3
8a5a0ac
83cf606
8421570
8e111ba
b5512e1
2e0e778
da0a7ab
cbd1c86
4fe9ce7
7086c51
f24789a
765fbc2
96ecdab
23d3c12
a55eccd
896e9da
4ee32e2
243407b
902e008
dfc48be
134191f
7eaff35
625f1d5
3555981
8f9626f
046df00
52bf0e7
6aa7167
d2bef36
212f2f1
42adb68
50c8c0b
2d58040
74ec3a2
568d9f9
f5ca0d8
6f59979
5bbc22a
24a104a
332d90a
30cde24
81f0ab3
cab8004
81dc2a1
875b6c0
50ec70c
68dfd8e
1046d09
b18b459
2cde7b5
9469620
bc03b0e
477d6ae
fac7900
6923c2e
e22de49
210659f
fc401a5
d557cca
b24af37
9742627
8aa4cac
993111b
6a4c8c4
dc7e80e
7961e3d
7b74c10
d5ca463
9092d18
43a0169
a5de90b
693da28
73e7ba9
1136259
2275070
4f881e5
9fc86bb
c8fe247
11efa75
c2c8ccf
9a5001c
428d518
1600096
57fa67f
0c48441
2056624
91070a7
8b8bc84
8db1fc0
f01c3da
782e9df
c380cd4
a740824
743ccef
899dbfd
e363253
2b3c9f1
8715a21
3536239
79e6a54
5d7c21f
fabc75a
68b4840
bf006cd
d94613a
73a6b75
0cf2846
b56a8e6
31bb1d6
7e89208
d63a98b
650a6a4
5ab8e0d
d94ab7d
52c111d
ab4778a
8c04850
41697a8
1409e38
f669c5f
2067442
85e0462
9157075
1e05e8b
1d9c326
db21b0c
67096ce
8e2dc7a
6c3cfbb
bdf2952
ec5d01a
27cff69
7f5bf72
2cda09d
7f9b0d8
f3b92d9
ffd1223
502d079
22f4946
e2814ae
6daa871
064fc0b
34a18e8
26d0b1f
29d6e0b
c07e0bb
748c40e
5e850e8
d8c2409
76d9393
461386f
3926b29
b77de8a
586b428
0aab4f2
77463b1
8f3f258
8cc0a58
f0ee73d
5c9f73f
70f3c82
7e9249f
a29e83d
2da701b
db7dc32
0ab83ba
cae37bd
3b8f190
688c59b
9a89c2f
9e00f5a
4901220
ad856cd
021c4d6
f24f45a
e69208e
8f6546c
100dc75
20a6669
5c7a418
0082552
b17e3a1
748c994
72e664a
ddcd1a6
22d3641
cd9e6a3
658ab65
dcdef7d
230fc6b
528cdf8
2c827d9
9d564ba
fc56d27
4e625d4
308cdf4
00a676d
c530d43
b460ccb
d1f904a
643571d
cd8ffd5
14295d3
c8a13b7
124133a
c98d2c4
30c053b
4ea8ef5
b9d72b9
0f3d24c
9e68fa2
8fc9116
951e88c
81611aa
10155e9
722fb07
57cbe6c
c7b12bd
7743e0f
92ebb0c
90784d7
1b2fff4
fde74c4
6a57f39
407f352
79665c0
0989623
61cfc19
120197a
0f143c1
35b4b3b
1917b49
7bf3227
66c2b91
3f02c01
f263365
abee42a
c75ec31
8c4ae2a
b8d426e
3751b43
d5eb506
4c0838e
90e5a31
74fcef5
76bbf94
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Website development | ||
* @expressjs/docs-collaborators | ||
|
||
# Codeowners | ||
.github/CODEOWNERS @expressjs/docs-captains | ||
|
||
# Blog | ||
_posts @expressjs/express-tc |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: monthly | ||
|
||
- package-ecosystem: docker | ||
directory: / | ||
schedule: | ||
interval: monthly | ||
|
||
- package-ecosystem: bundler | ||
directory: / | ||
schedule: | ||
interval: monthly | ||
|
||
- package-ecosystem: npm | ||
directory: / | ||
schedule: | ||
interval: monthly | ||
open-pull-requests-limit: 10 | ||
ignore: | ||
- dependency-name: "*" | ||
update-types: ["version-update:semver-major"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
#!/bin/bash | ||
|
||
# This script replaces the contents of a section with the contents from the annotated source address or local file paths inside the DEST file. | ||
|
||
# read contents of file into memory | ||
DEST="../../en/resources/contributing.md" | ||
|
||
# track the header level | ||
level='' | ||
# tracks src for curl calls | ||
src='' | ||
# tracks file paths for local file reads | ||
local='' | ||
while IFS= read -r line; do | ||
# REMOVE PREVIOUS CONTENT SECTION | ||
# if src or local tags are not empty | ||
if [[ -n "$src" || -n "$local" ]]; then | ||
# if current line not a horitzontal rule hr | ||
if [[ "$line" != "----"* ]]; then | ||
# if line == level -- level is num of ## | ||
if [[ "$line" == "$level"'#'* || | ||
# line not a header line | ||
"$line" != '#'* ]]; then | ||
# skip line and rewrite over old content | ||
continue | ||
fi | ||
fi | ||
fi | ||
|
||
# PRINT TO PAGE SECTION | ||
src='' | ||
local='' | ||
# if line is a header | ||
if [[ "$line" == '#'* ]]; then | ||
# if header has (#id-of-link) or {#id-on-page} patterns | ||
if [[ $line =~ (\(\#.*\))\. || "$line" =~ \{\#.*\} ]]; then | ||
# isolate the matching part of line | ||
match=${BASH_REMATCH[0]} | ||
# remove match - leaving rest | ||
rest=${line//${match}} | ||
# remove any # symbols from start | ||
title_rest=${rest##*\#} | ||
# slice rest of line to get only level | ||
level="${rest:0:$((${#rest} - ${#title_rest}))}" | ||
else | ||
# any other headers -- these before SRC/LOCAL pages anchors | ||
header=${line##*\#} | ||
level="${line:0:$((${#line} - ${#header}))}" | ||
fi | ||
# if line is SRC anchor in read file | ||
elif [[ "$line" == '<!-- SRC:'* ]]; then | ||
# remove the first 10 chars | ||
src=${line:10} | ||
# % remove from end until after white space -- leaves src details | ||
src=${src% *} | ||
# if line is LOCAL anchor in read file | ||
elif [[ "$line" == '<!-- LOCAL:'* ]]; then | ||
# remove the first 12 chars | ||
local=${line:12} | ||
# % remove from end until after white space -- leave local details | ||
local=${local% *} | ||
# leave only path to file | ||
local=${local#* } | ||
fi | ||
# prints line to the page | ||
echo "$line" | ||
|
||
if [[ -n "$local" ]]; then | ||
# cat file -- outputs full contents of file at local path | ||
cat "$local" | \ | ||
# remove the top 1# headers from cat'd file | ||
sed -En '/^##|^[^#]/,$p' | \ | ||
# remove GH MD specific tags start w '[!NOTE\] + the following line | ||
sed -E '/^>\[!NOTE\]*/{N;d;}' | \ | ||
# change GH specific MD IMPORTANT tags -> change into plain MD | ||
sed -E 's/> \[!IMPORTANT\]/> **IMPORTANT:** /g' | ||
echo | ||
elif [[ -n "$src" ]]; then | ||
echo | ||
path=${src#* } | ||
repo=${src% *} | ||
curl -s "https://raw.githubusercontent.com/${repo}/master/${path}" | \ | ||
# if line is ## or not # | ||
sed -En '/^##|^[^#]/,$p' | \ | ||
# add additional # every header | ||
sed 's/^#/&'"${level:1}"'/g' | \ | ||
# format GH links when match | ||
sed -E 's/(\[[^]]*\])\(([^):#]*)\)/\1(https:\/\/github.com\/'"$(sed 's/\//\\\//g' <<< "$repo")"'\/blob\/master\/\2)/g' | ||
echo | ||
fi | ||
# read in dest file then write back to file | ||
done <<<"$(< $DEST)" > $DEST |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { readFile, writeFile } from 'node:fs/promises' | ||
import path from 'node:path' | ||
|
||
const NPMURL = 'https://registry.npmjs.org/express' | ||
|
||
const response = await (await fetch(NPMURL)).json() | ||
|
||
const { next, latest } = response['dist-tags'] | ||
|
||
try { | ||
const filePath = path.resolve(path.join('..', '..', '_data', 'express.yml')) | ||
let content = await readFile(filePath, 'utf8') | ||
|
||
content = content.replace(/current_version: ".*"/, `current_version: "${latest}"`) | ||
content = content.replace(/next_version: ".*"/, `next_version: "${next}"`) | ||
|
||
await writeFile(filePath, content, 'utf8') | ||
} catch (error) { | ||
console.error('Error updating versions in _data/express.yml:', error) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# For most projects, this workflow file will not need changing; you simply need | ||
# to commit it to your repository. | ||
# | ||
# You may wish to alter this file to override the set of languages analyzed, | ||
# or to provide custom queries or build logic. | ||
# | ||
# ******** NOTE ******** | ||
# We have attempted to detect the languages in your repository. Please check | ||
# the `language` matrix defined below to confirm you have the correct set of | ||
# supported CodeQL languages. | ||
# | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: ["gh-pages"] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: ["gh-pages"] | ||
schedule: | ||
- cron: "0 0 * * 1" | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: ["javascript"] | ||
# CodeQL supports [ $supported-codeql-languages ] | ||
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
Check warningCode scanning / Scorecard Pinned-Dependencies
score is 4: GitHub-owned GitHubAction not pinned by hash
Remediation tip: update your workflow using [https://app.stepsecurity.io](https://app.stepsecurity.io/secureworkflow/expressjs/expressjs.com/codeql.yml/gh-pages?enable=pin)
Click Remediation section below for further remediation help
|
||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v3 | ||
Check warningCode scanning / Scorecard Pinned-Dependencies
score is 4: GitHub-owned GitHubAction not pinned by hash
Remediation tip: update your workflow using [https://app.stepsecurity.io](https://app.stepsecurity.io/secureworkflow/expressjs/expressjs.com/codeql.yml/gh-pages?enable=pin)
Click Remediation section below for further remediation help
|
||
with: | ||
languages: ${{ matrix.language }} | ||
# If you wish to specify custom queries, you can do so here or in a config file. | ||
# By default, queries listed here will override any specified in a config file. | ||
# Prefix the list here with "+" to use these queries and those in the config file. | ||
|
||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). | ||
# If this step fails, then you should remove it and run the build manually (see below) | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v3 | ||
Check warningCode scanning / Scorecard Pinned-Dependencies
score is 4: GitHub-owned GitHubAction not pinned by hash
Remediation tip: update your workflow using [https://app.stepsecurity.io](https://app.stepsecurity.io/secureworkflow/expressjs/expressjs.com/codeql.yml/gh-pages?enable=pin)
Click Remediation section below for further remediation help
|
||
|
||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun | ||
|
||
# If the Autobuild fails above, remove it and uncomment the following three lines. | ||
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. | ||
|
||
# - run: | | ||
# echo "Run, Build Application using script" | ||
# ./location_of_script_within_repo/buildscript.sh | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v3 | ||
Check warningCode scanning / Scorecard Pinned-Dependencies
score is 4: GitHub-owned GitHubAction not pinned by hash
Remediation tip: update your workflow using [https://app.stepsecurity.io](https://app.stepsecurity.io/secureworkflow/expressjs/expressjs.com/codeql.yml/gh-pages?enable=pin)
Click Remediation section below for further remediation help
|
||
with: | ||
category: "/language:${{matrix.language}}" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Crowdin Upload | ||
|
||
on: | ||
push: | ||
branches: [ gh-pages ] | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
Check failureCode scanning / Scorecard Token-Permissions
score is 0: topLevel 'contents' permission set to 'write'
Remediation tip: Visit [https://app.stepsecurity.io/secureworkflow](https://app.stepsecurity.io/secureworkflow/github.com/expressjs/expressjs.com/crowdin.yml/gh-pages?enable=permissions).
Tick the 'Restrict permissions for GITHUB_TOKEN'
Untick other options
NOTE: If you want to resolve multiple issues at once, you can visit [https://app.stepsecurity.io/securerepo](https://app.stepsecurity.io/securerepo) instead.
Click Remediation section below for further remediation help
|
||
pull-requests: write | ||
|
||
jobs: | ||
synchronize-with-crowdin: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
Check warningCode scanning / Scorecard Pinned-Dependencies
score is 4: GitHub-owned GitHubAction not pinned by hash
Remediation tip: update your workflow using [https://app.stepsecurity.io](https://app.stepsecurity.io/secureworkflow/expressjs/expressjs.com/crowdin.yml/gh-pages?enable=pin)
Click Remediation section below for further remediation help
|
||
with: | ||
persist-credentials: false | ||
|
||
- name: crowdin action | ||
uses: crowdin/github-action@590c05e09a29f392b203faf4d6aa8e0cd32c7835 # https://github.com/crowdin/github-action/releases/tag/v2.9.1 | ||
with: | ||
upload_sources: true | ||
upload_translations: false | ||
download_translations: false | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} | ||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} |
Check warning
Code scanning / Scorecard
Pinned-Dependencies