This is a Node.js application that connects to the GitHub API, allowing users to log in with their GitHub accounts and verify if they have made a pull request (PR) to a specified repository. It also checks whether the PR has been merged by the repository owner.
- User authentication via GitHub OAuth
- Fetch user pull requests for a specified repository
- Check if a pull request has been merged
- Node.js and npm installed on your machine
- A GitHub account
- A registered GitHub OAuth application (with client ID and client secret)
git clone https://github.com/your-username/github-verifier.git
cd github-verifier- Install Dependencies
npm install- Configure Environment Variables Create a .env file in the root directory of the project and add your GitHub OAuth credentials:
GITHUB_CLIENT_ID=your-client-id
GITHUB_CLIENT_SECRET=your-client-secret
REDIRECT_URI=http://localhost:3000/auth/github/callback- Run the Application
node app.js- Authentication Flow
Visit http://localhost:3000/auth/github to log in with your GitHub account.
After successful authentication, you will receive an access token.