From 858eda48ea367cc2b341488585bb1c91ebf82b6d Mon Sep 17 00:00:00 2001 From: cswimr Date: Tue, 17 Dec 2024 10:21:14 -0500 Subject: [PATCH] Add automatic pull request labeling (#58) * remove empty block * first pass at pull request labeling * revert accidental fille change * support #59 * forgot a file * Update .github/labeler.yml Co-authored-by: smallketchup82 --------- Co-authored-by: smallketchup82 --- .github/labeler.yml | 53 ++++++++++++++++++++++ .github/workflows/pull-request-labeler.yml | 15 ++++++ layouts/_default/single.html | 8 ++-- 3 files changed, 72 insertions(+), 4 deletions(-) create mode 100644 .github/labeler.yml create mode 100644 .github/workflows/pull-request-labeler.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 00000000..078a45a8 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,53 @@ +site:content: + - changed-files: + - any-glob-to-any-file: content/** + +site:shortcodes: + - changed-files: + - any-glob-to-any-file: layouts/shortcodes/** + +site:partials: + - changed-files: + - any-glob-to-any-file: layouts/partials/** +#site:taxonomies: - needs us to do taxonomies first so we know how layouts look + +site:styling: + - changed-files: + - any-glob-to-any-file: "assets/css/**" + +site:platform: + - changed-files: + - any-glob-to-any-file: "**" + - all-globs-to-all-files: + [ + "!content/wiki/**", + "!layouts/partials/**", + "!layouts/shortcodes/**", + "!assets/css/**", + "!.github/**", + "!.husky/**", + "!.vscode/**", + "!.envrc", + "!pnpm-lock.yaml", + "!flake.nix", + "!flake.lock", + "!.prettierrc", + "!.prettierignore", + "!.markdownlint.json", + "!package.json", + ] + +site:tooling: + - changed-files: + - any-glob-to-any-file: + [ + ".github/**", + ".husky/**", + ".vscode/**", + ".envrc", + "flake.nix", + ".prettierrc", + ".prettierignore", + ".markdownlint.json", + "package.json", + ] diff --git a/.github/workflows/pull-request-labeler.yml b/.github/workflows/pull-request-labeler.yml new file mode 100644 index 00000000..f1318812 --- /dev/null +++ b/.github/workflows/pull-request-labeler.yml @@ -0,0 +1,15 @@ +name: Pull Request Labeler +on: + - pull_request_target + +jobs: + labeler: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - name: Label Pull Request + uses: actions/labeler@v5 + with: + sync-labels: true diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 729d2e91..0aca8b85 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -11,8 +11,8 @@ < Home Talk > -
-

{{ .Title }}

- {{ .Content }} -
+
+

{{ .Title }}

+ {{ .Content }} +
{{ end }}