react app in first component call github via api using oktokit and search for a repo name inside org then in second component using the returned data with radio buttons for each repo name search inside each repo that has checked radio button for a given string via input form
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
It looks like you're trying to create a React app with two components. The first component will call GitHub API using Octokit and search for a repository name inside an organization. The second component will use the returned data with radio buttons for each repo name and search inside each selected repo for a given string via an input form.
Install Octokit and set up your GitHub access token
bash
npm install @octokit/rest
In your project, create an .env file and add your GitHub access token.
ini
REACT_APP_GITHUB_ACCESS_TOKEN=<your_access_token>
Create a new component, SearchRepo.js, inside your components folder
Inside this component, search for a repo inside an organization and pass the data to the second component.
Create a new component, SearchString.js, inside your components folder
Inside this component, display the radio buttons for each repo and search for the given string.