Skip to content

Commit

Permalink
Resolved conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
varunvaatsalya committed Oct 4, 2024
1 parent d1c0889 commit 358b9a3
Show file tree
Hide file tree
Showing 22 changed files with 638 additions and 160 deletions.
23 changes: 23 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## Description
Please provide a brief summary of the changes made in this pull request. Include any relevant context or background information.

## Related Issue
Link to the issue this PR addresses (if applicable):
- Fixes #[issue number]

## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Other (please describe):

## Checklist
- [ ] I have read the contributing guidelines.
- [ ] I have followed the code style of this project.
- [ ] My code implements the changes requested in the issue.
- [ ] I have added tests to cover my changes (if applicable).
- [ ] I have updated the documentation (if necessary).
- [ ] This PR is ready for review.

## Additional Notes
Any other information that reviewers should know about this PR.
92 changes: 92 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL Advanced"

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '24 10 * * 6'

jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: javascript-typescript
build-mode: none
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
64 changes: 64 additions & 0 deletions .github/workflows/discord-notification.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Discord Notifications

on:
issues:
types: [opened, closed, reopened]
pull_request:
types: [opened, closed, reopened, merged]
push:
branches:
- main # You can specify other branches as well

jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Send Discord Notification
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} # Set your webhook URL in repo secrets
run: |
DISCORD_MESSAGE="🔔 **GitHub Event Notification** 🔔\n"
DISCORD_MESSAGE+="---------------------------------------------\n"
DISCORD_MESSAGE+="**Event Type**: ${GITHUB_EVENT_NAME}\n"
DISCORD_MESSAGE+="**Repository**: [${GITHUB_REPOSITORY}](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY})\n"
DISCORD_MESSAGE+="**Triggered by**: ${GITHUB_ACTOR}\n"
DISCORD_MESSAGE+="**Timestamp**: $(date)\n"
DISCORD_MESSAGE+="---------------------------------------------\n"
# Handle pull request events
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
PR_TITLE=$(jq -r '.pull_request.title' "${GITHUB_EVENT_PATH}")
PR_NUMBER=$(jq -r '.pull_request.number' "${GITHUB_EVENT_PATH}")
PR_URL=$(jq -r '.pull_request.html_url' "${GITHUB_EVENT_PATH}")
PR_BRANCH=$(jq -r '.pull_request.head.ref' "${GITHUB_EVENT_PATH}")
PR_ACTION=$(jq -r '.action' "${GITHUB_EVENT_PATH}")
DISCORD_MESSAGE+="🚀 **Pull Request** [#${PR_NUMBER} - ${PR_TITLE}](${PR_URL})\n"
DISCORD_MESSAGE+="**Action**: ${PR_ACTION}\n"
DISCORD_MESSAGE+="**Branch**: ${PR_BRANCH}\n"
fi
# Handle issue events
if [[ "${{ github.event_name }}" == "issues" ]]; then
ISSUE_TITLE=$(jq -r '.issue.title' "${GITHUB_EVENT_PATH}")
ISSUE_NUMBER=$(jq -r '.issue.number' "${GITHUB_EVENT_PATH}")
ISSUE_URL=$(jq -r '.issue.html_url' "${GITHUB_EVENT_PATH}")
ISSUE_ACTION=$(jq -r '.action' "${GITHUB_EVENT_PATH}")
DISCORD_MESSAGE+="📄 **Issue** [#${ISSUE_NUMBER} - ${ISSUE_TITLE}](${ISSUE_URL})\n"
DISCORD_MESSAGE+="**Action**: ${ISSUE_ACTION}\n"
fi
# Handle push events
if [[ "${{ github.event_name }}" == "push" ]]; then
COMMIT_MESSAGE=$(jq -r '.head_commit.message' "${GITHUB_EVENT_PATH}")
COMMIT_URL=$(jq -r '.head_commit.url' "${GITHUB_EVENT_PATH}")
PUSH_BRANCH=$(jq -r '.ref' "${GITHUB_EVENT_PATH}")
DISCORD_MESSAGE+="🛠️ **Push Event**\n"
DISCORD_MESSAGE+="**Branch**: ${PUSH_BRANCH}\n"
DISCORD_MESSAGE+="**Commit Message**: ${COMMIT_MESSAGE}\n"
DISCORD_MESSAGE+="🔗 [View Commit](${COMMIT_URL})\n"
fi
# Send the notification to Discord
curl -H "Content-Type: application/json" \
-d "{\"content\": \"$DISCORD_MESSAGE\"}" \
$DISCORD_WEBHOOK_URL
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
5. [Getting Started](#getting-started)
6. [FAQ](#faq)
7. [Contact](#contact)
8. [Code of Conduct](#code-of-conduct)
</details>
<hr>

Expand All @@ -39,7 +40,7 @@


## <div>
<h2><img src="https://raw.githubusercontent.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis/master/Emojis/Travel%20and%20places/High%20Voltage.png" alt="High Voltage" width="35" height="35" />Technologies Used</h2>
<h2><img src="https://raw.githubusercontent.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis/master/Emojis/Travel%20and%20places/High%20Voltage.png" alt="High Voltage" width="35" height="35" /> Technologies Used</h2>
</div>

- **Front-end:** HTML, CSS, JavaScript, Bootstrap for a responsive design.
Expand All @@ -50,7 +51,7 @@

<hr>

## :sparkles:Contributing
## Contributing

We welcome contributions from the open-source community! If you'd like to contribute:

Expand All @@ -59,6 +60,12 @@ We welcome contributions from the open-source community! If you'd like to contri
3. Commit your changes *(git commit -m 'Add some feature').*
4. Push to the branch *(git push origin feature/your-feature).*
5. Open a Pull Request.

To maintain quality and consistency, please adhere to the following guidelines:
1. Code Style: Follow the coding style used throughout the project. Clean, readable code with comments is always appreciated.
2. Commits: Write meaningful commit messages.
3. Pull Requests: Make sure PRs are focused, well-explained, and reference any issues they address.
4. Testing: Ensure that your changes are well-tested locally and don’t break existing functionality.

<hr>

Expand Down Expand Up @@ -167,7 +174,9 @@ For Queries and issue related question you can contact me on Discord

*Discord Username:* akshaypatell_

## 🪄Code of conduct

Want to be part of the community? Check out our **[Code of Conduct](https://github.com/VesperAkshay/qr-code-generator/blob/main/Code_Of_Conduct.md)**

<hr>
<div>
Expand Down
24 changes: 24 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"react": "^18.3.1",
"react-color": "^2.19.3",
"react-dom": "^18.3.1",
"react-hot-toast": "^2.4.1",
"react-icons": "^5.3.0",
"react-qr-code": "^2.0.15",
"react-router-dom": "^6.26.0",
Expand Down
5 changes: 4 additions & 1 deletion src/App.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useState } from "react";
import React from "react";
import { BrowserRouter as Router, Route, Routes } from "react-router-dom";
import Navbar from "./components/Navbar";
import Home from "./pages/Home";
Expand All @@ -16,6 +16,8 @@ import BulkQRCode from "./components/BulkQRCode";
import QRScanner from "./components/QRScanner";
import PdfQRCodeGenerator from "./components/PDFToQR";
import { ThemeProvider } from "./context/ThemeContext";
import { Toaster } from "react-hot-toast";

export default function App() {
return (
<AuthProvider>
Expand All @@ -39,6 +41,7 @@ export default function App() {
<Route path="/pdf-qr-code" element={<PdfQRCodeGenerator />} />
</Routes>
</div>
<Toaster />
</Router>
</ThemeProvider>
</AuthProvider>
Expand Down
8 changes: 4 additions & 4 deletions src/components/CategorySelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ export default function CategorySelector({ category, handleCategoryChange }) {
}}
>
<motion.div
className={`text-2xl mb-2 p-2 rounded-full ${
category === name ? 'bg-white text-blue-500' : 'bg-gray-200 text-gray-700'
className={`text-2xl mb-2 p-2 rounded-full bg-white${
category === name ? 'text-blue-500' : ' text-gray-700'
}`}
whileHover={{
scale: 1.25,
// scale: 1.25,
backgroundColor: category === name ? '#FFFFFF' : '#E5E7EB',
transition: { duration: 0.1 },
// transition: { duration: 0.1 },
}}
>
<FontAwesomeIcon icon={icon} />
Expand Down
Loading

0 comments on commit 358b9a3

Please sign in to comment.