Skip to content

Commit fcfe0c7

Browse files
Formatter guidelines and CI job timeout extensions (#263)
* Add Formatter guidelines to CONTRIBUTING and the PR template * Increase permitted time per-platform for CI validation from 60 -> 120 min
1 parent 683187a commit fcfe0c7

File tree

4 files changed

+29
-0
lines changed

4 files changed

+29
-0
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
- [ ] Comment-based help added/updated, including examples.
3535
- [ ] [Static analysis](https://github.com/microsoft/PowerShellForGitHub/blob/master/CONTRIBUTING.md#static-analysis) is reporting back clean.
3636
- [ ] New/changed code adheres to our [coding guidelines](https://github.com/microsoft/PowerShellForGitHub/blob/master/CONTRIBUTING.md#coding-guidelines).
37+
- [ ] [Formatters were created](https://github.com/microsoft/PowerShellForGitHub/blob/master/CONTRIBUTING.md#formatters) for any new types being added.
3738
- [ ] New/changed code continues to [support the pipeline](https://github.com/microsoft/PowerShellForGitHub/blob/master/CONTRIBUTING.md#pipeline-support).
3839
- [ ] Changes to the manifest file follow the [manifest guidance](https://github.com/microsoft/PowerShellForGitHub/blob/master/CONTRIBUTING.md#module-manifest).
3940
- [ ] Unit tests were added/updated and are all passing. See [testing guidelines](https://github.com/microsoft/PowerShellForGitHub/blob/master/CONTRIBUTING.md#testing). This includes making sure that all pipeline input variations have been covered.

CONTRIBUTING.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Looking for information on how to use this module? Head on over to [README.md](
2424
* [Code Comments](#code-comments)
2525
* [Debugging Tips](#debugging-tips)
2626
* [Pipeline Support](#pipeline-support)
27+
* [Formatters](#formatters)
2728
* [Testing](#testing)
2829
* [Installing Pester](#installing-pester)
2930
* [Configuring Your Environment](#configuring-your-environment)
@@ -348,6 +349,28 @@ new functionality added to the module embraces this design.
348349

349350
----------
350351

352+
### Formatters
353+
354+
[Our goal](https://github.com/microsoft/PowerShellForGitHub/issues/27) is to have automattic
355+
formatting for all `GitHub.*` types that this project defines.
356+
357+
Formatting was first introduced to the project with [#205](https://github.com/microsoft/PowerShellForGitHub/pull/205),
358+
and succcesive PR's which introduce new types have added their additional formatters as well.
359+
Eventually we will get Formatters for all previously introduced types as well.
360+
361+
Formatter files can be found in [/Formatters](https://github.com/microsoft/PowerShellForGitHub/tree/master/Formatters).
362+
363+
When adding a new formatter file, keep the following in mind:
364+
365+
* One formatter file per PowerShell module file, and name them similarly
366+
(e.g. `GitHubRepositories.ps1` gets a `Formatters\GitHubRepositories.Format.ps1xml` file)
367+
* Be sure to add the formatter file to the manifest (common mistake to forget this).
368+
* Don't display all the type's properties ...just choose the most relevant pieces of information;
369+
sometimes this might mean using a script block to grab an inner-property or to perform a
370+
calculation.
371+
372+
----------
373+
351374
### Testing
352375
[![Build status](https://dev.azure.com/ms/PowerShellForGitHub/_apis/build/status/PowerShellForGitHub-CI?branchName=master)](https://dev.azure.com/ms/PowerShellForGitHub/_build/latest?definitionId=109&branchName=master)
353376
[![Azure DevOps tests](https://img.shields.io/azure-devops/tests/ms/PowerShellForGitHub/109/master)](https://dev.azure.com/ms/PowerShellForGitHub/_build/latest?definitionId=109&branchName=master)

build/pipelines/azure-pipelines.ci.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
pool:
3636
vmImage: 'windows-latest'
3737
dependsOn: waitForRunningBuilds
38+
timeoutInMinutes: 120
3839
steps:
3940
- template: ./templates/verify-testConfigSettingsHash.yaml
4041
parameters:
@@ -55,6 +56,7 @@ jobs:
5556
pool:
5657
vmImage: 'windows-latest'
5758
dependsOn: waitForRunningBuilds
59+
timeoutInMinutes: 120
5860
steps:
5961
- template: ./templates/verify-testConfigSettingsHash.yaml
6062
- template: ./templates/run-staticAnalysis.yaml
@@ -70,6 +72,7 @@ jobs:
7072
pool:
7173
vmImage: 'ubuntu-latest'
7274
dependsOn: waitForRunningBuilds
75+
timeoutInMinutes: 120
7376
steps:
7477
- template: ./templates/verify-testConfigSettingsHash.yaml
7578
- template: ./templates/run-staticAnalysis.yaml
@@ -85,6 +88,7 @@ jobs:
8588
pool:
8689
vmImage: 'macOS-latest'
8790
dependsOn: waitForRunningBuilds
91+
timeoutInMinutes: 120
8892
steps:
8993
- template: ./templates/verify-testConfigSettingsHash.yaml
9094
- template: ./templates/run-staticAnalysis.yaml

build/pipelines/azure-pipelines.release.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
- job: Validate
2929
pool:
3030
vmImage: 'windows-latest'
31+
timeoutInMinutes: 120
3132
steps:
3233
- template: ./templates/run-staticAnalysis.yaml
3334
- template: ./templates/run-unitTests.yaml

0 commit comments

Comments
 (0)