Skip to content
This repository was archived by the owner on Oct 25, 2022. It is now read-only.

Commit d2e3bb9

Browse files
committed
Ohai, world.
0 parents  commit d2e3bb9

11 files changed

Lines changed: 11707 additions & 0 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
package-lock.json

.prettierrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"printWidth": 120
3+
}

LICENSE

Lines changed: 373 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# mozilla-diagnosis-loadbalancer
2+
3+
A GitHub action assigning web-bugs in needsdiagnosis fairly accross Mozilla team members. Unless you're an administating member of Mozilla's Web Compatibility team, this repo isn't too interesting for you. :)
4+
5+
## Setup
6+
7+
In the `web-bugs` repo, a new GitHub Action workflow that runs on all issue's `milestoned` event needs to be set up. For that, create `.github/workflows/mozilla-diagnosis-loadbalancer.yml` with
8+
9+
```yml
10+
on:
11+
issues:
12+
types: [milestoned]
13+
14+
jobs:
15+
mozilla_diagnosis_loadbalancer:
16+
runs-on: ubuntu-latest
17+
name: Assign a Mozilla team member for diagnosis
18+
steps:
19+
- name: Assign Mozilla team member
20+
uses: webcompat/mozilla-diagnosis-loadbalancer@v1
21+
```
22+
23+
In addition, make sure the configuration file (see below) exists.
24+
25+
## Configuration
26+
27+
Configuration happens inside the `web-bugs` repo, in a file at `.github/mozilla-diagnosis-loadbalancer.yml`. Here's an example with all available flags:
28+
29+
```yml
30+
# Parameters for automatically assigning a Mozilla team member for issues in
31+
# need of diagnosis, see https://github.com/webcompat/mozilla-diagnosis-loadbalancer
32+
33+
# Allow-list of labels Mozilla team members can look at.
34+
actionable_labels:
35+
- browser-android-components
36+
- browser-fenix
37+
- browser-firefox
38+
- browser-firefox-esr
39+
- browser-firefox-focus
40+
- browser-firefox-ios
41+
- browser-firefox-mobile
42+
- browser-firefox-reality
43+
- browser-firefox-tablet
44+
- browser-focus-geckoview
45+
46+
# List of Mozilla diagnosis team members, along with their workload-weight
47+
# and diagnosis capabilities.
48+
diagnosers:
49+
- username: denschub
50+
weight: 125
51+
capabilities:
52+
- android
53+
- ios
54+
- virtual_reality
55+
- username: karlcow
56+
weight: 75
57+
capabilities:
58+
- android
59+
- ios
60+
- username: ksy36
61+
weight: 100
62+
capabilities:
63+
- android
64+
- ios
65+
- username: wisniewskit
66+
weight: 100
67+
capabilities:
68+
- android
69+
- virtual_reality
70+
71+
# A list of per-label capability filters to avoid assigning issues to team
72+
# members without required hardware to test. Each entry contains a list of
73+
# affected labels, as well as a list of required capabilities.
74+
capabilities_filter:
75+
- labels:
76+
- browser-android-components
77+
- browser-fenix
78+
- browser-firefox-focus
79+
- browser-firefox-mobile
80+
- browser-firefox-tablet
81+
- browser-focus-geckoview
82+
capability: android
83+
84+
- labels:
85+
- browser-firefox-ios
86+
capability: ios
87+
88+
- labels:
89+
- browser-firefox-reality
90+
capability: virtual_reality
91+
92+
# For debugging only: leave a comment instead of assignign issues.
93+
comment_instead_of_assigning: true
94+
```
95+
96+
## Development
97+
98+
All source files are located inside `src`. Since GitHub doesn't run `npm install` for actions, we can either always check in the `node_modules` directory, or have a dedicated build script. Since checking in the `node_modules` folder is a bit dirty, this repo uses `ncc` to build all dependencies into a single JS file.
99+
100+
After you changed sources and want to release a new version, run `npm run build`, which updates the files inside the `dist` folder. The GitHub action is set up to only look at the `dist/index.js`, so changes won't be in effect without that step.
101+
102+
## License
103+
104+
MPL-2.0.

action.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: "Mozilla Diagnosis Load-Balancer"
2+
description: "A GitHub action assigning web-bugs in needsdiagnosis fairly accross Mozilla team members."
3+
inputs:
4+
repo-token:
5+
description: "This repo's token"
6+
default: ${{ github.token }}
7+
required: false
8+
runs:
9+
using: "node12"
10+
main: "dist/index.js"

0 commit comments

Comments
 (0)