From 95518e940dccf71cceda2b83383beccea57e16e4 Mon Sep 17 00:00:00 2001 From: Monish Basaniwal Date: Thu, 6 Nov 2025 20:57:58 +0530 Subject: [PATCH 1/5] Create vectorguard.yml --- .github/workflows/vectorguard.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/vectorguard.yml diff --git a/.github/workflows/vectorguard.yml b/.github/workflows/vectorguard.yml new file mode 100644 index 0000000..7114135 --- /dev/null +++ b/.github/workflows/vectorguard.yml @@ -0,0 +1,21 @@ +name: Security PR Review +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + review: + permissions: + contents: read + pull-requests: write + issues: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: monizb/vectorguard-pr-scanner@v1 # Replace with your tag/version + with: + model: gemini-1.5-pro-latest + temperature: 0.2 + enable_inline: false + env: + GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} \ No newline at end of file From 1d4aa45c1c26642e8ab3fffdd9c735e7056ead68 Mon Sep 17 00:00:00 2001 From: Monish Basaniwal Date: Thu, 6 Nov 2025 20:59:12 +0530 Subject: [PATCH 2/5] Update vectorguard.yml --- .github/workflows/vectorguard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/vectorguard.yml b/.github/workflows/vectorguard.yml index 7114135..fdc51ed 100644 --- a/.github/workflows/vectorguard.yml +++ b/.github/workflows/vectorguard.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: monizb/vectorguard-pr-scanner@v1 # Replace with your tag/version + - uses: monizb/vectorguard-pr-scanner@main # Replace with your tag/version with: model: gemini-1.5-pro-latest temperature: 0.2 From 08e224744d66e798546514aa9fe859af3f71fd2d Mon Sep 17 00:00:00 2001 From: Monish Basaniwal Date: Thu, 6 Nov 2025 21:04:17 +0530 Subject: [PATCH 3/5] Update vectorguard.yml --- .github/workflows/vectorguard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/vectorguard.yml b/.github/workflows/vectorguard.yml index fdc51ed..6ed7c43 100644 --- a/.github/workflows/vectorguard.yml +++ b/.github/workflows/vectorguard.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v4 - uses: monizb/vectorguard-pr-scanner@main # Replace with your tag/version with: - model: gemini-1.5-pro-latest + model: gemini-flash-latest temperature: 0.2 enable_inline: false env: From 1c977837a847ead0f8c6f015de2aa5754af5fb96 Mon Sep 17 00:00:00 2001 From: Monish Basaniwal Date: Thu, 6 Nov 2025 21:55:56 +0530 Subject: [PATCH 4/5] Update vectorguard.yml --- .github/workflows/vectorguard.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/vectorguard.yml b/.github/workflows/vectorguard.yml index 6ed7c43..3b155f1 100644 --- a/.github/workflows/vectorguard.yml +++ b/.github/workflows/vectorguard.yml @@ -18,4 +18,5 @@ jobs: temperature: 0.2 enable_inline: false env: - GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} \ No newline at end of file + GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From ad5152ee891f4875c40ee1eeb1720252d0c96843 Mon Sep 17 00:00:00 2001 From: Monish Basaniwal Date: Thu, 6 Nov 2025 22:00:17 +0530 Subject: [PATCH 5/5] random changes --- src/App.js | 19 +++++++++++++++++++ src/selectors/selectors.js | 6 ++++++ 2 files changed, 25 insertions(+) diff --git a/src/App.js b/src/App.js index 483c5af..6290199 100755 --- a/src/App.js +++ b/src/App.js @@ -1,3 +1,21 @@ +// Random utility function +export function getRandomInt(max) { + return Math.floor(Math.random() * max); +} + +// New feature: Display random number on the app +import React, { useState } from 'react'; + +function RandomNumberFeature() { + const [number, setNumber] = useState(0); + return ( +
+

Random Number Feature

+

Number: {number}

+ +
+ ); +} import React from "react"; import { Route, Switch } from "react-router-dom"; @@ -33,6 +51,7 @@ function App(props) { + ); } diff --git a/src/selectors/selectors.js b/src/selectors/selectors.js index a473ec6..316a243 100644 --- a/src/selectors/selectors.js +++ b/src/selectors/selectors.js @@ -1,3 +1,9 @@ +// New selector utility: selectRandomUrl +export const selectRandomUrl = (state) => { + const urls = state.links && state.links.items ? state.links.items : []; + if (urls.length === 0) return null; + return urls[Math.floor(Math.random() * urls.length)]; +}; export const getFilteredLinks = (links, { text }) => { return links.filter((link) => { const textMatch =