Skip to content

Commit a588f8e

Browse files
authored
Merge branch 'main' into change-ascii-text-banner-format
2 parents 5eb5d0e + 7d7340c commit a588f8e

21 files changed

+262
-124
lines changed

.github/workflows/codeflash-optimize.yaml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
name: CodeFlash
22

33
on:
4+
# Use pull_request_target for everything to ensure access to secrets
45
pull_request_target:
56
paths:
6-
- "**"
7+
- '**' # Trigger for all paths
8+
79
workflow_dispatch:
810

911
concurrency:
@@ -29,18 +31,25 @@ jobs:
2931
fetch-depth: 0
3032
- name: Validate PR
3133
run: |
32-
# Checking for any workflow changes for security risks
33-
if git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep -q "^.github/workflows/"; then
34-
echo "Workflow changes detected."
34+
# Check for any workflow changes
35+
if git diff --name-only "${{ github.event.pull_request.base.sha }}" "${{ github.sha }}" | grep -q "^.github/workflows/"; then
36+
echo "⚠️ Workflow changes detected."
3537
36-
# Check if the PR author is allowed
38+
# Get the PR author
3739
AUTHOR="${{ github.event.pull_request.user.login }}"
38-
if [[ "$AUTHOR" != "misrasaurabh1" && "$AUTHOR" != "KRRT7" ]]; then
39-
echo "Unauthorized user ($AUTHOR) attempting to modify workflows. Exiting."
40-
exit 1
40+
echo "PR Author: $AUTHOR"
41+
42+
# Allowlist check
43+
if [[ "$AUTHOR" == "misrasaurabh1" || "$AUTHOR" == "KRRT7" ]]; then
44+
echo "✅ Authorized user ($AUTHOR). Proceeding."
45+
elif [[ "${{ github.event_name }}" == "pull_request_target" && "${{ github.event.pull_request.state }}" == "open" ]]; then
46+
echo "✅ PR triggered by 'pull_request_target' and is open. Assuming protection rules are in place. Proceeding."
4147
else
42-
echo "Authorized user ($AUTHOR). Proceeding."
48+
echo "⛔ Unauthorized user ($AUTHOR) attempting to modify workflows. Exiting."
49+
exit 1
4350
fi
51+
else
52+
echo "✅ No workflow file changes detected. Proceeding."
4453
fi
4554
4655
- name: 🐍 Set up Python 3.11 for CLI

.github/workflows/end-to-end-test-bubblesort-pytest-no-git.yaml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
name: end-to-end-test
22

33
on:
4+
# Use pull_request_target for everything to ensure access to secrets
45
pull_request_target:
6+
paths:
7+
- '**' # Trigger for all paths
8+
59
workflow_dispatch:
610

711
jobs:
@@ -24,18 +28,25 @@ jobs:
2428
token: ${{ secrets.GITHUB_TOKEN }}
2529
- name: Validate PR
2630
run: |
27-
# Checking for any workflow changes for security risks
28-
if git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep -q "^.github/workflows/"; then
29-
echo "Workflow changes detected."
31+
# Check for any workflow changes
32+
if git diff --name-only "${{ github.event.pull_request.base.sha }}" "${{ github.sha }}" | grep -q "^.github/workflows/"; then
33+
echo "⚠️ Workflow changes detected."
3034
31-
# Check if the PR author is allowed
35+
# Get the PR author
3236
AUTHOR="${{ github.event.pull_request.user.login }}"
33-
if [[ "$AUTHOR" != "misrasaurabh1" && "$AUTHOR" != "KRRT7" ]]; then
34-
echo "Unauthorized user ($AUTHOR) attempting to modify workflows. Exiting."
35-
exit 1
37+
echo "PR Author: $AUTHOR"
38+
39+
# Allowlist check
40+
if [[ "$AUTHOR" == "misrasaurabh1" || "$AUTHOR" == "KRRT7" ]]; then
41+
echo "✅ Authorized user ($AUTHOR). Proceeding."
42+
elif [[ "${{ github.event_name }}" == "pull_request_target" && "${{ github.event.pull_request.state }}" == "open" ]]; then
43+
echo "✅ PR triggered by 'pull_request_target' and is open. Assuming protection rules are in place. Proceeding."
3644
else
37-
echo "Authorized user ($AUTHOR). Proceeding."
45+
echo "⛔ Unauthorized user ($AUTHOR) attempting to modify workflows. Exiting."
46+
exit 1
3847
fi
48+
else
49+
echo "✅ No workflow file changes detected. Proceeding."
3950
fi
4051
4152
- name: Set up Python 3.11 for CLI

