Skip to content

Commit

Permalink
Merge branch 'Main' into Main
Browse files Browse the repository at this point in the history
  • Loading branch information
dhairyagothi authored Jun 17, 2024
2 parents 5591e72 + 2e01e93 commit afc9a19
Show file tree
Hide file tree
Showing 10 changed files with 880 additions and 19 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/auto-comment-on-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Auto Comment on Issue

on:
issues:
types: [opened]

permissions:
issues: write

jobs:
comment:
runs-on: ubuntu-latest

steps:
- name: Add Comment to Issue
run: |
COMMENT=$(cat <<EOF
{
"body": "Thank you for raising this issue! We'll look into it as soon as possible. Please ensure that the [issue](https://github.com/jfmartinz/ResourceHub/issues) is not duplicate, and you read [CONTRIBUUTING.md](https://github.com/jfmartinz/ResourceHub/blob/main/CONTRIBUTING.md#contributing-guidelines) carefully. Your contributions are highly appreciated! 😊"
}
EOF
)
RESPONSE=$(curl -s -o response.json -w "%{http_code}" \
-X POST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments \
-d "$COMMENT")
cat response.json
if [ "$RESPONSE" -ne 201 ]; then
echo "Failed to add comment"
exit 1
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36 changes: 36 additions & 0 deletions .github/workflows/autocomment-pr-raise.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Auto Comment on PR

on:
pull_request_target:
types: [opened]

permissions:
issues: write
pull-requests: write

jobs:
comment:
runs-on: ubuntu-latest

steps:
- name: Add Comment to Pull Request
run: |
COMMENT=$(cat <<EOF
{
"body": "Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. In the meantime, please ensure that your changes align with our [CONTRIBUTING.md](https://github.com/your-repo/your-project/blob/main/CONTRIBUTING.md). If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊"
}
EOF
)
RESPONSE=$(curl -s -o response.json -w "%{http_code}" \
-X POST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments \
-d "$COMMENT")
cat response.json
if [ "$RESPONSE" -ne 201 ]; then
echo "Failed to add comment"
exit 1
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39 changes: 39 additions & 0 deletions .github/workflows/autocomment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Auto Comment on PR Merge

on:
pull_request_target:
types: [closed]

permissions:
issues: write
pull-requests: write

jobs:
comment:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: Add Comment to Merged PR
run: |
COMMENT=$(cat <<EOF
{
"body": "🎉 Your pull request has been successfully merged! 🎉 Thank you for your valuable contribution to our project. Your efforts are greatly appreciated. Feel free to reach out if you have any more contributions or if there's anything else we can assist you with. Keep up the fantastic work! 🚀"
}
EOF
)
RESPONSE=$(curl -s -o response.json -w "%{http_code}" \
-X POST \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
-H "Content-Type: application/json" \
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments \
-d "$COMMENT")
cat response.json
if [ "$RESPONSE" -ne 201 ]; then
echo "Failed to add comment"
exit 1
fi
19 changes: 0 additions & 19 deletions .github/workflows/greetings.yaml

This file was deleted.

Binary file added public/Maze-Game-main/home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 51 additions & 0 deletions public/Maze-Game-main/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Maze</title>
<link rel="stylesheet" href="./style.css">
</head>
<body>

<div id="page">

<div id="Message-Container">
<div id="message">
<h1>Congratulations!</h1>
<p>You are done.</p>
<p id="moves"></p>
<input id="okBtn" type="button" onclick="toggleVisablity('Message-Container')" value="Cool!" />
</div>
</div>

<br>
<div id="menu">
<div class="custom-select">
<select id="diffSelect">
<option value="10">Easy</option>
<option value="15">Medium</option>
<option value="25">Hard</option>
<option value="38">Extreme</option>
</select>
</div>
<input id="startMazeBtn" type="button" onclick="makeMaze()" value="Start" />
</div>

<div id="view">
<div id="mazeContainer">
<canvas id="mazeCanvas" class="border" height="1100" width="1100"></canvas>
</div>
</div>

<p id="instructions">Use arrow keys to move the key to the house!</p>

</div>

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery.touchswipe/1.6.18/jquery.touchSwipe.min.js"></script>

<script src="./script.js"></script>
</body>
</html>
Binary file added public/Maze-Game-main/key.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit afc9a19

Please sign in to comment.