Skip to content
Merged
Show file tree
Hide file tree
Changes from 45 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
e65df45
Added OpenAI Fundamentals to WTH home page AND linked to it from the …
jrzyshr Nov 7, 2023
b83d74b
added whitelist file for 002
jrzyshr Nov 7, 2023
3f6f298
Merge branch 'microsoft:master' into master
jrzyshr Nov 7, 2023
3973afb
Merge branch 'microsoft:master' into master
jrzyshr Dec 5, 2023
1b92a0a
Merge branch 'microsoft:master' into master
jrzyshr Dec 12, 2023
18e8550
Merge branch 'microsoft:master' into master
jrzyshr Jan 17, 2024
67c9f97
Merge branch 'microsoft:master' into master
jrzyshr Jan 23, 2024
b8115a8
Merge branch 'microsoft:master' into master
jrzyshr Feb 9, 2024
d69563f
Merge branch 'microsoft:master' into master
jrzyshr Feb 23, 2024
22142d3
Merge branch 'microsoft:master' into master
jrzyshr Feb 23, 2024
7bd80d5
Merge branch 'microsoft:master' into master
jrzyshr Mar 14, 2024
a8e4ac0
Merge branch 'microsoft:master' into master
jrzyshr Mar 15, 2024
d584855
Merge branch 'microsoft:master' into master
jrzyshr Mar 15, 2024
497b2d1
Merge branch 'microsoft:master' into master
jrzyshr Mar 27, 2024
d54c667
Merge branch 'microsoft:master' into master
jrzyshr Apr 11, 2024
67fd4b0
Update README.md
jrzyshr Apr 11, 2024
e372835
Merge pull request #68 from jrzyshr/jrzyshr-patch-1
jrzyshr Apr 11, 2024
be9dfdb
Merge branch 'microsoft:master' into master
jrzyshr Apr 11, 2024
c601045
Merge branch 'microsoft:master' into master
jrzyshr Apr 25, 2024
533cc5f
Merge branch 'microsoft:master' into master
jrzyshr Apr 25, 2024
2f96c05
Merge branch 'microsoft:master' into master
jrzyshr May 1, 2024
e7c48cf
Merge branch 'microsoft:master' into master
jrzyshr May 1, 2024
dc8e471
Merge branch 'microsoft:master' into master
jrzyshr May 8, 2024
c66b443
Update spellcheck.yml
jrzyshr May 13, 2024
9911956
Merge branch 'microsoft:master' into master
jrzyshr May 13, 2024
fea0bd2
Merge branch 'microsoft:master' into master
jrzyshr Oct 16, 2024
85b7891
Merge branch 'microsoft:master' into master
jrzyshr Jun 17, 2025
4333658
Merge branch 'microsoft:master' into master
jrzyshr Jun 17, 2025
d65eb96
Merge branch 'microsoft:master' into master
jrzyshr Jun 17, 2025
ff05773
Merge branch 'microsoft:master' into master
jrzyshr Aug 4, 2025
a2c9fbc
added top-level devcontainer files for 068 AI Apps hack
jrzyshr Aug 4, 2025
9b110d0
Revert "added top-level devcontainer files for 068 AI Apps hack"
jrzyshr Aug 4, 2025
e6fbd20
Merge branch 'microsoft:master' into master
jrzyshr Sep 5, 2025
a6a4d20
Merge branch 'microsoft:master' into master
jrzyshr Sep 16, 2025
3e11d5c
Merge branch 'microsoft:master' into master
jrzyshr Sep 22, 2025
5cc1294
Merge branch 'microsoft:master' into master
jrzyshr Oct 22, 2025
4478256
Merge branch 'microsoft:master' into master
jrzyshr Feb 26, 2026
9707aca
Merge branch 'microsoft:master' into master
jrzyshr Mar 25, 2026
130e329
Merge branch 'microsoft:master' into master
jrzyshr Apr 4, 2026
fc2af71
Merge branch 'microsoft:master' into master
jrzyshr Jun 16, 2026
eee15aa
Merge branch 'microsoft:master' into master
jrzyshr Jun 16, 2026
6e785dd
Add Codespace configuration option to Create New Hack action
jrzyshr Jun 16, 2026
19ad1d5
Keep .gitkeep in Student/Resources when codespace is included
jrzyshr Jun 16, 2026
4a56cb5
Update devcontainer template comments for dual-purpose use
jrzyshr Jun 16, 2026
828a0f8
Potential fix for pull request finding
jrzyshr Jun 16, 2026
d1c8644
Apply suggestions from code review
Whowong Jun 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/workflows/create-new-hack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
description: The number of challenges you want (note that it is better to auto-generate more challenges than you think you will need, you can always delete the files later)
required: true
default: '3'
includeCodespace:
description: Include a GitHub Codespace configuration?
Comment thread
Whowong marked this conversation as resolved.
Outdated
type: boolean
Comment thread
Whowong marked this conversation as resolved.
default: false
jobs:
createNewWhatTheHackTemplate:
runs-on: ubuntu-latest
Expand All @@ -27,10 +31,18 @@ jobs:
git config user.email "<>"
git checkout -b ${{ env.BRANCH_NAME }}
- name: Generate WhatTheHack template stubs
run: ${{ github.workspace }}/.github/workflows/create-wth-template.sh -p ${{ github.workspace }} -c ${{ github.event.inputs.numberOfChallenges}} -n ${{ github.event.inputs.hackName }} -v -d
run: |
CODESPACE_FLAG=""
if [ "${{ github.event.inputs.includeCodespace }}" = "true" ]; then
CODESPACE_FLAG="-s"
fi
${{ github.workspace }}/.github/workflows/create-wth-template.sh -p ${{ github.workspace }} -c ${{ github.event.inputs.numberOfChallenges}} -n ${{ github.event.inputs.hackName }} -v -d $CODESPACE_FLAG
- name: Push branch
run: |
git add *
if [ "${{ github.event.inputs.includeCodespace }}" = "true" ]; then
git add .devcontainer
fi
Comment thread
Whowong marked this conversation as resolved.
git commit -m 'Created WhatTheHack template stub'
git push -u origin ${{ env.BRANCH_NAME }}

