phabricator

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangeID

type ChangeID struct {
	// Scheme captures the URI scheme. Always "phab" today; kept as a field so
	// the parsed form mirrors entity/change/github.ChangeID and so future variants
	// (e.g., a separate scheme per Phabricator install) are a non-breaking add.
	Scheme string
	// RevisionID is the numeric portion of the Phabricator revision identifier
	// (the digits after the leading "D"). For example, "D12345" parses to 12345.
	RevisionID int
	// DiffID is the numeric Phabricator diff identifier that pins a specific
	// uploaded patch version of the revision.
	DiffID int
}

ChangeID represents a parsed Phabricator change identifier. Format: phab://D{revision_id}/{diff_id}

Revision and diff are Phabricator's two-level identifier model:

  • RevisionID names the logical review (stable across updates, e.g., D12345).
  • DiffID names a specific uploaded patch version of that revision (increments on every "arc diff" update). It pins the change to an exact code state, analogous to GitHub's head commit SHA on a pull request.

func ParseChangeID

func ParseChangeID(raw string) (ChangeID, error)

ParseChangeID parses a raw change ID string into a ChangeID. Expected format: phab://D{revision_id}/{diff_id} The parser splits on "://" to separate scheme from path, then the path into exactly two segments: the D-prefixed revision and the diff ID.

func (ChangeID) Revision

func (c ChangeID) Revision() string

Revision returns the Phabricator revision identifier in its canonical D-prefixed string form (e.g., "D12345").

func (ChangeID) String

func (c ChangeID) String() string

String returns the string representation of the change ID.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL