Skip to content

Commit

Permalink
!fixup: document NIXPKGS_REVIEW_PRE_BUILD_FILTER
Browse files Browse the repository at this point in the history
  • Loading branch information
rmcgibbo committed Jun 6, 2021
1 parent 7c07e78 commit da07d63
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,23 @@ $ nixpkgs-review pr --skip-packages-regex 'linux_.*' 51292
`-p`, `-P`, `--package-regex` and `--skip-package-regex` can be used together, in which case
the matching packages will merged.

<<<<<<< HEAD
Full documentation for regex matching syntax can be found
[here](https://docs.python.org/3/library/re.html#regular-expression-syntax).
=======
## Filter plugins

After `nixpkgs-review` evaluates the set of changed packages but before it performs a build, it
can interact with a set of plugins that can modify the set of packages. Such plugins should
register themselves by setting the environment variable `NIXPKGS_REVIEW_PRE_BUILD_FILTER` to
a colon-separated list of executables. Each executable called in order and piped a JSON
structure containing `nixpkgs-review`'s internal representation of the package set, can modify
it arbitrarily, and should return a new copy of the same JSON structure back on stdout.

Note: this interface is UNSTABLE and we make NO BACKWARD OR FORWARD COMPATIBILITY PROMISES
about the structure of the JSON between versions of nixpkgs-review.

>>>>>>> ea1f67e (!fixup: document NIXPKGS_REVIEW_PRE_BUILD_FILTER)
## Running tests

Expand Down
2 changes: 2 additions & 0 deletions nixpkgs_review/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ def upload_build_logs(self, github_client: GithubClient, pr: Optional[int]) -> N
)
pkg.log_url = gist["html_url"]
except urllib.error.HTTPError:
# This is possible due to rate-limiting or a failure of that sort.
# It should not be fatal.
traceback.print_exc(file=sys.stderr)
else:
print(f"Log content for {pkg} was empty", file=sys.stderr)
Expand Down

0 comments on commit da07d63

Please sign in to comment.