54 changes: 52 additions & 2 deletions .github/workflows/create-wth-template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ IFS=$'\n\t'
declare -r templateDirectoryName="000-HowToHack"

Help() {
echo "Syntax: createWthTemplate [-c|d|h|n|p|v]"
echo "Syntax: createWthTemplate [-c|d|h|n|p|s|v]"
echo "options:"
echo "c How many challenges to stub out."
echo "d Delete existing directory with same name."
echo "h Print this Help."
echo "n Name of the new WhatTheHack. This must be a valid directory name"
echo "p Path to where to create new WhatTheHack directory."
echo "s Include GitHub Codespaces configuration."
echo "v Verbose mode."
echo
}
Expand Down Expand Up @@ -55,6 +56,49 @@ CreateDirectoryStructure() {
touch $rootPath/Student/Resources/.gitkeep
}

CreateCodespaceConfig() {
local -r templateFile="$pathToTemplateDirectory/devcontainerTEMPLATE.json"

if $verbosityArg; then
echo "Creating Codespace configuration for $wthDirectoryName..."
Comment thread
Whowong marked this conversation as resolved.
Outdated
fi
Comment thread
Whowong marked this conversation as resolved.

# Create the Student/Resources/.devcontainer directory
mkdir -p "$rootPath/Student/Resources/.devcontainer"

# Prepare the brief comment header for Action-created copies
local -r briefComment="// Customize this devcontainer.json with features and extensions for your hackathon.\n// See: https://containers.dev/implementors/json_reference/\n"
Comment on lines +69 to +70
Comment on lines +69 to +70

# Create Student/Resources copy: strip template instructions, update "name", leave workspace lines commented
sed -e '/TEMPLATE_INSTRUCTIONS_START/,/TEMPLATE_INSTRUCTIONS_END/d' \
-e "s/\"xxx-HackName\"/\"$wthDirectoryName\"/" \
Comment thread
Whowong marked this conversation as resolved.
Outdated
"$templateFile" | sed "1i\\
// Customize this devcontainer.json with features and extensions for your hackathon.\\
// See: https://containers.dev/implementors/json_reference/" \
> "$rootPath/Student/Resources/.devcontainer/devcontainer.json"

if $verbosityArg; then
echo "Created $rootPath/Student/Resources/.devcontainer/devcontainer.json"
fi

# Create root-level .devcontainer/xxx-HackName directory
mkdir -p "$pathArg/.devcontainer/$wthDirectoryName"

# Create root-level copy: strip template instructions, update "name", uncomment and populate workspace settings
sed -e '/TEMPLATE_INSTRUCTIONS_START/,/TEMPLATE_INSTRUCTIONS_END/d' \
-e "s/\"xxx-HackName\"/\"$wthDirectoryName\"/" \
-e "s|// \"workspaceFolder\": \"/workspace/XXX-HackathonName/Student/Resources\"|\"workspaceFolder\": \"/workspace/$wthDirectoryName/Student/Resources\"|" \
-e "s|// \"workspaceMount\": \"source=\${localWorkspaceFolder},target=/workspace,type=bind,consistency=cached\"|\"workspaceMount\": \"source=\${localWorkspaceFolder},target=/workspace,type=bind,consistency=cached\"|" \
Comment thread
Whowong marked this conversation as resolved.
Outdated
"$templateFile" | sed "1i\\
// Customize this devcontainer.json with features and extensions for your hackathon.\\
// See: https://containers.dev/implementors/json_reference/" \
> "$pathArg/.devcontainer/$wthDirectoryName/devcontainer.json"

if $verbosityArg; then
echo "Created $pathArg/.devcontainer/$wthDirectoryName/devcontainer.json"
fi
}

