{"id":15293460,"url":"https://github.com/dhruv1397/prm","last_synced_at":"2025-04-13T13:31:44.828Z","repository":{"id":256831724,"uuid":"856562297","full_name":"dhruv1397/prm","owner":"dhruv1397","description":"Pull Request Monitor (prm) is a CLI tool for listing pull requests from different Source Code Management (SCM) providers.","archived":false,"fork":false,"pushed_at":"2024-10-04T08:15:50.000Z","size":100,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T04:51:24.049Z","etag":null,"topics":["github","harness","pull-requests"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dhruv1397.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-12T19:38:16.000Z","updated_at":"2025-02-26T04:01:55.000Z","dependencies_parsed_at":"2024-09-17T00:45:05.136Z","dependency_job_id":"533c0c6c-5de9-48d6-8825-c7b0f2a195db","html_url":"https://github.com/dhruv1397/prm","commit_stats":null,"previous_names":["dhruv1397/pr-monitor","dhruv1397/prm"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhruv1397%2Fprm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhruv1397%2Fprm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhruv1397%2Fprm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhruv1397%2Fprm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dhruv1397","download_url":"https://codeload.github.com/dhruv1397/prm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248721129,"owners_count":21151050,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github","harness","pull-requests"],"created_at":"2024-09-30T16:48:49.379Z","updated_at":"2025-04-13T13:31:39.820Z","avatar_url":"https://github.com/dhruv1397.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# prm (Pull Request Monitor)\n`prm` is a lightweight command-line tool designed to help developers track their pull requests across multiple repositories and Source Code Management (SCM) providers effortlessly.\n\n## Highlights\n- **Simple Setup:** Provide minimal information about the SCM provider, and `prm` automatically fetches all your repositories.\n- **Fast Performance:** Fetch all your PRs, even if there are hundreds, in just a couple of seconds.\n- **Supports JSON \u0026 YAML:** Output your data in JSON or YAML for easy integration with other tools.\n- **Secure:** All data stays on your local machine, ensuring privacy. You can purge any locally persisted data with a single command.\n\n## What Are Source Code Management Providers?\nA Source Code Management (SCM) provider is any software solution that allows you to host Git repositories, such as GitHub, Harness, GitLab, etc.\n\n### Supported SCM Providers\n- **GitHub**\n- **Harness**\n\n## Requirements\nFor any SCM provider you want to use, you need to have the following:\n- **Host URL:** The base URL of that provider (e.g., `https://github.com` for GitHub or `https://app.harness.io` for Harness). It can be a cloud service or a self-managed instance, as long as it is accessible from your machine.\n- **PAT:** The Personal Access Token (PAT) is a secure way to authenticate with your SCM provider. It allows `prm` to access details like user information, pull requests, and reviewers.\n\n## Installation\n### Using the installation script\n#### Installing the latest version\nYou can run the following command to download the installation script and install `prm`. It detects the OS and Arch of your laptop and downloads the latest release of the corresponding binary file.\n```bash\ncurl -L https://raw.githubusercontent.com/dhruv1397/prm/main/install.sh | bash\n```\n\u003cimg width=\"1430\" alt=\"installation\" src=\"https://github.com/user-attachments/assets/c278377b-9d8a-45f9-afdc-24d8b75cfad7\"\u003e\n\n#### Installing a specific version\nTo install a specific version, replace target_version with the version number you'd like to install:\n```bash\ncurl -L https://raw.githubusercontent.com/dhruv1397/prm/main/install.sh | bash -s -- target_version\n```\n### Downloading the binary manually\nYou can download the binary directly from the release page, make it executable and add it to the PATH.\n\n## Usage\n\u003e All flags support shorthands ie -t for --type, -o for --output, -s for --state, -n for --name, etc.\n### 1. Adding a SCM provider\n\u003e 1 SCM provider refers to the group of all the repos which can be accessed by a single PAT.\n\n- Github\n```bash\nprm add provider my-github --type github --host https://github.com\n```\n- Harness\n```bash\nprm add provider harness-smp --type harness --host https://smp.harness.com\n```\nAfter this you will be prompted to enter your PAT.\n\n\u003cimg width=\"1430\" alt=\"add provider\" src=\"https://github.com/user-attachments/assets/b799040b-0e75-4509-b630-36ea87b748cc\"\u003e\n\n### 2. Monitoring your PRs\nYou are ready to start monitoring your PRs.\nTo list all the PRs ie open, closed, merged\n```bash\nprm list prs --state all\n```\nTo list the open PRs\n```bash\nprm list prs --state open\n```\n\u003cimg width=\"1400\" alt=\"list pr\" src=\"https://github.com/user-attachments/assets/2dbf978a-c2f1-40d9-a43f-ef9a18d3b717\"\u003e\n\nYou can filter the PRs further by provider type (--type) and provider name (--name).\n#### Changing the output format\nYou can change the default format from table to json or yaml. \\\njson\n```bash\nprm list prs --output json\n```\nyaml\n```bash\nprm list prs --output yaml\n```\n\u003cimg width=\"1400\" alt=\"yaml-json\" src=\"https://github.com/user-attachments/assets/15bc2704-0747-4315-bdde-69410e996117\"\u003e\n\n### 3. List your SCM providers\nYou can check what all SCM providers have been configured.\n```bash\nprm list providers \n```\n\u003cimg width=\"1400\" alt=\"list providers\" src=\"https://github.com/user-attachments/assets/f9ba761f-5f25-41db-abbe-511868ead4c3\"\u003e\n\nYou can filter by name and type.\n### 4. Removing an SCM provider\nTo remove a provider which is no longer needed or is out of date\n```bash\nprm remove provider my-work-github\n```\n\u003cimg width=\"1400\" alt=\"remove-provider\" src=\"https://github.com/user-attachments/assets/881c3334-c7f4-49b4-9f97-61b7e045a9d4\"\u003e\n\n### 5. Refreshing the SCM providers data\n\u003e This is applicable only to Harness.\nWhen you add a Harness SCM provider, `prm` fetches user and repo related data which it uses to fetch the PRs. This user and repo data is persisted in a file to reduce unnecessary calls during fetching the PRs. If any org, project or repo has been added or removed for the user, we need to refresh the `prm` config.\n```bash\nprm refresh providers\n```\nYou can filter by name and type.\n### 6. Purging all the SCM providers data saved by prm\nIf you wish to remove all the data persisted by `prm`\n```bash\nprm purge\n```\nYou will be prompted for confirmation post running this command.\n\n\u003cimg width=\"1400\" alt=\"purge\" src=\"https://github.com/user-attachments/assets/229bb5d3-119a-411f-a5d1-d371e62c13dc\"\u003e\n\nOr you can force it\n```bash\nprm purge --force\n```\n\n## Uninstallation\nIf you want to uninstall prm, you can execute the following\n```bash\ncurl -L https://raw.githubusercontent.com/dhruv1397/prm/main/uninstall.sh | bash\n```\n\u003cimg width=\"1400\" alt=\"uninstall\" src=\"https://github.com/user-attachments/assets/7e7b50da-c1b1-42c8-925d-d921a1c1de69\"\u003e\n\n\n\u003e If `prm` was installed in a system directory like /usr/local/bin, you might need sudo to uninstall it\n\n## Security\nIt is important to be aware of what data is accessed by any tool to ensure there is no abuse.\nTo ensure your data is secure, `prm` does not share your data outside your setup.\nMoreover, it provides the `purge` command to delete all the data persisted by the app.\n\n## Supported configurations (OS/Arch)\n- linux/amd64\n- linux/arm64\n- darwin/amd64\n- darwin/arm64\n\nCheck your OS\n```bash\nuname -s | tr '[:upper:]' '[:lower:]'\n```\nCheck your Arch\n```bash\nuname -m\n```\n## References\n### Github\nScopes required for PAT: `read:org, repo`\n\nGenerate PAT (classic):\nhttps://docs.github.com/en/rest/authentication/authenticating-to-the-rest-api?apiVersion=2022-11-28#authenticating-with-a-personal-access-token \\\nhttps://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#personal-access-tokens-classic\n\nAPI:\nhttps://docs.github.com/en/rest?apiVersion=2022-11-28\n\n### Harness\nGenerate PAT:\nhttps://developer.harness.io/docs/platform/automation/api/add-and-manage-api-keys/#create-personal-api-keys-and-tokens\n\nAPI:\nhttps://apidocs.harness.io\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhruv1397%2Fprm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdhruv1397%2Fprm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhruv1397%2Fprm/lists"}