Details
- Reviewers
amckinley - Maniphest Tasks
- T13046: Surface repository pull logs in the web UI
- Commits
- rPa79bb55f3f6b: Support CSV, JSON, and tab-separated text as export formats
Exported pull logs in each format.
Diff Detail
- Repository
- rP Phabricator
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
src/applications/search/engine/PhabricatorApplicationSearchEngine.php | ||
---|---|---|
1457–1459 | This is just a placeholder for a future version of this function which might add a bunch more fields from extensions (subscribers, projects, etc). | |
src/infrastructure/export/PhabricatorTextExportFormat.php | ||
27–38 | This format is basically just "logfile", if you want to process it by piping grep to awk to perl or whatever. | |
32 | (This quotes special characters and backslashes.) |
src/infrastructure/export/PhabricatorIDExportField.php | ||
---|---|---|
4–10 | Shouldn't this just extend PhabricatorIntExportField? |
Maaaaybe, but I'm hesitant to put non-abstract, non-final classes in the class tree. There's nothing inherently bad about it, but I think it makes compatibility/extensions a bit muddier since it's less clear to third parties what they can safely extend from (see T795 for some very old, mostly obsolete discussion).
We could fix that with an Int abstract base and then make ID and Count final subclasses of that or something.
One material difference between the two fields is that large int values might make sense to render as "1,234,567" -- or with whatever the user's locale settings are -- while this doesn't make sense for IDs. That wouldn't prevent ID from subclassing Int, though. But if we do that, this field shouldn't actually be Int, except that HTTP exception codes don't go up to 1,000. (We'd probably never actually render that in text, I guess, but could do things like "set the excel format flag for the cell to 'number with commas' vs 'number without any commas'").
Since a total of like 3 lines of code are at stake here I'm just going to leave it like this (i.e., simplest class tree) for now.