Skip to content

Commit 06e226a

Browse files
authored
Tweaks and restructure (#13)
1 parent 33b61f8 commit 06e226a

24 files changed

+156
-96
lines changed

.github/ISSUE_TEMPLATE/wg-join-leave.md .github/ISSUE_TEMPLATE/wg-0-join-leave.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,20 @@ to see more details on the different workgroups.
2121

2222
Please **add me** to the following workgroups:
2323
- [ ] [Organization][wg-organization] - _Organization level day-to-day tasks._
24-
- [ ] [Outreach][wg-outreach] - _Reaching out to where Team Open may help._
24+
- [ ] [Outreach][wg-outreach] - _Reaching out to places and people where Team Open may be of help._
2525
- [ ] [Lifeguard][wg-lifeguard] - _Development of the Lifeguard project itself._
2626
- [ ] [Lifeguard Devs][wg-lifeguard-devs] - _People who maintain OSS in the Lifeguard programe._
2727
- [ ] [Media][wg-media] - _(Social) media, publication and communication tasks._
2828

2929
Please **remove me** from the following workgroups:
3030
- [ ] All workgroups
3131
- [ ] [Organization][wg-organization] - _Organization level day-to-day tasks._
32-
- [ ] [Outreach][wg-outreach] - _Reaching out to where Team Open may help._
32+
- [ ] [Outreach][wg-outreach] - _Reaching out to places and people where Team Open may be of help._
3333
- [ ] [Lifeguard][wg-lifeguard] - _Development of the Lifeguard project itself._
3434
- [ ] [Lifeguard Devs][wg-lifeguard-devs] - _People who maintain OSS in the Lifeguard programe._
3535
- [ ] [Media][wg-media] - _(Social) media, publication and communication tasks._
3636

37+
## Additional comments
3738

3839
<!--
3940

.github/ISSUE_TEMPLATE/wg-organization.md .github/ISSUE_TEMPLATE/wg-1-wg-organization.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
name: 'Notify workgroup: Organization'
44
about: Organization level day-to-day tasks.
55
---
6-
7-
8-
<!-- Write your message above here -->
6+
<!-- Add your message here -->
97

108
Notification for `wg-organization`:
119
@Beanow @nothingismagick
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
---
22
# GENERATED FILE, DON'T EDIT
33
name: 'Notify workgroup: Outreach'
4-
about: Reaching out to where Team Open may help.
4+
about: Reaching out to places and people where Team Open may be of help.
55
---
6-
7-
8-
<!-- Write your message above here -->
6+
<!-- Add your message here -->
97

108
Notification for `wg-outreach`:
119
@Beanow @nothingismagick

.github/ISSUE_TEMPLATE/wg-lifeguard.md .github/ISSUE_TEMPLATE/wg-3-wg-lifeguard.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
name: 'Notify workgroup: Lifeguard'
44
about: Development of the Lifeguard project itself.
55
---
6-
7-
8-
<!-- Write your message above here -->
6+
<!-- Add your message here -->
97

108
Notification for `wg-lifeguard`:
119
@Beanow @nothingismagick

.github/ISSUE_TEMPLATE/wg-lifeguard-devs.md .github/ISSUE_TEMPLATE/wg-4-wg-lifeguard-devs.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
name: 'Notify workgroup: Lifeguard Devs'
44
about: People who maintain OSS in the Lifeguard programe.
55
---
6-
7-
8-
<!-- Write your message above here -->
6+
<!-- Add your message here -->
97

108
Notification for `wg-lifeguard-devs`:
119
@Beanow @nothingismagick

.github/ISSUE_TEMPLATE/wg-media.md .github/ISSUE_TEMPLATE/wg-5-wg-media.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
name: 'Notify workgroup: Media'
44
about: (Social) media, publication and communication tasks.
55
---
6-
7-
8-
<!-- Write your message above here -->
6+
<!-- Add your message here -->
97

108
Notification for `wg-media`:
119
@Beanow @nothingismagick

ABOUT.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# About workgroups
2+
3+
Workgroups are responsible for particular tasks within our community.
4+
By letting them be autonomous and responsible for their respective tasks there are two main benefits:
5+
6+
- Authority can be more decentralized.
7+
- Contributors can more easily help with the particular tasks they're interested in.
8+
9+
### Joining/leaving a workgroup
10+
11+
Workgroups are open to anyone. If you're interested, you can join by creating a new issue using
12+
the "Join workgroups" issue template.
13+
14+
Likewise you can leave whenever you like with the "Leave workgroups" issue template.
15+
16+
### Roles within a workgroup
17+
18+
As a first time member you'll likely be assigned a "trial" role first.
19+
Within a workgroup there can be different roles. Each workgroup can define these for themselves.
20+
21+
### Proposing new workgroups
22+
23+
The Governance and Guidance workgroup reviews proposals for new workgroups.
24+
There is no formalized process for this, so feel free to create an issue or reach out to one of the
25+
workgroup members.

README.md

+40-28
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,40 @@
1-
# Team Open workgroups
2-
3-
**[![Workgroups](badge.svg)](workgroups)**
4-
5-
Workgroups are responsible for particular tasks within our community.
6-
By letting them be autonomous and responsible for their respective tasks there are two main benefits:
7-
8-
- Authority can be more decentralized.
9-
- Contributors can more easily help with the particular tasks they're interested in.
10-
11-
### Joining/leaving a workgroup
12-
13-
Workgroups are open to anyone. If you're interested, you can join by creating a new issue using
14-
the "Join workgroups" issue template.
15-
16-
Likewise you can leave whenever you like with the "Leave workgroups" issue template.
17-
18-
### Roles within a workgroup
19-
20-
As a first time member you'll likely be assigned a "trial" role first.
21-
Within a workgroup there can be different roles. Each workgroup can define these for themselves.
22-
23-
### Proposing new workgroups
24-
25-
The Governance and Guidance workgroup reviews proposals for new workgroups.
26-
There is no formalized process for this, so feel free to create an issue or reach out to one of the
27-
workgroup members.
28-
1+
<!-- GENERATED FILE, DON'T EDIT -->
2+
# Team Open - Workgroup list
3+
4+
[![Get involved](get-involved.svg)](https://github.com/teamopen-dev/workgroups/issues/new?template=wg-join-leave.md&title=Would%20like%20to%20join)
5+
&nbsp; <sup>[More info on workgroups](ABOUT.md)</sup>
6+
7+
Title | Summary | Members
8+
-|-|-:
9+
[Organization][wg-organization]|Organization level day-to-day tasks.|2
10+
[Outreach][wg-outreach]|Reaching out to places and people where Team Open may be of help.|2
11+
[Lifeguard][wg-lifeguard]|Development of the Lifeguard project itself.|2
12+
[Lifeguard Devs][wg-lifeguard-devs]|People who maintain OSS in the Lifeguard programe.|2
13+
[Media][wg-media]|(Social) media, publication and communication tasks.|2
14+
15+
# List of roles
16+
17+
Workgroup | Role | Summary
18+
-|-|-
19+
[Organization][wg-organization]|`credentials`|People who handle login details / credentials for any part of the organization and share it with the appropriate other workgroups and members.
20+
[Organization][wg-organization]|`workgroups`|People who facilitate the operation of workgroups.
21+
[Organization][wg-organization]|`discord`|Have admin permissions for the Discord server.
22+
[Organization][wg-organization]|`github`|Have admin permissions for the GitHub organization.
23+
[Outreach][wg-outreach]|`hello`|People who manage the hello@... e-mail address.
24+
[Media][wg-media]|`twitter`|People who manage the Twitter account.
25+
[Media][wg-media]|`devto`|People who manage the dev.to account.
26+
27+
## Shared roles
28+
29+
Any workgroup has these roles.
30+
31+
Role | Summary
32+
-|-
33+
`trial`|New workgroup members who are in a trial period with limited permissions.
34+
35+
36+
[wg-organization]: workgroups/wg-organization.md
37+
[wg-outreach]: workgroups/wg-outreach.md
38+
[wg-lifeguard]: workgroups/wg-lifeguard.md
39+
[wg-lifeguard-devs]: workgroups/wg-lifeguard-devs.md
40+
[wg-media]: workgroups/wg-media.md

data/workgroups.yml

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
shared-roles:
22
- &role-trial
33
trial: >
4-
People who have newly joined a workgroup may be trial members initially
5-
before being given the permissions a regular workgroup member would have.
4+
New workgroup members who are in a trial period with limited permissions.
65
76
workgroups:
87
wg-organization:
@@ -18,13 +17,13 @@ workgroups:
1817
credentials: >
1918
People who handle login details / credentials for any part of the organization
2019
and share it with the appropriate other workgroups and members.
21-
workgroups: People who review applications for and generally facilitate the operation of workgroups.
20+
workgroups: People who facilitate the operation of workgroups.
2221
discord: Have admin permissions for the Discord server.
2322
github: Have admin permissions for the GitHub organization.
2423

2524
wg-outreach:
2625
title: Outreach
27-
subtitle: Reaching out to where Team Open may help.
26+
subtitle: Reaching out to places and people where Team Open may be of help.
2827
discord: "#wg-outreach"
2928
intro: |
3029
The Outreach workgroup looks for places where Team Open may offer help,
@@ -33,7 +32,7 @@ workgroups:
3332
**Join when** you are interested in connecting with the larger community.
3433
roles:
3534
<<: *role-trial
36-
hello: Handeling the hello@... e-mail address.
35+
hello: People who manage the hello@... e-mail address.
3736

3837
wg-lifeguard:
3938
title: Lifeguard

get-involved.svg

+10
Loading

scripts/env.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
'use strict';
22

3+
exports.ORG_TITLE = process.env.ORG_TITLE || 'Team Open';
4+
35
exports.WORKGROUPS_BASE_URL = process.env.WORKGROUPS_BASE_URL ||
46
'https://github.com/teamopen-dev/workgroups/tree/master/workgroups/';

scripts/loading.js

+9-3
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,18 @@ const populateWorkgroups = ({workgroups, members}) => {
4646
};
4747

4848
exports.loadData = () => {
49-
const workgroups = loadWorkgroups().workgroups;
50-
const members = loadMembers().members;
49+
const {workgroups, 'shared-roles': sharedRoles} = loadWorkgroups();
50+
const {members} = loadMembers();
51+
52+
// Workgroups don't know which members they have yet.
5153
const workgroupsWithMembers = populateWorkgroups({workgroups, members});
5254

55+
//Shared roles is an array of objects for easy yaml anchors.
56+
//Flatten those here.
57+
const sharedRolesMap = sharedRoles.reduce((map, role) => ({...map, ...role}), {});
5358
return {
5459
members,
55-
workgroups: workgroupsWithMembers
60+
sharedRoles: sharedRolesMap,
61+
workgroups: workgroupsWithMembers,
5662
};
5763
};

scripts/main.js

+13-9
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
const {loadData} = require('./loading');
44
const Templates = require('./templating');
5-
const {WORKGROUPS_BASE_URL} = require('./env');
5+
const {WORKGROUPS_BASE_URL, ORG_TITLE} = require('./env');
66
const {resolve: resolvePath, join: joinPath} = require('path');
77
const {sync: rimrafSync} = require('rimraf');
88
const {writeFileSync} = require('fs');
99
const badgen = require('badgen')
1010

11-
const {workgroups, members} = loadData();
11+
const {workgroups, members, sharedRoles} = loadData();
1212

1313
// Generates /workgroups
1414
const docsPath = resolvePath(__dirname, '../workgroups');
@@ -18,22 +18,26 @@ for(const key in workgroups) {
1818
const doc = Templates.workgroup(wg);
1919
writeFileSync(joinPath(docsPath, `${wg.key}.md`), doc);
2020
}
21-
writeFileSync(
22-
joinPath(docsPath, `README.md`),
23-
Templates.workgroupList(workgroups)
24-
);
2521

2622
// Generates /.github/ISSUE_TEMPLATE
2723
const templPath = resolvePath(__dirname, '../.github/ISSUE_TEMPLATE');
2824
rimrafSync(joinPath(templPath, 'wg-*'));
25+
writeFileSync(
26+
joinPath(templPath, `wg-0-join-leave.md`),
27+
Templates.joinLeaveWgIssue({workgroups, baseUrl: WORKGROUPS_BASE_URL})
28+
);
29+
let issueTemplateIndex = 1;
2930
for(const key in workgroups) {
3031
const wg = workgroups[key];
3132
const doc = Templates.notifyWgIssue(wg);
32-
writeFileSync(joinPath(templPath, `${wg.key}.md`), doc);
33+
writeFileSync(joinPath(templPath, `wg-${issueTemplateIndex}-${wg.key}.md`), doc);
34+
issueTemplateIndex++;
3335
}
36+
37+
// Generates /README.md
3438
writeFileSync(
35-
joinPath(templPath, `wg-join-leave.md`),
36-
Templates.joinLeaveWgIssue({workgroups, baseUrl: WORKGROUPS_BASE_URL})
39+
resolvePath(__dirname, `../README.md`),
40+
Templates.workgroupList({workgroups, sharedRoles, orgTitle: ORG_TITLE})
3741
);
3842

3943
// Generates /badge.svg

scripts/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"private": true,
44
"scripts": {
55
"generate": "node main.js",
6-
"add-generated": "git add :/badge.svg :/workgroups/* :/.github/ISSUE_TEMPLATE/wg-*"
6+
"add-generated": "git add :/README.md :/badge.svg :/workgroups/* :/.github/ISSUE_TEMPLATE/wg-*"
77
},
88
"dependencies": {
99
"badgen": "^2.8.2",

scripts/templates/join-leave-wg-issue.md.hbs

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Please **remove me** from the following workgroups:
3030
- [ ] [{{trim title}}][{{@key}}] - _{{trim subtitle}}_
3131
{{/each}}
3232

33+
## Additional comments
3334

3435
<!--
3536

scripts/templates/notify-wg-issue.md.hbs

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
name: 'Notify workgroup: {{title}}'
44
about: {{subtitle}}
55
---
6-
7-
8-
<!-- Write your message above here -->
6+
<!-- Add your message here -->
97

108
Notification for `{{key}}`:
119
{{#each members}}@{{member.username}} {{/each}}
+30-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,38 @@
11
<!-- GENERATED FILE, DON'T EDIT -->
2-
# Open Workgroups list
2+
# {{orgTitle}} - Workgroup list
3+
4+
[![Get involved](get-involved.svg)](https://github.com/teamopen-dev/workgroups/issues/new?template=wg-join-leave.md&title=Would%20like%20to%20join)
5+
&nbsp; <sup>[More info on workgroups](ABOUT.md)</sup>
36

47
Title | Summary | Members
58
-|-|-:
6-
{{#each this}}
9+
{{#each workgroups}}
710
[{{trim title}}][{{@key}}]|{{trim subtitle}}|{{members.length}}
811
{{/each}}
912

10-
{{#each this}}
11-
[{{@key}}]: {{@key}}.md
13+
# List of roles
14+
15+
Workgroup | Role | Summary
16+
-|-|-
17+
{{#each workgroups}}
18+
{{#each roles}}
19+
{{#unless (hasKey ../../sharedRoles @key)}}
20+
[{{trim ../title}}][{{@../key}}]|`{{@key}}`|{{trim this}}
21+
{{/unless}}
22+
{{/each}}
23+
{{/each}}
24+
25+
## Shared roles
26+
27+
Any workgroup has these roles.
28+
29+
Role | Summary
30+
-|-
31+
{{#each sharedRoles}}
32+
`{{@key}}`|{{trim this}}
33+
{{/each}}
34+
35+
36+
{{#each workgroups}}
37+
[{{@key}}]: workgroups/{{@key}}.md
1238
{{/each}}

scripts/templating.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ const mdMemberDisplay = member =>
1212
`${member.display} ([@${member.username}](https://github.com/${member.username}))` :
1313
`[@${member.username}](https://github.com/${member.username})`;
1414

15-
const trim = string => string.trim();
15+
const trim = string => (typeof string == 'string') && string.trim() || string;
1616
const join = (array, separator) => array.join(separator);
17+
const hasKey = (obj, key) => key in obj;
1718

1819
Handlebars.registerHelper('trim', trim);
1920
Handlebars.registerHelper('join', join);
21+
Handlebars.registerHelper('hasKey', hasKey);
2022
Handlebars.registerHelper('avatarFor', mdAvatarFor);
2123
Handlebars.registerHelper('memberDisplay', mdMemberDisplay);
2224

0 commit comments

Comments
 (0)