Skip to content

Commit

Permalink
Add automatic pull request labeling (#58)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

---------

Co-authored-by: smallketchup82 <[email protected]>
  • Loading branch information
cswimr and smallketchup82 authored Dec 17, 2024
1 parent 9ac137b commit 858eda4
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 4 deletions.
53 changes: 53 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -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",
]
15 changes: 15 additions & 0 deletions .github/workflows/pull-request-labeler.yml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 4 additions & 4 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<a href="{{ .Site.BaseURL }}" class="block mt-4">< Home</a>
<a href="#" class="block mt-4">Talk ></a>
</div>
<article>
<h1 id="page-title">{{ .Title }}</h1>
{{ .Content }}
</article>
<article>
<h1 id="page-title">{{ .Title }}</h1>
{{ .Content }}
</article>
{{ end }}

0 comments on commit 858eda4

Please sign in to comment.