Skip to content

Commit 3324032

Browse files
authored
Merge pull request MicrosoftDocs#3178 from michaeltlombardi/ab-30887/main/quality-contributions-project
(AB#30887) Configure quality contributions project
2 parents d3a01cd + 35da484 commit 3324032

File tree

5 files changed

+203
-82
lines changed

5 files changed

+203
-82
lines changed

.github/ISSUE_TEMPLATE/00-hacktoberfest.yml

-78
This file was deleted.

.github/ISSUE_TEMPLATE/00-quality.yml

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: "🛠️ Quality Contribution"
2+
description: >-
3+
File a new issue to tackle quality improvement opportunities
4+
title: "Quality: "
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
This issue template is for the [PowerShell Docs Quality Contributions project][a1].
10+
11+
For more more info, see [Contributing quality improvements][a2] in our Contributor's Guide.
12+
13+
[a1]: https://github.com/orgs/MicrosoftDocs/projects/15
14+
[a2]: https://learn.microsoft.com/powershell/scripting/community/contributing/quality-improvements
15+
- type: checkboxes
16+
id: prerequisites
17+
attributes:
18+
label: Prerequisites
19+
description: >-
20+
These steps are required. After you've completed each step, check the box for it before
21+
moving on.
22+
options:
23+
- label: |
24+
**Existing Issue:**
25+
26+
Search the existing [quality issues][b1] for this repository. If there's an issue that
27+
covers the quality area and articles you want to improve, pick a different quality area
28+
or article set. Don't file a new issue for the same work. Subscribe, react, or comment
29+
on that issue instead.
30+
31+
[b1]: https://github.com/orgs/MicrosoftDocs/projects/15/views/4
32+
required: true
33+
- label: |
34+
**Descriptive Title:**
35+
36+
Write the title for this issue as a short synopsis. If possible, provide context. For
37+
example, "Quality: Command Syntax in Foo" instead of "Quality: Foo"
38+
required: true
39+
- type: dropdown
40+
id: QualityArea
41+
validations:
42+
required: true
43+
attributes:
44+
label: Quality Areas
45+
description: |
46+
Select one or more quality areas to improve on with your contribution.
47+
48+
For more information, see the relevant section in the meta issue:
49+
50+
- [Aliases][c1]: Ensure cmdlet aliases are documented
51+
- [Formatting code samples][c2]: Ensure proper casing, line length, etc in code samples
52+
- [Formatting command syntax][c3]: Ensure proper casing and formatting for command syntax, including cmdlets, types, etc.
53+
- [Link References][c4]: Ensure links in conceptual docs are defined as numbered references
54+
- [Markdown linting][c5]: Ensure content follows markdownlint rules
55+
- [Spelling][c6]: Ensure proper casing and spelling for words
56+
57+
[c1]: https://learn.microsoft.com/powershell/scripting/community/contributing/quality-improvements#aliases
58+
[c2]: https://learn.microsoft.com/powershell/scripting/community/contributing/quality-improvements#formatting-code-samples
59+
[c3]: https://learn.microsoft.com/powershell/scripting/community/contributing/quality-improvements#formatting-command-syntax
60+
[c4]: https://learn.microsoft.com/powershell/scripting/community/contributing/quality-improvements#link-references
61+
[c5]: https://learn.microsoft.com/powershell/scripting/community/contributing/quality-improvements#markdown-linting
62+
[c6]: https://learn.microsoft.com/powershell/scripting/community/contributing/quality-improvements#spelling
63+
multiple: true
64+
options:
65+
- Aliases
66+
- Formatting code samples
67+
- Formatting command syntax
68+
- Link References
69+
- Markdown linting
70+
- Spelling
71+
- type: textarea
72+
id: ArticleList
73+
validations:
74+
required: true
75+
attributes:
76+
label: Article List
77+
description: >-
78+
Specify the articles you are committing to work on, one per line. You can specify each entry
79+
as a path, the article's title, or the link to the article on Learn. If you specify an
80+
article by path for a reference article, such as a cmdlet or about topic, specify the
81+
version segment as `*.*`.
82+
placeholder: |
83+
- reference/*.*/Microsoft.PowerShell.Core/Add-History.md
84+
- Add-History
85+
- https://learn.microsoft.com/powershell/module/microsoft.powershell.core/add-history

.github/ISSUE_TEMPLATE/config.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
blank_issues_enabled: true
22
contact_links:
3-
- name: 🎃 Hacktoberfest 2022
4-
url: https://github.com/MicrosoftDocs/PowerShell-Docs/issues/9257
3+
- name: Quality Contributions
4+
url: https://learn.microsoft.com/powershell/scripting/community/contributing/quality-improvements
55
about: >-
6-
If you'd like to participate in Hacktoberfest 2022, before filing an issue, check the info
7-
and instructions.
6+
If you'd like to commit to improving quality for the documentation, before filing an issue,
7+
check the info and instructions.
88
# - name: PowerShell Product Feedback
99
# url: https://github.com/PowerShell/PowerShell/issues/new/choose
1010
# about: Please open feature requests for current PowerShell here.

.github/workflows/quality.issue.yml

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: "Quality Contribution Issues"
2+
on:
3+
issues:
4+
types:
5+
- opened
6+
7+
jobs:
8+
# Check if the issue is for quality contributions; all other jobs depend on this one.
9+
quality:
10+
name: Is Quality Contribution?
11+
runs-on: ubuntu-latest
12+
outputs:
13+
check: ${{ steps.is-quality.outputs.match != '' }}
14+
steps:
15+
- uses: actions-ecosystem/action-regex-match@v2
16+
id: is-quality
17+
with:
18+
text: ${{ github.event.issue.body }}
19+
regex: "Quality: Foo"
20+
flags: gm
21+
22+
project:
23+
name: Add to project
24+
needs: quality
25+
if: needs.quality.outputs.check == 'true'
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/[email protected]
29+
with:
30+
project-url: https://github.com/orgs/MicrosoftDocs/projects/15/views/1
31+
github-token: ${{ secrets.quality_token }}
32+
33+
assign:
34+
name: Assign to author
35+
needs: quality
36+
if: needs.quality.outputs.check == 'true'
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: actions-ecosystem/action-add-assignees@v1
40+
with:
41+
github_token: ${{ secrets.github_token }}
42+
assignees: ${{ github.event.issue.user.login }}
43+
44+
label:
45+
name: Add quality labels
46+
needs: quality
47+
if: needs.quality.outputs.check == 'true'
48+
runs-on: ubuntu-latest
49+
strategy:
50+
fail-fast: false
51+
matrix:
52+
include:
53+
- regex: Aliases
54+
label: quality-aliases
55+
- regex: Formatting code samples
56+
label: quality-format-code-samples
57+
- regex: Formatting command syntax
58+
label: quality-format-command-syntax
59+
- regex: Link references
60+
label: quality-link-references
61+
- regex: Markdown linting
62+
label: quality-markdownlint
63+
- regex: Spelling
64+
label: quality-spelling
65+
steps:
66+
- uses: actions-ecosystem/action-regex-match@v2
67+
id: matcher
68+
with:
69+
text: ${{ github.event.issue.body }}
70+
regex: '^### Quality Areas\s*^.*${{ matrix.regex }}.*$'
71+
flags: gm
72+
- uses: actions-ecosystem/action-add-labels@v1
73+
if: steps.matcher.outputs.match != ''
74+
with:
75+
labels: ${{ matrix.label }}

.github/workflows/quality.pr.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: "Quality Contributions"
2+
on:
3+
pull_request_target:
4+
branches:
5+
- main
6+
types:
7+
- opened
8+
- reopened
9+
- edited
10+
11+
defaults:
12+
run:
13+
shell: pwsh
14+
15+
jobs:
16+
# Check if the PR is for quality contributions; all other jobs depend on this one.
17+
check:
18+
name: Is Quality Contribution?
19+
outputs:
20+
title: ${{ steps.title.outputs.check == 'true' }}
21+
runs-on: ubuntu-latest
22+
steps:
23+
- id: title
24+
run: |
25+
$Check = "${{ contains(github.event.pull_request.title, 'Quality:') }}"
26+
"Check: $Check"
27+
"::set-output name=check::$Check"
28+
29+
project:
30+
name: Add pull request to project
31+
needs: check
32+
if: |
33+
needs.check.outputs.title == 'true'
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/[email protected]
37+
with:
38+
project-url: https://github.com/orgs/MicrosoftDocs/projects/15/views/1
39+
github-token: ${{ secrets.quality_token }}

0 commit comments

Comments
 (0)