| diff tools/codeowners.bzl tools/codeowners.bzl |
| index e6387a3..93a8cdd 100644 |
| --- tools/codeowners.bzl |
| +++ tools/codeowners.bzl |
| @@ -98,8 +98,7 @@ skip_empty_rows () { |
| grep -v -E '^$' |
| } |
| |
| -echo "# This file was generated by rules_codeowners / Bazel" >> "$OUTFILE" |
| -echo "# Don't edit it directly" >> "$OUTFILE" |
| +echo "_GENERATED_COMMENT_" >> "$OUTFILE" |
| echo "" >> "$OUTFILE" |
| |
| while [ "$#" -gt 0 ]; do |
| @@ -113,7 +112,7 @@ while [ "$#" -gt 0 ]; do |
| skip_empty_rows | \ |
| prevent_malicios_input "$must_have_prefix" >> "$OUTFILE" |
| done |
| - """, |
| + """.replace("_GENERATED_COMMENT_", ctx.attr.generated_comment), |
| ) |
| |
| generate_codeowners = rule( |
| @@ -122,6 +121,7 @@ generate_codeowners = rule( |
| Creates a GitHub-compatible CODEOWNERS file based on the `owners`. |
| """, |
| attrs = { |
| + "generated_comment": attr.string(default = "# This file was generated by rules_codeowners / Bazel\n# Don't edit it directly"), |
| "owners": attr.label_list(mandatory = True, doc = "A list of codeowners and generate_codeowners. One generate_codeowners can include another generate_codeonwers to effective acheive nested rules."), |
| }, |
| outputs = { |