.github/workflows/end-to-end-test-bubblesort-unittest.yaml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
name: end-to-end-test
22

33
on:
4+
# Use pull_request_target for everything to ensure access to secrets
45
pull_request_target:
6+
paths:
7+
- '**' # Trigger for all paths
8+
59
workflow_dispatch:
610

711
jobs:
@@ -24,18 +28,25 @@ jobs:
2428
token: ${{ secrets.GITHUB_TOKEN }}
2529
- name: Validate PR
2630
run: |
27-
# Checking for any workflow changes for security risks
28-
if git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep -q "^.github/workflows/"; then
29-
echo "Workflow changes detected."
31+
# Check for any workflow changes
32+
if git diff --name-only "${{ github.event.pull_request.base.sha }}" "${{ github.sha }}" | grep -q "^.github/workflows/"; then
33+
echo "⚠️ Workflow changes detected."
3034
31-
# Check if the PR author is allowed
35+
# Get the PR author
3236
AUTHOR="${{ github.event.pull_request.user.login }}"
33-
if [[ "$AUTHOR" != "misrasaurabh1" && "$AUTHOR" != "KRRT7" ]]; then
34-
echo "Unauthorized user ($AUTHOR) attempting to modify workflows. Exiting."
35-
exit 1
37+
echo "PR Author: $AUTHOR"
38+
39+
# Allowlist check
40+
if [[ "$AUTHOR" == "misrasaurabh1" || "$AUTHOR" == "KRRT7" ]]; then
41+
echo "✅ Authorized user ($AUTHOR). Proceeding."
42+
elif [[ "${{ github.event_name }}" == "pull_request_target" && "${{ github.event.pull_request.state }}" == "open" ]]; then
43+
echo "✅ PR triggered by 'pull_request_target' and is open. Assuming protection rules are in place. Proceeding."
3644
else
37-
echo "Authorized user ($AUTHOR). Proceeding."
45+
echo "⛔ Unauthorized user ($AUTHOR) attempting to modify workflows. Exiting."
46+
exit 1
3847
fi
48+
else
49+
echo "✅ No workflow file changes detected. Proceeding."
3950
fi
4051
4152
- name: Set up Python 3.11 for CLI

.github/workflows/end-to-end-test-coverage.yaml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
name: Coverage E2E
22

33
on:
4+
# Use pull_request_target for everything to ensure access to secrets
45
pull_request_target:
6+
paths:
7+
- '**' # Trigger for all paths
8+
59
workflow_dispatch:
610

711
jobs:
@@ -22,18 +26,25 @@ jobs:
2226
token: ${{ secrets.GITHUB_TOKEN }}
2327
- name: Validate PR
2428
run: |
25-
# Checking for any workflow changes for security risks
26-
if git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep -q "^.github/workflows/"; then
27-
echo "Workflow changes detected."
29+
# Check for any workflow changes
30+
if git diff --name-only "${{ github.event.pull_request.base.sha }}" "${{ github.sha }}" | grep -q "^.github/workflows/"; then
31+
echo "⚠️ Workflow changes detected."
2832
29-
# Check if the PR author is allowed
33+
# Get the PR author
3034
AUTHOR="${{ github.event.pull_request.user.login }}"
31-
if [[ "$AUTHOR" != "misrasaurabh1" && "$AUTHOR" != "KRRT7" ]]; then
32-
echo "Unauthorized user ($AUTHOR) attempting to modify workflows. Exiting."
33-
exit 1
35+
echo "PR Author: $AUTHOR"
36+
37+
# Allowlist check
38+
if [[ "$AUTHOR" == "misrasaurabh1" || "$AUTHOR" == "KRRT7" ]]; then
39+
echo "✅ Authorized user ($AUTHOR). Proceeding."
40+
elif [[ "${{ github.event_name }}" == "pull_request_target" && "${{ github.event.pull_request.state }}" == "open" ]]; then
41+
echo "✅ PR triggered by 'pull_request_target' and is open. Assuming protection rules are in place. Proceeding."
3442
else
35-
echo "Authorized user ($AUTHOR). Proceeding."
43+
echo "⛔ Unauthorized user ($AUTHOR) attempting to modify workflows. Exiting."
44+
exit 1
3645
fi
46+
else
47+
echo "✅ No workflow file changes detected. Proceeding."
3748
fi
3849
3950
- name: Set up Python 3.11 for CLI