PreprocessTemplateFile() {
local -r pathToFile=$1

Expand Down Expand Up @@ -244,15 +288,17 @@ CreateChallengesAndSolutions() {
# Main program
declare verbosityArg=false
declare deleteExistingDirectoryArg=false
declare codespaceArg=false

while getopts ":c:dhn:p:v" option; do
while getopts ":c:dhn:p:sv" option; do
case $option in
c) numberOfChallengesArg=${OPTARG};;
d) deleteExistingDirectoryArg=true;;
h) Help
exit;;
n) nameOfHackArg=${OPTARG};;
p) pathArg=${OPTARG};;
s) codespaceArg=true;;
v) verbosityArg=true
esac
done
Expand All @@ -275,3 +321,7 @@ CreateDirectoryStructure $deleteExistingDirectoryArg
CreateHackDescription $numberOfChallengesArg

CreateChallengesAndSolutions $numberOfChallengesArg

if $codespaceArg; then
CreateCodespaceConfig
fi
21 changes: 16 additions & 5 deletions 000-HowToHack/devcontainerTEMPLATE.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
// TEMPLATE_INSTRUCTIONS_START
// This is a template devcontainer.json for What The Hack hackathons.
// It provides a baseline configuration for GitHub Codespaces and VS Code Dev Containers.
//
// Instructions for hackathon authors:
// 1. Copy this file to your hack's .devcontainer folder as devcontainer.json
// 2. Uncomment and update "workspaceFolder" and "workspaceMount" with your hack's folder name
// 3. Add any additional features or extensions specific to your hackathon
//
// Instructions for hackathon authors adding Codespace support to an existing hack:
Comment thread
Whowong marked this conversation as resolved.
Outdated
// 1. Copy this file to the following two locations:
// a. Your hack's /Student/Resources/.devcontainer/ folder as devcontainer.json
// b. Under the root-level /.devcontainer/ folder, create a folder with the same
// name as your hack's folder (e.g., "xxx-HackName") and add a copy there.
// 2. In both copies, update the "name" field with your hack's folder name.
// 3. Only in the root-level /.devcontainer/xxx-HackName/ copy, uncomment and update
// "workspaceFolder" and "workspaceMount" with your hack's folder name.
// 4. Add any additional features or extensions specific to your hackathon.
// See: https://containers.dev/implementors/json_reference/
// TEMPLATE_INSTRUCTIONS_END
{
// TEMPLATE_INSTRUCTIONS_START
// Update "name" with your hack's number and name (e.g., "042-SAPOnAzure")
// TEMPLATE_INSTRUCTIONS_END
"name": "xxx-HackName",
"image": "mcr.microsoft.com/devcontainers/universal:2",
// TEMPLATE_INSTRUCTIONS_START
// Uncomment and update the following two properties with your hack's folder name:
// TEMPLATE_INSTRUCTIONS_END
// "workspaceFolder": "/workspace/XXX-HackathonName/Student/Resources",
// "workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=cached",
"hostRequirements": {
Expand Down