top of page
hand-businesswoman-touching-hand-artificial-intelligence-meaning-technology-connection-go-

Integrate GitHub with Postman App

In this blog, we’ll look at how to integrate Github with postman app using a integration option that is available in postman app. The postman version 10 and later supports Git integration through the API builder. Before jumping into integration lets see what is Postman and Git.

Introduction to postman:

Postman is a popular API (Application Programming Interface) development and testing tool used by developers to build, test, and document APIs. It offers a user-friendly interface to send requests, receive responses, and automate API testing.

Key Features of Postman

  1. User-Friendly Interface: Postman provides an intuitive interface that makes it easy to construct HTTP requests and read responses.

  2. Request Building: You can create and save complex HTTP requests. Postman supports various types of requests like GET, POST, PUT, DELETE, etc.

  3. Environment Variables: You can define variables for different environments (development, testing, production), making it easy to switch contexts.

  4. Collections: Organize your requests into collections for better management and reusability. Collections can be shared with your team using team workspace.

  5. Testing and Automation: Write test scripts using JavaScript to automate API testing. Postman allows you to run collections of requests in a sequence, making automated testing straightforward.

  6. API Documentation: Generate and publish API documentation directly from Postman, which helps in maintaining up-to-date API documentation.

  7. Mock Servers: Create mock servers to simulate API responses, useful for testing even when the backend is not fully developed.

  8. Collaboration: Postman supports team workspaces, allowing teams to collaborate on API development and testing in real-time.


Introduction to Git:

Git is a widely-used version control system that helps developers track changes in their code, collaborate with others, and manage project versions.

Key Concepts of Git

  1. Repository (Repo): A directory that contains your project files and the entire history of their changes. Repositories can be local (on your computer) or remote (hosted on platforms like GitHub, GitLab, or Bitbucket).

  2. Commit: A snapshot of your project at a specific point in time. Commits are used to record changes and can be referenced or reverted to.

  3. Branch: A separate line of development. The main branch in many repositories is called main or master. Branches allow you to work on different features or fixes independently.

  4. Merge: The process of integrating changes from one branch into another. This is commonly done to incorporate new features or bug fixes from feature branches into the main branch.

  5. Clone: Creating a local copy of a remote repository. This allows you to work on a project locally.

  6. Pull: Updating your local repository with changes from a remote repository.

  7. Push: Sending your local changes to a remote repository.

Steps to integrate Postman to Git:

  • Login to Github with your credentials. On the right side click blue logo with your name to navigate to the setting as shown below.



  • Click on the setting.



  • Click Developer settings



  • On the developer setting page click on "Personal access tokens" and select Token(classic).


  • On the Right side click Generate new token and select "Generate new token(classic)"


  • Give credential to generate a new token. In the New personal token access page give the note that describe the token name. Select the expiration and select scopes as per the requirement.


  • And click on generate token.



  • Token will be displayed in the green box. Copy and save it. You won't be able to see it again.


  • Note: If the token is lost or not saved you can regenerate the token.

Create a Repository in GitHub:

  • This step is optional. Either you can create a repository or use the existing repository to integrate.

To create a repository follow the below steps:

  • In the home page of Github click on New to create a new repository.


  • Provide the repository name and click the radio button to make it public or private. select other option as per the need and create the repository. This repository can be used in postman integration.



Postman Integration:

  • Login into the Postman app. Select Home-> Integration.



  • The integration page looks like below. Click on Browse all integrations.



  • Select GitHub from it.


  • Select Backup a collection. and Add integration.


  • In this page provide the token saved from Github and click Authenticate and proceed


  • In the Add integration page you will be able to see your github profile name after getting authenticated.

  • Now provide the nickname to identify the integration once created.

  • Select the workspace it can your "My workspace" or "Teams workspace".

  • Choose the collection that needs to be integrated.

  • Choose the repository that is in the github so that collection will be backed up.

  • Enter the Directory to push the collection in it(Optional).

  • Enter the filename this will be the name of the collection json file in the repo.

  • Finally choose the branch and click Add integration.



Conclusion - We now integrated postman with git and any changes done the postman collection will get updated in the repository without the need to push or pull. You can also create fork in your postman collection to push or pull your changes to the git.


62 views1 comment

1 Comment

Rated 0 out of 5 stars.
No ratings yet

Add a rating
Guest
Aug 22
Rated 5 out of 5 stars.

If you are a sports lover, you can play basket random. This is a game that helps you experience the top basketball matches.

Like
bottom of page