Skip to content

Commit

Permalink
Merge pull request #114 from michaeltlombardi/ab-30884/main/quality-c…
Browse files Browse the repository at this point in the history
…ontributions-project

(AB#30884) Configure quality contributions project
  • Loading branch information
michaeltlombardi authored Nov 7, 2022
2 parents 94234b5 + fd39a4d commit 8f5dce6
Show file tree
Hide file tree
Showing 5 changed files with 203 additions and 82 deletions.
78 changes: 0 additions & 78 deletions .github/ISSUE_TEMPLATE/00-hacktoberfest.yml

This file was deleted.

85 changes: 85 additions & 0 deletions .github/ISSUE_TEMPLATE/00-quality.yml
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
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
blank_issues_enabled: false
contact_links:
- name: 🎃 Hacktoberfest 2022
url: https://github.com/MicrosoftDocs/PowerShell-Docs/issues/9257
- name: Quality Contributions
url: https://learn.microsoft.com/powershell/scripting/community/contributing/quality-improvements
about: >-
If you'd like to participate in Hacktoberfest 2022, before filing an issue, check the info
and instructions.
If you'd like to commit to improving quality for the documentation, before filing an issue,
check the info and instructions.
- name: PowerShell Product Feedback
url: https://github.com/PowerShell/PowerShell/issues/new/choose
about: Please open feature requests and bug reports for current PowerShell here.
Expand Down
75 changes: 75 additions & 0 deletions .github/workflows/quality.issue.yml
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 }}
39 changes: 39 additions & 0 deletions .github/workflows/quality.pr.yml
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 }}

0 comments on commit 8f5dce6

Please sign in to comment.