Skip to content

Commit 1a2c6f1

Browse files
authored
ci: add labeler (#846)
Fixes #830
1 parent 8d7fb6e commit 1a2c6f1

File tree

3 files changed

+86
-0
lines changed

3 files changed

+86
-0
lines changed

.github/labeler.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Configuration for actions/labeler
2+
# Labels PRs based on changed files
3+
#
4+
# Proposal labels use the P- prefix to identify which WASI proposal is affected.
5+
# See CONTRIBUTING.md for documentation on label conventions.
6+
7+
# Proposal labels (P-)
8+
P-cli:
9+
- changed-files:
10+
- any-glob-to-any-file: 'proposals/cli/**'
11+
12+
P-clocks:
13+
- changed-files:
14+
- any-glob-to-any-file: 'proposals/clocks/**'
15+
16+
P-filesystem:
17+
- changed-files:
18+
- any-glob-to-any-file: 'proposals/filesystem/**'
19+
20+
P-http:
21+
- changed-files:
22+
- any-glob-to-any-file: 'proposals/http/**'
23+
24+
P-io:
25+
- changed-files:
26+
- any-glob-to-any-file: 'proposals/io/**'
27+
28+
P-random:
29+
- changed-files:
30+
- any-glob-to-any-file: 'proposals/random/**'
31+
32+
P-sockets:
33+
- changed-files:
34+
- any-glob-to-any-file: 'proposals/sockets/**'
35+
36+
# GitHub Actions label
37+
github_actions:
38+
- changed-files:
39+
- any-glob-to-any-file: '.github/**'
40+
41+
# Dependencies label (already exists, used by dependabot)
42+
dependencies:
43+
- changed-files:
44+
- any-glob-to-any-file:
45+
- '**/deps.toml'
46+
- '**/deps.lock'

.github/workflows/labeler.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Labeler
2+
3+
on:
4+
pull_request_target:
5+
6+
jobs:
7+
labeler:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
pull-requests: write
12+
13+
steps:
14+
- name: Apply labels
15+
uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1

CONTRIBUTING.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,31 @@ Interested in participating? Please follow
77

88
Also, please be sure to read [the README.md](README.md) for this repository.
99

10+
## Labels
11+
12+
This repository uses a categorized label system inspired by [the Rust project].
13+
Proposal labels use the `P-` prefix to identify which WASI proposal an issue or
14+
pull request relates to.
15+
16+
### Proposal Labels (P-)
17+
18+
| Label | Proposal |
19+
| ----- | -------- |
20+
| `P-cli` | [cli](proposals/cli/) |
21+
| `P-clocks` | [clocks](proposals/clocks/) |
22+
| `P-filesystem` | [filesystem](proposals/filesystem/) |
23+
| `P-http` | [http](proposals/http/) |
24+
| `P-io` | [io](proposals/io/) |
25+
| `P-random` | [random](proposals/random/) |
26+
| `P-sockets` | [sockets](proposals/sockets/) |
27+
28+
Pull requests that modify files in a proposal directory are automatically
29+
labeled by the [labeler workflow](.github/workflows/labeler.yml).
30+
31+
[the Rust project]: https://github.com/rust-lang/rust/labels
32+
33+
## Contributing to Proposals
34+
1035
To contribute to an [existing proposal](https://github.com/WebAssembly/WASI/blob/main/docs/Proposals.md),
1136
refer to the linked proposal repository.
1237

0 commit comments

Comments
 (0)