Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ For complete documentation, see [Read the Docs](https://phabfive.readthedocs.io/
# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh

Configure in Linux:
# Install phabfive
uv tool install phabfive

Expand All @@ -30,6 +31,34 @@ uv venv
uv pip install phabfive
```

Configure in Windows:

Phabfive looks for configuration in the following sequence in Windows environment:

```Commnad prompt
%ALLUSERSPROFILE%\phabfive\phabfive.yaml
%ALLUSERSPROFILE%\phabfive\phabfive.d\*.yaml
%LOCALAPPDATA%\phabfive\phabfive.yaml
%LOCALAPPDATA%\phabfive\phabfive.d\*.yaml
```

Make sure there is a minimum phabfive.yaml store in one of the location
e.g.
```Commnad prompt
echo "PHAB_TOKEN: cli-ABC123" > %LOCALAPPDATA%\phabfive\phabfive.yaml
```

Additionally, due to connection to Phabricator server on HTTPS requires certificate verification, it is also recommended to install [pip_system_certs](https://pypi.org/project/pip-system-certs/) to ensure system store are linked to python.

```Commnad prompt
pip install pip_system_certs
```

Usage:

```bash
phabfive passphrase K123
phabfive --log-level=DEBUG user whoami
**Install the latest development version:**
```bash
# Install from git to get unreleased features and fixes
Expand Down
16 changes: 14 additions & 2 deletions phabfive/maniphest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2144,15 +2144,27 @@ def create_from_config(self, config_file, dry_run=False):
root_data = yaml_loader.load(stream)

# Fetch all users in phabricator, used by subscribers mapping later
users_query = self.phab.user.search()
users_query = raw_data = self.phab.user.search()

while (len(raw_data.data) >= 100 and not raw_data.cursor["after"] is None):
raw_data = self.phab.user.search(after=raw_data.cursor["after"])
users_query.data.extend(raw_data.data)
log.debug(users_query)

username_to_id_mapping = {
user["fields"]["username"]: user["phid"] for user in users_query["data"]
}

log.debug(username_to_id_mapping)

# Fetch all projects in phabricator, used to map ticket -> projects later
projects_query = self.phab.project.search(constraints={"name": ""})
projects_query = raw_data = self.phab.project.search(constraints={"name": ""})

while (len(raw_data.data) >= 100 and not raw_data.cursor["after"] is None):
raw_data = self.phab.project.search(constraints={"name": ""},after=raw_data.cursor["after"])
projects_query.data.extend(raw_data.data)
log.debug(projects_query)

project_name_to_id_map = {
project["fields"]["name"]: project["phid"]
for project in projects_query["data"]
Expand Down