Skip to content

Commit

Permalink
Fix For Plagiarism
Browse files Browse the repository at this point in the history
  • Loading branch information
DevIos01 committed Dec 19, 2023
1 parent ca8f351 commit 3b30e11
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/check_plagiarism.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Plagiarism Checker

on:
pull_request:
pull_request_target:
paths:
- "games/**/*.js"

Expand All @@ -15,6 +15,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0

- name: Set up Python
Expand All @@ -28,15 +29,20 @@ jobs:
- name: Get list of changed files
id: changed-files
run: |
base_sha="${{ github.event.pull_request.base.sha }}"
head_sha="${{ github.event.pull_request.head.sha }}"
base_sha="${{ github.base_ref }}"
head_sha="${{ github.sha }}"
js_files=$(git diff --name-only --diff-filter=AM $base_sha..$head_sha | grep 'games/.*\.js$' | xargs)
echo "FILES=$js_files" >> $GITHUB_ENV
- name: Run Plagiarism Detection Script
env:
FILES: ${{ env.FILES }}
run: python .github/scripts/plagiarism_check.py $FILES games output_dir saved_dir
run: |
IFS=' ' read -ra FILES_ARRAY <<< "$FILES"
for FILE in "${FILES_ARRAY[@]}"; do
python .github/scripts/plagiarism_check.py "$FILE" games output_dir saved_dir
done
shell: /usr/bin/bash -e {0}

- name: Extract and Display Similarity Percentages
run: python .github/scripts/extract_percentages.py saved_dir/
Expand Down

1 comment on commit 3b30e11

@vercel
Copy link

@vercel vercel bot commented on 3b30e11 Dec 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

sprig – ./

sprig.vercel.app
sprig-git-main-gamer.vercel.app
sprig-gamer.vercel.app

Please sign in to comment.