-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #114 from michaeltlombardi/ab-30884/main/quality-c…
…ontributions-project (AB#30884) Configure quality contributions project
- Loading branch information
Showing
5 changed files
with
203 additions
and
82 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: "🛠️ Quality Contribution" | ||
description: >- | ||
File a new issue to tackle quality improvement opportunities | ||
title: "Quality: " | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
This issue template is for the [PowerShell Docs Quality Contributions project][a1]. | ||
For more more info, see [Contributing quality improvements][a2] in our Contributor's Guide. | ||
[a1]: https://github.com/orgs/MicrosoftDocs/projects/15 | ||
[a2]: https://learn.microsoft.com/powershell/scripting/community/contributing/quality-improvements | ||
- type: checkboxes | ||
id: prerequisites | ||
attributes: | ||
label: Prerequisites | ||
description: >- | ||
These steps are required. After you've completed each step, check the box for it before | ||
moving on. | ||
options: | ||
- label: | | ||
**Existing Issue:** | ||
Search the existing [quality issues][b1] for this repository. If there's an issue that | ||
covers the quality area and articles you want to improve, pick a different quality area | ||
or article set. Don't file a new issue for the same work. Subscribe, react, or comment | ||
on that issue instead. | ||
[b1]: https://github.com/orgs/MicrosoftDocs/projects/15/views/3?filterQuery=repo%3A%22MicrosoftDocs%2FPowerShell-Docs-Modules%22+is%3Aissue | ||
required: true | ||
- label: | | ||
**Descriptive Title:** | ||
Write the title for this issue as a short synopsis. If possible, provide context. For | ||
example, "Quality: Command Syntax in Foo" instead of "Quality: Foo" | ||
required: true | ||
- type: dropdown | ||
id: QualityArea | ||
validations: | ||
required: true | ||
attributes: | ||
label: Quality Areas | ||
description: | | ||
Select one or more quality areas to improve on with your contribution. | ||
For more information, see the relevant section in the meta issue: | ||
- [Aliases][c1]: Ensure cmdlet aliases are documented | ||
- [Formatting code samples][c2]: Ensure proper casing, line length, etc in code samples | ||
- [Formatting command syntax][c3]: Ensure proper casing and formatting for command syntax, including cmdlets, types, etc. | ||
- [Link References][c4]: Ensure links in conceptual docs are defined as numbered references | ||
- [Markdown linting][c5]: Ensure content follows markdownlint rules | ||
- [Spelling][c6]: Ensure proper casing and spelling for words | ||
[c1]: https://learn.microsoft.com/powershell/scripting/community/contributing/quality-improvements#aliases | ||
[c2]: https://learn.microsoft.com/powershell/scripting/community/contributing/quality-improvements#formatting-code-samples | ||
[c3]: https://learn.microsoft.com/powershell/scripting/community/contributing/quality-improvements#formatting-command-syntax | ||
[c4]: https://learn.microsoft.com/powershell/scripting/community/contributing/quality-improvements#link-references | ||
[c5]: https://learn.microsoft.com/powershell/scripting/community/contributing/quality-improvements#markdown-linting | ||
[c6]: https://learn.microsoft.com/powershell/scripting/community/contributing/quality-improvements#spelling | ||
multiple: true | ||
options: | ||
- Aliases | ||
- Formatting code samples | ||
- Formatting command syntax | ||
- Link References | ||
- Markdown linting | ||
- Spelling | ||
- type: textarea | ||
id: ArticleList | ||
validations: | ||
required: true | ||
attributes: | ||
label: Article List | ||
description: >- | ||
Specify the articles you are committing to work on, one per line. You can specify each entry | ||
as a path, the article's title, or the link to the article on Learn. If you specify an | ||
article by path for a reference article, such as a cmdlet or about topic, specify the | ||
version segment as `*.*`. | ||
placeholder: | | ||
- reference/*.*/Microsoft.PowerShell.Core/Add-History.md | ||
- Add-History | ||
- https://learn.microsoft.com/powershell/module/microsoft.powershell.core/add-history |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: "Quality Contribution Issues" | ||
on: | ||
issues: | ||
types: | ||
- opened | ||
|
||
jobs: | ||
# Check if the issue is for quality contributions; all other jobs depend on this one. | ||
quality: | ||
name: Is Quality Contribution? | ||
runs-on: ubuntu-latest | ||
outputs: | ||
check: ${{ steps.is-quality.outputs.match != '' }} | ||
steps: | ||
- uses: actions-ecosystem/action-regex-match@v2 | ||
id: is-quality | ||
with: | ||
text: ${{ github.event.issue.body }} | ||
regex: "Quality: Foo" | ||
flags: gm | ||
|
||
project: | ||
name: Add to project | ||
needs: quality | ||
if: needs.quality.outputs.check == 'true' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
project-url: https://github.com/orgs/MicrosoftDocs/projects/15/views/1 | ||
github-token: ${{ secrets.quality_token }} | ||
|
||
assign: | ||
name: Assign to author | ||
needs: quality | ||
if: needs.quality.outputs.check == 'true' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions-ecosystem/action-add-assignees@v1 | ||
with: | ||
github_token: ${{ secrets.github_token }} | ||
assignees: ${{ github.event.issue.user.login }} | ||
|
||
label: | ||
name: Add quality labels | ||
needs: quality | ||
if: needs.quality.outputs.check == 'true' | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- regex: Aliases | ||
label: quality-aliases | ||
- regex: Formatting code samples | ||
label: quality-format-code-samples | ||
- regex: Formatting command syntax | ||
label: quality-format-command-syntax | ||
- regex: Link references | ||
label: quality-link-references | ||
- regex: Markdown linting | ||
label: quality-markdownlint | ||
- regex: Spelling | ||
label: quality-spelling | ||
steps: | ||
- uses: actions-ecosystem/action-regex-match@v2 | ||
id: matcher | ||
with: | ||
text: ${{ github.event.issue.body }} | ||
regex: '^### Quality Areas\s*^.*${{ matrix.regex }}.*$' | ||
flags: gm | ||
- uses: actions-ecosystem/action-add-labels@v1 | ||
if: steps.matcher.outputs.match != '' | ||
with: | ||
labels: ${{ matrix.label }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: "Quality Contributions" | ||
on: | ||
pull_request_target: | ||
branches: | ||
- main | ||
types: | ||
- opened | ||
- reopened | ||
- edited | ||
|
||
defaults: | ||
run: | ||
shell: pwsh | ||
|
||
jobs: | ||
# Check if the PR is for quality contributions; all other jobs depend on this one. | ||
check: | ||
name: Is Quality Contribution? | ||
outputs: | ||
title: ${{ steps.title.outputs.check == 'true' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: title | ||
run: | | ||
$Check = "${{ contains(github.event.pull_request.title, 'Quality:') }}" | ||
"Check: $Check" | ||
"::set-output name=check::$Check" | ||
project: | ||
name: Add pull request to project | ||
needs: check | ||
if: | | ||
needs.check.outputs.title == 'true' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
project-url: https://github.com/orgs/MicrosoftDocs/projects/15/views/1 | ||
github-token: ${{ secrets.quality_token }} |