Skip to content

Commit 70e6823

Browse files
Initial commit
0 parents  commit 70e6823

File tree

11 files changed

+2150
-0
lines changed

11 files changed

+2150
-0
lines changed

.eslintrc.cjs

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
module.exports = {
2+
"env": {
3+
"browser": true,
4+
"es2021": true
5+
},
6+
"overrides": [
7+
{
8+
"env": {
9+
"node": true
10+
},
11+
"files": [
12+
".eslintrc.{js,cjs}"
13+
],
14+
"parserOptions": {
15+
"sourceType": "script"
16+
}
17+
}
18+
],
19+
"parserOptions": {
20+
"ecmaVersion": "latest",
21+
"sourceType": "module"
22+
},
23+
"rules": {
24+
}
25+
}

.github/ISSUE_TEMPLATE/bug_report.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/level0.yml

+132
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
name: Poutine Level 0
2+
on:
3+
issues:
4+
types: [opened, edited]
5+
issue_comment:
6+
types: [created, edited]
7+
pull_request_target:
8+
types: [opened, synchronize]
9+
branches:
10+
- main
11+
pull_request:
12+
types: [closed]
13+
branches:
14+
- main
15+
16+
permissions: {}
17+
18+
concurrency:
19+
group: ${{ github.workflow }}
20+
cancel-in-progress: false
21+
22+
jobs:
23+
fries:
24+
runs-on: ubuntu-latest
25+
timeout-minutes: 1
26+
if: github.event_name == 'issues'
27+
permissions:
28+
id-token: write
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
FLAG_GRAVY_OVERFLOW_L0_FRIES: ${{ secrets.FLAG_GRAVY_OVERFLOW_L0_FRIES }}
32+
steps:
33+
- uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
34+
with:
35+
egress-policy: audit
36+
- name: Check for profanities in issue body
37+
id: check_profanities
38+
run: |
39+
echo "Checking issue body for profanities..."
40+
PROFANITIES_LIST="bad|disguting|horrible"
41+
if echo "${{ github.event.issue.body }}" | grep -qiE "$PROFANITIES_LIST"; then
42+
echo "Profanity detected in issue body. Please clean up the language."
43+
exit 1
44+
else
45+
echo "No profanities found in issue body."
46+
exit 0
47+
fi
48+
49+
cheddar:
50+
runs-on: ubuntu-latest
51+
timeout-minutes: 1
52+
if: github.event_name == 'issue_comment'
53+
permissions:
54+
id-token: write
55+
env:
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57+
FLAG_GRAVY_OVERFLOW_L0_CHEDDAR: ${{ secrets.FLAG_GRAVY_OVERFLOW_L0_CHEDDAR }}
58+
steps:
59+
- uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
60+
with:
61+
egress-policy: audit
62+
- name: Mini Chat Bot
63+
uses: actions/github-script@v5
64+
with:
65+
script: |
66+
const commentBody = "${{ github.event.comment.body }}";
67+
let response;
68+
if (commentBody.includes("hello")) {
69+
response = "Hello! How can I help you today?";
70+
} else if (commentBody.includes("help")) {
71+
response = "Sure, what do you need help with?";
72+
} else {
73+
response = "Sorry, I didn't understand that. Can you try again?";
74+
}
75+
76+
github.rest.issues.createComment({
77+
issue_number: context.payload.issue.number,
78+
owner: context.repo.owner,
79+
repo: context.repo.repo,
80+
body: response
81+
});
82+
83+
gravy:
84+
runs-on: ubuntu-latest
85+
timeout-minutes: 1
86+
if: github.event_name == 'pull_request_target'
87+
permissions:
88+
id-token: write
89+
env:
90+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
91+
FLAG_GRAVY_OVERFLOW_L0_GRAVY: ${{ secrets.FLAG_GRAVY_OVERFLOW_L0_GRAVY }}
92+
steps:
93+
- uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
94+
with:
95+
egress-policy: audit
96+
- name: Checkout PR code
97+
uses: actions/checkout@v4
98+
with:
99+
ref: ${{ github.event.pull_request.head.sha }}
100+
- name: Setup Node.js
101+
uses: actions/setup-node@v4
102+
with:
103+
node-version: 21
104+
- run: |
105+
npm install
106+
npm run lint
107+
npm start
108+
109+
toppings:
110+
runs-on: ubuntu-latest
111+
timeout-minutes: 1
112+
if: github.event_name == 'pull_request'
113+
permissions:
114+
id-token: write
115+
env:
116+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
117+
FLAG_GRAVY_OVERFLOW_L0_TOPPINGS: ${{ secrets.FLAG_GRAVY_OVERFLOW_L0_TOPPINGS }}
118+
steps:
119+
- uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
120+
with:
121+
egress-policy: audit
122+
- name: Checkout PR code
123+
uses: actions/checkout@v4
124+
with:
125+
ref: ${{ github.event.pull_request.head.sha }}
126+
- name: Setup Node.js
127+
uses: actions/setup-node@v4
128+
with:
129+
node-version: 21
130+
- run: |
131+
npm install
132+
npm run lint

.github/workflows/level1.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Poutine Level 1
2+
on:
3+
workflow_run:
4+
workflows: ["Poutine Level 0"]
5+
types:
6+
- completed
7+
8+
permissions: {}
9+
10+
concurrency:
11+
group: ${{ github.workflow }}
12+
cancel-in-progress: false
13+
14+
jobs:
15+
toppings-for-realz:
16+
runs-on: ubuntu-latest
17+
timeout-minutes: 1
18+
if: github.event_name == 'workflow_run' && github.event.workflow_run.event == 'pull_request'
19+
permissions:
20+
id-token: write
21+
contents: write
22+
pull-requests: write
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
FLAG_GRAVY_OVERFLOW_L1_TOPPINGS_FOR_REALZ: ${{ secrets.FLAG_GRAVY_OVERFLOW_L1_TOPPINGS_FOR_REALZ }}
26+
steps:
27+
- uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
28+
with:
29+
egress-policy: audit
30+
- name: Log test executions
31+
run: |
32+
echo "Lint ran for branch ${{ github.event.workflow_run.head_branch }} in a PR from ${{ github.actor }}. Please check the logs for more information."

.gitignore

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Logs
2+
logs
3+
*.log
4+
5+
# Dependency directories
6+
node_modules/
7+
8+
# Build files
9+
dist/
10+
build/
11+
12+
# Environment variables
13+
.env
14+
15+
# IDE files
16+
.vscode/
17+
.idea/
18+
19+
# OS generated files
20+
.DS_Store
21+
Thumbs.db

0 commit comments

Comments
 (0)