aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2026-03-07 22:41:56 +0000
committerWarner Losh <imp@FreeBSD.org>2026-03-07 23:33:10 +0000
commitecc11b1dbdc2ef933636e87da3c5c46b86d38b3b (patch)
tree7e42cc0bd16ba2b9a09921db3b120c95883b94d7
parent2c3403cb3af12087afcd06ec5e0ed581d8c408af (diff)
devel/ghpr: github pull request
Tool to help FreeBSD developers land github pull requests, initial version. Sponsored by: Netflix
-rw-r--r--devel/Makefile1
-rw-r--r--devel/ghpr/Makefile30
-rw-r--r--devel/ghpr/distinfo3
-rw-r--r--devel/ghpr/pkg-descr16
4 files changed, 50 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index 8b22f5a3695b..fb9937c11aea 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -833,6 +833,7 @@
SUBDIR += gh
SUBDIR += ghidra
SUBDIR += ghostie
+ SUBDIR += ghpr
SUBDIR += ghq
SUBDIR += ghub
SUBDIR += gilt
diff --git a/devel/ghpr/Makefile b/devel/ghpr/Makefile
new file mode 100644
index 000000000000..ae987c7e917e
--- /dev/null
+++ b/devel/ghpr/Makefile
@@ -0,0 +1,30 @@
+PORTNAME= ghpr
+DISTVERSIONPREFIX= v
+DISTVERSION= 1
+CATEGORIES= devel python
+
+MAINTAINER= imp@FreeBSD.org
+COMMENT= GitHub Pull Request landing tool for FreeBSD
+WWW= https://github.com/bsdimp/ghpr
+
+LICENSE= BSD2CLAUSE
+
+RUN_DEPENDS= gh:devel/gh \
+ git:devel/git
+
+USES= python:3.8+ shebangfix
+SHEBANG_GLOB= *.py
+USE_PYTHON= py3kplist
+
+USE_GITHUB= yes
+GH_ACCOUNT= bsdimp
+
+NO_ARCH= yes
+NO_BUILD= yes
+
+PLIST_FILES= bin/ghpr
+
+do-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/ghpr.py ${STAGEDIR}${PREFIX}/bin/ghpr
+
+.include <bsd.port.mk>
diff --git a/devel/ghpr/distinfo b/devel/ghpr/distinfo
new file mode 100644
index 000000000000..19d7169c97d4
--- /dev/null
+++ b/devel/ghpr/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1772906313
+SHA256 (bsdimp-ghpr-v1_GH0.tar.gz) = c75e7148f0cbe965c0c7c156b3359ce85dd9920959695bb94d55fbdbcacc9881
+SIZE (bsdimp-ghpr-v1_GH0.tar.gz) = 20765
diff --git a/devel/ghpr/pkg-descr b/devel/ghpr/pkg-descr
new file mode 100644
index 000000000000..8c4ca22497a4
--- /dev/null
+++ b/devel/ghpr/pkg-descr
@@ -0,0 +1,16 @@
+ghpr is a Python-based tool to land GitHub pull requests into FreeBSD
+repositories.
+
+It streamlines the process of integrating GitHub pull requests by combining
+PR initialization, staging, and pushing into a unified command-line interface.
+
+Key features:
+- Creates and maintains a dedicated staging branch for PR integration
+- Downloads PRs and rebases them with automatic conflict detection
+- Adds appropriate commit metadata (reviewer info and PR references)
+- Tracks PR status through GitHub labels ('staged' and 'merged')
+- Pushes changes upstream while automatically closing associated PRs
+- Supports dry-run mode and verbose output for debugging
+- Handles conflict resolution workflows
+
+Requires the GitHub CLI (gh) with configured authentication.