Skip to content

Commit f826acd

Browse files
authored
Merge branch 'exercism:main' into main
2 parents 166a823 + 23b8d94 commit f826acd

File tree

196 files changed

+2459
-1261
lines changed

Some content is hidden

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

196 files changed

+2459
-1261
lines changed

.github/labels.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,16 +157,16 @@
157157
description: "Work on Documentation"
158158
color: "ffffff"
159159

160-
# This label can be added to accept PRs as part of Hacktoberfest
161-
- name: "hacktoberfest-accepted"
162-
description: "Make this PR count for hacktoberfest"
163-
color: "ff7518"
164-
165160
# This Exercism-wide label is added to all automatically created pull requests that help migrate/prepare a track for Exercism v3
166161
- name: "v3-migration 🤖"
167162
description: "Preparing for Exercism v3"
168163
color: "e99695"
169164

165+
# This Exercism-wide label can be used to bulk-close issues in preparation for pausing community contributions
166+
- name: "paused"
167+
description: "Work paused until further notice"
168+
color: "e4e669"
169+
170170
# ----------------------------------------------------------------------------------------- #
171171
# These are the repository-specific labels that augment the Exercise-wide labels defined in #
172172
# https://github.com/exercism/org-wide-files/blob/main/global-files/.github/labels.yml. #

.github/pr-commenter.yml

Lines changed: 0 additions & 68 deletions
This file was deleted.

.github/workflows/ci.js.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
15+
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
1616
- name: Use Node.js LTS (16.x)
1717
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516
1818
with:
@@ -32,7 +32,7 @@ jobs:
3232
node-version: ['16', '17', '18']
3333

3434
steps:
35-
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
35+
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
3636
- name: Use Node.js ${{ matrix.node-version }}
3737
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516
3838
with:

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
steps:
3131
- name: Checkout repository
32-
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
32+
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
3333

3434
# Initializes the CodeQL tools for scanning.
3535
- name: Initialize CodeQL
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Pause Community Contributions
2+
3+
on:
4+
issues:
5+
types:
6+
- opened
7+
pull_request_target:
8+
types:
9+
- opened
10+
paths-ignore:
11+
- 'exercises/*/*/.approaches/**'
12+
- 'exercises/*/*/.articles/**'
13+
14+
permissions:
15+
issues: write
16+
pull-requests: write
17+
18+
jobs:
19+
pause:
20+
if: github.repository_owner == 'exercism' # Stops this job from running on forks
21+
uses: exercism/github-actions/.github/workflows/community-contributions.yml@main
22+
with:
23+
forum_category: javascript
24+
secrets:
25+
github_membership_token: ${{ secrets.COMMUNITY_CONTRIBUTIONS_WORKFLOW_TOKEN }}

.github/workflows/pr-comment.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/workflows/pr.ci.js.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111

1212
steps:
1313
- name: Checkout PR
14-
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
14+
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
1515

1616
- name: Use Node.js LTS (16.x)
1717
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516
@@ -37,7 +37,7 @@ jobs:
3737

3838
steps:
3939
- name: Checkout PR
40-
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
40+
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
4141

4242
- name: Use Node.js ${{ matrix.node-version }}
4343
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516

.github/workflows/verify-code-formatting.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: 'Checkout code'
13-
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
13+
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
1414
- name: Use Node.js LTS (16.x)
1515
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516
1616
with:

bin/fetch-configlet

Lines changed: 44 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,6 @@
66

77
set -eo pipefail
88

9-
readonly LATEST='https://api.github.com/repos/exercism/configlet/releases/latest'
10-
11-
case "$(uname)" in
12-
Darwin*) os='mac' ;;
13-
Linux*) os='linux' ;;
14-
Windows*) os='windows' ;;
15-
MINGW*) os='windows' ;;
16-
MSYS_NT-*) os='windows' ;;
17-
*) os='linux' ;;
18-
esac
19-
20-
case "${os}" in
21-
windows*) ext='zip' ;;
22-
*) ext='tgz' ;;
23-
esac
24-
25-
case "$(uname -m)" in
26-
*64*) arch='64bit' ;;
27-
*686*) arch='32bit' ;;
28-
*386*) arch='32bit' ;;
29-
*) arch='64bit' ;;
30-
esac
31-
329
curlopts=(
3310
--silent
3411
--show-error
@@ -41,15 +18,25 @@ if [[ -n "${GITHUB_TOKEN}" ]]; then
4118
curlopts+=(--header "authorization: Bearer ${GITHUB_TOKEN}")
4219
fi
4320

44-
suffix="${os}-${arch}.${ext}"
45-
4621
get_download_url() {
47-
curl "${curlopts[@]}" --header 'Accept: application/vnd.github.v3+json' "${LATEST}" |
22+
local os="$1"
23+
local ext="$2"
24+
local latest='https://api.github.com/repos/exercism/configlet/releases/latest'
25+
local arch
26+
case "$(uname -m)" in
27+
x86_64) arch='x86-64' ;;
28+
*686*) arch='i386' ;;
29+
*386*) arch='i386' ;;
30+
*) arch='x86-64' ;;
31+
esac
32+
local suffix="${os}_${arch}.${ext}"
33+
curl "${curlopts[@]}" --header 'Accept: application/vnd.github.v3+json' "${latest}" |
4834
grep "\"browser_download_url\": \".*/download/.*/configlet.*${suffix}\"$" |
4935
cut -d'"' -f4
5036
}
5137

5238
main() {
39+
local output_dir
5340
if [[ -d ./bin ]]; then
5441
output_dir="./bin"
5542
elif [[ $PWD == */bin ]]; then
@@ -59,8 +46,26 @@ main() {
5946
return 1
6047
fi
6148

62-
download_url="$(get_download_url)"
63-
output_path="${output_dir}/latest-configlet.${ext}"
49+
local os
50+
case "$(uname)" in
51+
Darwin*) os='macos' ;;
52+
Linux*) os='linux' ;;
53+
Windows*) os='windows' ;;
54+
MINGW*) os='windows' ;;
55+
MSYS_NT-*) os='windows' ;;
56+
*) os='linux' ;;
57+
esac
58+
59+
local ext
60+
case "${os}" in
61+
windows*) ext='zip' ;;
62+
*) ext='tar.gz' ;;
63+
esac
64+
65+
echo "Fetching configlet..." >&2
66+
local download_url
67+
download_url="$(get_download_url "${os}" "${ext}")"
68+
local output_path="${output_dir}/latest-configlet.${ext}"
6469
curl "${curlopts[@]}" --output "${output_path}" "${download_url}"
6570

6671
case "${ext}" in
@@ -69,6 +74,17 @@ main() {
6974
esac
7075

7176
rm -f "${output_path}"
77+
78+
local executable_ext
79+
case "${os}" in
80+
windows*) executable_ext='.exe' ;;
81+
*) executable_ext='' ;;
82+
esac
83+
84+
local configlet_path="${output_dir}/configlet${executable_ext}"
85+
local configlet_version
86+
configlet_version="$(${configlet_path} --version)"
87+
echo "Downloaded configlet ${configlet_version} to ${configlet_path}"
7288
}
7389

7490
main
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"blurb": "JavaScript supports regular expressions as a powerful way of manipulating and searching through data.",
3+
"authors": ["julendiaz"],
4+
"contributors": ["junedev"]
5+
}

0 commit comments

Comments
 (0)