.github/workflows/end-to-end-test-futurehouse.yaml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
name: end-to-end-test
22

33
on:
4+
# Use pull_request_target for everything to ensure access to secrets
45
pull_request_target:
6+
paths:
7+
- '**' # Trigger for all paths
8+
59
workflow_dispatch:
610

711
jobs:
@@ -24,18 +28,25 @@ jobs:
2428
token: ${{ secrets.GITHUB_TOKEN }}
2529
- name: Validate PR
2630
run: |
27-
# Checking for any workflow changes for security risks
28-
if git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep -q "^.github/workflows/"; then
29-
echo "Workflow changes detected."
31+
# Check for any workflow changes
32+
if git diff --name-only "${{ github.event.pull_request.base.sha }}" "${{ github.sha }}" | grep -q "^.github/workflows/"; then
33+
echo "⚠️ Workflow changes detected."
3034
31-
# Check if the PR author is allowed
35+
# Get the PR author
3236
AUTHOR="${{ github.event.pull_request.user.login }}"
33-
if [[ "$AUTHOR" != "misrasaurabh1" && "$AUTHOR" != "KRRT7" ]]; then
34-
echo "Unauthorized user ($AUTHOR) attempting to modify workflows. Exiting."
35-
exit 1
37+
echo "PR Author: $AUTHOR"
38+
39+
# Allowlist check
40+
if [[ "$AUTHOR" == "misrasaurabh1" || "$AUTHOR" == "KRRT7" ]]; then
41+
echo "✅ Authorized user ($AUTHOR). Proceeding."
42+
elif [[ "${{ github.event_name }}" == "pull_request_target" && "${{ github.event.pull_request.state }}" == "open" ]]; then
43+
echo "✅ PR triggered by 'pull_request_target' and is open. Assuming protection rules are in place. Proceeding."
3644
else
37-
echo "Authorized user ($AUTHOR). Proceeding."
45+
echo "⛔ Unauthorized user ($AUTHOR) attempting to modify workflows. Exiting."
46+
exit 1
3847
fi
48+
else
49+
echo "✅ No workflow file changes detected. Proceeding."
3950
fi
4051
4152
- name: Set up Python 3.11 for CLI

.github/workflows/end-to-end-test-init-optim.yaml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
name: end-to-end-test
22

33
on:
4+
# Use pull_request_target for everything to ensure access to secrets
45
pull_request_target:
6+
paths:
7+
- '**' # Trigger for all paths
58
workflow_dispatch:
69

710
jobs:
@@ -24,18 +27,25 @@ jobs:
2427
token: ${{ secrets.GITHUB_TOKEN }}
2528
- name: Validate PR
2629
run: |
27-
# Checking for any workflow changes for security risks
28-
if git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep -q "^.github/workflows/"; then
29-
echo "Workflow changes detected."
30+
# Check for any workflow changes
31+
if git diff --name-only "${{ github.event.pull_request.base.sha }}" "${{ github.sha }}" | grep -q "^.github/workflows/"; then
32+
echo "⚠️ Workflow changes detected."
3033
31-
# Check if the PR author is allowed
34+
# Get the PR author
3235
AUTHOR="${{ github.event.pull_request.user.login }}"
33-
if [[ "$AUTHOR" != "misrasaurabh1" && "$AUTHOR" != "KRRT7" ]]; then
34-
echo "Unauthorized user ($AUTHOR) attempting to modify workflows. Exiting."
35-
exit 1
36+
echo "PR Author: $AUTHOR"
37+
38+
# Allowlist check
39+
if [[ "$AUTHOR" == "misrasaurabh1" || "$AUTHOR" == "KRRT7" ]]; then
40+
echo "✅ Authorized user ($AUTHOR). Proceeding."
41+
elif [[ "${{ github.event_name }}" == "pull_request_target" && "${{ github.event.pull_request.state }}" == "open" ]]; then
42+
echo "✅ PR triggered by 'pull_request_target' and is open. Assuming protection rules are in place. Proceeding."
3643
else
37-
echo "Authorized user ($AUTHOR). Proceeding."
44+
echo "⛔ Unauthorized user ($AUTHOR) attempting to modify workflows. Exiting."
45+
exit 1
3846
fi
47+
else
48+
echo "✅ No workflow file changes detected. Proceeding."
3949
fi
4050
4151
- name: Set up Python 3.11 for CLI

.github/workflows/end-to-end-test-tracer-replay.yaml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
name: end-to-end-test
22

33
on:
4+
# Use pull_request_target for everything to ensure access to secrets
45
pull_request_target:
6+
paths:
7+
- '**' # Trigger for all paths
58
workflow_dispatch:
69

710
jobs:
@@ -24,18 +27,25 @@ jobs:
2427
token: ${{ secrets.GITHUB_TOKEN }}
2528
- name: Validate PR
2629
run: |
27-
# Checking for any workflow changes for security risks
28-
if git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep -q "^.github/workflows/"; then
29-
echo "Workflow changes detected."
30+
# Check for any workflow changes
31+
if git diff --name-only "${{ github.event.pull_request.base.sha }}" "${{ github.sha }}" | grep -q "^.github/workflows/"; then
32+
echo "⚠️ Workflow changes detected."
3033
31-
# Check if the PR author is allowed
34+
# Get the PR author
3235
AUTHOR="${{ github.event.pull_request.user.login }}"
33-
if [[ "$AUTHOR" != "misrasaurabh1" && "$AUTHOR" != "KRRT7" ]]; then
34-
echo "Unauthorized user ($AUTHOR) attempting to modify workflows. Exiting."
35-
exit 1
36+
echo "PR Author: $AUTHOR"
37+
38+
# Allowlist check
39+
if [[ "$AUTHOR" == "misrasaurabh1" || "$AUTHOR" == "KRRT7" ]]; then
40+
echo "✅ Authorized user ($AUTHOR). Proceeding."
41+
elif [[ "${{ github.event_name }}" == "pull_request_target" && "${{ github.event.pull_request.state }}" == "open" ]]; then
42+
echo "✅ PR triggered by 'pull_request_target' and is open. Assuming protection rules are in place. Proceeding."
3643
else
37-
echo "Authorized user ($AUTHOR). Proceeding."
44+
echo "⛔ Unauthorized user ($AUTHOR) attempting to modify workflows. Exiting."
45+
exit 1
3846
fi
47+
else
48+
echo "✅ No workflow file changes detected. Proceeding."
3949
fi
4050
4151

.github/workflows/end-to-end-topological-sort-test.yaml

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
name: end-to-end-test
22

33
on:
4+
# Use pull_request_target for everything to ensure access to secrets
45
pull_request_target:
6+
paths:
7+
- '**' # Trigger for all paths
8+
59
workflow_dispatch:
610

711
jobs:
@@ -22,23 +26,26 @@ jobs:
2226
with:
2327
fetch-depth: 0
2428
token: ${{ secrets.GITHUB_TOKEN }}
25-
- name: Validate PR
26-
run: |
27-
# Checking for any workflow changes for security risks
28-
if git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep -q "^.github/workflows/"; then
29-
echo "Workflow changes detected."
3029

31-
# Check if the PR author is allowed
30+
- name: Validate PR for workflow changes
31+
run: |
32+
# Check for any workflow changes
33+
if git diff --name-only "${{ github.event.pull_request.base.sha }}" "${{ github.sha }}" | grep -q "^.github/workflows/"; then
34+
echo "⚠️ Workflow changes detected."
35+
# Get the PR author
3236
AUTHOR="${{ github.event.pull_request.user.login }}"
33-
if [[ "$AUTHOR" != "misrasaurabh1" && "$AUTHOR" != "KRRT7" ]]; then
34-
echo "Unauthorized user ($AUTHOR) attempting to modify workflows. Exiting."
35-
exit 1
37+
echo "PR Author: $AUTHOR"
38+
# Allowlist check
39+
if [[ "$AUTHOR" == "misrasaurabh1" || "$AUTHOR" == "KRRT7" ]]; then
40+
echo "✅ Authorized user ($AUTHOR). Proceeding."
41+
elif [[ "${{ github.event.pull_request.state }}" == "open" ]]; then
42+
echo "✅ PR is open. Assuming protection rules are in place. Proceeding."
3643
else
37-
echo "Authorized user ($AUTHOR). Proceeding."
44+
echo "⛔ Unauthorized user ($AUTHOR) attempting to modify workflows. Exiting."
45+
exit 1
3846
fi
39-
fiif git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep -q "end-to-end-topological-sort-test.yaml"; then
40-
echo "This workflow file has been modified. Exiting for security."
41-
exit 1
47+
else
48+
echo "✅ No workflow file changes detected. Proceeding."
4249
fi
4350
4451
- name: Set up Python 3.11 for CLI

0 commit comments

Comments
 (0)