Skip to content

Commit b279962

Browse files
authored
Merge branch 'InnerSourceCommons:main' into main
2 parents ec12a8b + 11fea43 commit b279962

File tree

23 files changed

+257
-197
lines changed

23 files changed

+257
-197
lines changed

.github/workflows/gqm_update.yml

Lines changed: 32 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,38 @@ on:
33
push:
44
branches: [main]
55
paths:
6-
- 'measuring/goals/**'
7-
- 'measuring/questions/**'
8-
- 'measuring/metrics/**'
6+
- "measuring/goals/**"
7+
- "measuring/questions/**"
8+
- "measuring/metrics/**"
99

1010
workflow_dispatch:
1111
jobs:
12-
generateDiagram:
13-
name: Generate Diagram
14-
runs-on: ubuntu-latest
15-
steps:
16-
- name: Checkout
17-
uses: actions/checkout@v4
18-
- name: Use Node.js
19-
uses: actions/setup-node@v3
20-
with:
21-
node-version: '21.x'
22-
- run: npm install --prefix ./scripts/gqm_gen
23-
- run: npm run coverage-report --prefix ./scripts/gqm_gen
24-
- name: Report NYC coverage
25-
uses: sidx1024/[email protected]
26-
with:
27-
coverage_file: ".nyc_output/nyc-coverage-report/coverage-summary.json"
28-
- run: npm run --silent start --prefix ./scripts/gqm_gen > ./new_gqm.md.tmp
29-
- run: sh ./scripts/gqm_gen/gqm_update.sh ./new_gqm.md.tmp ./measuring/use_gqm.md > ./measuring/use_gqm.md.tmp
30-
- run: rm -f ./new_gqm.md.tmp
31-
- run: mv -f ./measuring/use_gqm.md.tmp ./measuring/use_gqm.md
32-
- run: sh ./scripts/gqm_gen/gqm_commit.sh
12+
generateDiagram:
13+
name: Generate Diagram
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
ssh-key: ${{ secrets.DEPLOY_KEY_SSH_PRIVATE_KEY }}
20+
- name: Use Node.js
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: "21.x"
24+
- run: npm install --prefix ./scripts/gqm_gen
25+
- run: npm run coverage-report --prefix ./scripts/gqm_gen
26+
- name: Report NYC coverage
27+
uses: sidx1024/[email protected]
28+
with:
29+
coverage_file: ".nyc_output/nyc-coverage-report/coverage-summary.json"
30+
- run: npm run --silent start --prefix ./scripts/gqm_gen > ./new_gqm.md.tmp
31+
- run: sh ./scripts/gqm_gen/gqm_update.sh ./new_gqm.md.tmp ./measuring/use_gqm.md > ./measuring/use_gqm.md.tmp
32+
- run: rm -f ./new_gqm.md.tmp
33+
- run: mv -f ./measuring/use_gqm.md.tmp ./measuring/use_gqm.md
34+
- name: Commit GQM Diagram
35+
working-directory: ./measuring
36+
run: |
37+
git config --local user.name "github-actions[bot]"
38+
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
39+
git add .
40+
git diff --staged --quiet || (git commit -m "Update Goals Questions Metrics Graph" && git push)
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[⬑ back to the overall graph](../use_gqm.md)
2+
3+
# **Metric:** Number of InnerSource repositories
4+
5+
As projects adopt InnerSource, there are signs of such adoption on the corresponding source code repositories.
6+
Examples are the presences of a `CONTRIBUTING.md` file, a "How to Contribute" section on the `README.md` file or repository topics in GitHub such as `innersource`.
7+
8+
One challenge with this metric, is defining an InnerSource repository, as there is no clear cut definition.
9+
Some companies may have strict requirements that define an InnerSource repository, while others may adopt a _self-declaration_.
10+
11+
Another challenge is that companies that use (entirely or partially) the concept of a monorepo may need to find a different unit of measure to observe, as a single repository may be used for many projects or software packages.
12+
13+
**Synopsis**: Number of source code repositories that adopt InnerSource
14+
15+
**Unit of Measurement**: Number of repositories
16+
17+
**Interpretation**: Comparing an absolute number to a range does not make sense in this context. Comparing percentages does make sense, but there's no strong base for comparison.
18+
19+
e.g. 10% of repositories are InnerSource
20+
21+
It's more interesting to observe this metric's trend over time.
22+
23+
**Measuring**
24+
25+
Examples:
26+
- Measure the number of GitHub repositories tagged with the `innersource` topic.
27+
- Measure the number of repositories that are above a given threshold using an automated maturity score calculation
28+
29+
## Related InnerSource Patterns
30+
- [InnerSource Portal](https://patterns.innersourcecommons.org/p/innersource-portal) - typically shows the number of InnerSource projects
31+
- [Repository Activity Score](https://patterns.innersourcecommons.org/p/repository-activity-score) - defines a score for ranking active projects, usable as a criteria to identify InnerSource repositories
32+
- [Standard Base Documentation](https://patterns.innersourcecommons.org/p/base-documentation) - describe common files used to document different aspects of InnerSource projects
33+
- [Maturity Model](https://patterns.innersourcecommons.org/p/maturity-model) - defines levels of maturity for InnerSource projects and can help classify a repository as InnerSource.

measuring/questions/adoption-trend.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[⬑ back to the overall graph](../use_gqm.md)
2+
3+
# **Question:** What is the InnerSource adoption trend?
4+
5+
This question is something an InnerSource program asks while fostering the adoption of InnerSource.
6+
Lack of adoption, or stagnant adoption may reveal that it is necessary to rethink the program strategy or investigate impediments.
7+
8+
## Related Metrics
9+
10+
| **Metric** | **How it answers the question** | **Gotchas** |
11+
| --- | --- | --- |
12+
| [Number of InnerSource repositories](../metrics/number-of-innersource-repositories.md) | The number of (source code) repositories that are directly related to the adoption of the practice. | Depending on how you define _InnerSource repositories_, it can report incorrect results |

measuring/use_gqm.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
*An overview of the Goals, Questions, and Metrics (GQM) catalog.*
44

5-
This page works better in GitHub; [click here](https://bit.ly/3tOrsbO).
5+
Right-click on any node representing a goal, question, or metric to open a new tab with more detailed information.
66

77
<!---
88
@@ -34,26 +34,34 @@ graph LR;
3434
%% begin nodes
3535
find-projects.md[Find InnerSource Projects]
3636
reduce-duplication.md[Reduce duplication]
37+
adoption-trend.md[What is the InnerSource adoption trend?]
3738
who-contributes.md[Who contributes to the InnerSource project?]
3839
who-uses.md[Who uses the InnerSource project?]
3940
code-contributions.md[Code contributions]
41+
contribution-distance.md[Contribution Distance]
42+
number-of-innersource-repositories.md[Number of InnerSource repositories]
4043
usage-count.md[Usage count]
4144
%% end nodes
4245
4346
%% begin edges
4447
find-projects.md-->who-uses.md
4548
find-projects.md-->who-contributes.md
4649
reduce-duplication.md-->who-uses.md
50+
adoption-trend.md-->number-of-innersource-repositories.md
4751
who-contributes.md-->code-contributions.md
52+
who-contributes.md-->contribution-distance.md
4853
who-uses.md-->usage-count.md
4954
%% end edges
5055
5156
%% begin clicks
52-
click find-projects.md "https://github.com/InnerSourceCommons/managing-inner-source-projects/blob/main/measuring/goals/find-projects.md" "Find InnerSource Projects" _blank
57+
click find-projects.md "https://github.com/InnerSourceCommons/managing-inner-source-projects/blob/main/measuring/goals/find-projects.md" "Find InnerSource Projects"
5358
click reduce-duplication.md "https://github.com/InnerSourceCommons/managing-inner-source-projects/blob/main/measuring/goals/reduce-duplication.md" "Reduce duplication"
59+
click adoption-trend.md "https://github.com/InnerSourceCommons/managing-inner-source-projects/blob/main/measuring/questions/adoption-trend.md" "What is the InnerSource adoption trend?"
5460
click who-contributes.md "https://github.com/InnerSourceCommons/managing-inner-source-projects/blob/main/measuring/questions/who-contributes.md" "Who contributes to the InnerSource project?"
5561
click who-uses.md "https://github.com/InnerSourceCommons/managing-inner-source-projects/blob/main/measuring/questions/who-uses.md" "Who uses the InnerSource project?"
5662
click code-contributions.md "https://github.com/InnerSourceCommons/managing-inner-source-projects/blob/main/measuring/metrics/code-contributions.md" "Code contributions"
63+
click contribution-distance.md "https://github.com/InnerSourceCommons/managing-inner-source-projects/blob/main/measuring/metrics/contribution-distance.md" "Contribution Distance"
64+
click number-of-innersource-repositories.md "https://github.com/InnerSourceCommons/managing-inner-source-projects/blob/main/measuring/metrics/number-of-innersource-repositories.md" "Number of InnerSource repositories"
5765
click usage-count.md "https://github.com/InnerSourceCommons/managing-inner-source-projects/blob/main/measuring/metrics/usage-count.md" "Usage count"
5866
%% end clicks
5967
@@ -69,10 +77,10 @@ graph LR;
6977
class goal,find-projects.md,reduce-duplication.md goals
7078
7179
classDef questions stroke:orange,stroke-width:2px;
72-
class question,who-contributes.md,who-uses.md questions
80+
class question,adoption-trend.md,who-contributes.md,who-uses.md questions
7381
7482
classDef metrics stroke:purple,stroke-width:2px;
75-
class metric,code-contributions.md,usage-count.md metrics
83+
class metric,code-contributions.md,contribution-distance.md,number-of-innersource-repositories.md,usage-count.md metrics
7684
end
7785
7886
```
@@ -81,4 +89,4 @@ Add your goals, questions, and metrics into this graph! It will help you to see
8189
You may get new ideas of what metrics answer the questions you have or what additional goals your questions can support.
8290
See [CONTRIBUTING.md#metrics].
8391

84-
[CONTRIBUTING.md#metrics]: https://github.com/InnerSourceCommons/managing-inner-source-projects/blob/main/CONTRIBUTING.md#metrics
92+
[CONTRIBUTING.md#metrics]: https://github.com/InnerSourceCommons/managing-inner-source-projects/blob/main/CONTRIBUTING.md#metrics

scripts/gqm_gen/gqm-1.png

-36.3 KB
Binary file not shown.

scripts/gqm_gen/gqm_commit.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

scripts/gqm_gen/index.ts

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const mdFilePath = process.env.npm_config_markDownFilePath || "../../measuring";
99
const graph = getGQMFileLinks(mdFilePath);
1010

1111
export function getLinkUrl(linkType: LinkType, file: string) {
12-
const measuringUrl = "https://github.com/InnerSourceCommons/managing-inner-source-projects/blob/main/measuring/";
12+
const measuringUrl = "https://github.com/InnerSourceCommons/managing-inner-source-projects/blob/main/measuring";
1313
const url = `${measuringUrl}/${linkType.toLowerCase()}s/${file}`
1414
return url;
1515
}
@@ -127,7 +127,7 @@ export function getLinks(parsed: Commonmark.Node) {
127127

128128
export function getNodeShapeSyntax(node: Node) {
129129
const nodeUrl = getLinkUrl(node.type, node.id)
130-
const nodeLabel = `<a href='${nodeUrl}'>${node.label}</a>`;
130+
const nodeLabel = `${node.label}`;
131131
switch (node.shape) {
132132
case 'rect':
133133
return `[${nodeLabel}]`;
@@ -150,16 +150,31 @@ export function generateMermaidDiagram(graph: Graph) {
150150
subgraph GQM[Goals, Questions, Metrics]\n
151151
`;
152152

153+
mermaidSyntax += " %% begin nodes\n";
153154
nodes.forEach((node) => {
154155
const nodeSyntax = getNodeShapeSyntax(node)
155156
mermaidSyntax += ` ${node.id}${nodeSyntax}\n`
156157
});
158+
mermaidSyntax += " %% end nodes\n\n";
159+
160+
mermaidSyntax += " %% begin edges\n";
157161

158162
edges.forEach((edge) => {
159163
const arrowSyntax: string = ArrowType.ARROW;
160164
mermaidSyntax += ` ${edge.from}${arrowSyntax}${edge.to}\n`;
161165
});
162166

167+
mermaidSyntax += " %% end edges\n\n";
168+
169+
mermaidSyntax += " %% begin clicks\n"
170+
171+
nodes.forEach((node) => {
172+
const nodeUrl = getLinkUrl(node.type, node.id);
173+
mermaidSyntax += ` click ${node.id} "${nodeUrl}" "${node.label}"\n`;
174+
});
175+
176+
mermaidSyntax += " %% end clicks\n\n"
177+
163178
const goalsList = nodes.filter(n => n.type == LinkType.GOAL).map(n => `${n.id}`).join(',');
164179
const questionsList = nodes.filter(n => n.type == LinkType.QUESTION).map(n => `${n.id}`).join(',');
165180
const metricsList = nodes.filter(n => n.type == LinkType.METRIC).map(n => `${n.id}`).join(',');

scripts/package-lock.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

tooling/github-configuration.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ When configuring repository creation settings at the Organization Level, it's es
163163

164164
*Depending on the type of Github instance you are using, the configurations options available may be what are shown below or there might not be an option for "internal" visible repositories.*
165165

166+
| Repository creation | Description | Recommendation |
167+
| --- | --- | --- |
166168
| Disabled | Members will not be able to create repositories. | Discourages repository creation and may hinder InnerSource practices. Consider enabling creation for collaboration. |
167169
| Members can create repositories | Members are allowed to create repositories, but with restrictions on the types available (public, private, internal). | Encourage the creation of repositories while specifying the types that align with your organization's guidelines. |
168170
| ┣ Public | Members can create public repositories visible to everyone on GitHub. | Promote open sharing and collaboration with both internal and external stakeholders. |

translations/gl/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Este libro busca proporcionar información sobre a xestión de distintos aspectos indispensables á hora de empregar InnerSource nas empresas.
66

7-
É o resultado dun proceso aínda en marcha, no que calquera persoa está convidada a contribuír de calquera xeito posible. As aportacións en forma de ideas, comentarios, correccións de erros tipográficos, ou mesmo cambios en parágrafos ou seccións enteiras, serán benvidas. Este repositorio ten como obxectivo aportar coñecemento especializado desde a industria de maneira que sexa útil a terceiros/as. Para isto, estamos na procura activa de revisores/as que poidan colaborar neste proceso e expresamos o noso agradecemento a aquelas persoas que xa fixeron algunha contribución ao libro.
7+
É o resultado dun proceso aínda en marcha, no que calquera persoa está convidada a contribuír de calquera xeito posible. As achegas en forma de ideas, comentarios, correccións de erros tipográficos, ou mesmo cambios en parágrafos ou seccións enteiras, serán benvidas. Este repositorio ten como obxectivo achegar coñecemento especializado desde a industria de maneira que sexa útil a terceiros/as. Para isto, estamos na procura activa de revisores/as que poidan colaborar neste proceso e expresamos o noso agradecemento a aquelas persoas que xa fixeron algunha contribución ao libro.
88

99
Pode atopar máis información sobre este proceso na [sección de contribucións](https://github.com/dicortazar/managing-inner-source-projects/blob/master/CONTRIBUTING.md).
1010

0 commit comments

Comments
 (0)