Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
muiriswoulfe committed Sep 18, 2024
1 parent 372833f commit 55db3e2
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 7 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,23 @@ when using this trigger.**
Instructions on using the action within Azure Pipelines can be found
[here][azurepipelinestask].

## Git History

Depending on the nature of your repo history, it may be necessary to fetch Git
history during checkout. This can be done by updating the `actions/checkout`
step:

```YAML
- uses: actions/[email protected]
fetch-depth: 0
```

In many cases, `fetch-depth` will not be required so it is recommended not to
set this unless the task explicitly requests it. It may also be possible to set
this to a value greater than 0 if you only require a partial history, but it can
be difficult to determine a value that will work consistently, due to the nature
of Git history.

## Troubleshooting

A set of steps for troubleshooting any issues encountered can be found
Expand Down
30 changes: 23 additions & 7 deletions docs/azure-pipelines-task.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,31 @@ You can use a name other than `PR_Metrics_Access_Token` if you wish, but you
will need to keep the name unified across the variable and task definitions. The
name `PR_METRICS_ACCESS_TOKEN` cannot be altered.

## Always Close Comment
## Git History

Depending on the nature of your repo history, it may be necessary to fetch Git
history during checkout. This can be done by updating the `checkout` step:

```YAML
- checkout: self
fetchDepth: 0
```

Alternatively, if using classic pipelines, you can disable 'Shallow fetch' under
the build process phase settings.

The `AlwaysCloseComment` option is not available for GitHub PRs as the main size
and test comment there cannot be open by default.
In many cases, `fetchDepth` will not be required so it is recommended not to set
this unless the task explicitly requests it. It may also be possible to set this
to a value greater than 0 if you only require a partial history, but it can be
difficult to determine a value that will work consistently, due to the nature of
Git history.

## Always Close Comment

By default in Azure DevOps, the comment is left open if it requires further
attention, such as when a smaller PR or increased test coverage is suggested. If
this input is set to `true`, the comment will be closed, to prevent it blocking
automatic closure of the PR.
By default, the comment is left open if it requires further attention, such as
when a smaller PR or increased test coverage is suggested. If the
`AlwaysCloseComment` option is set to `true`, the comment will be closed, to
prevent it blocking automatic closure of the PR.

[addingtask]: https://docs.microsoft.com/azure/devops/pipelines/customize-pipeline
[workloadidentityfederation]: workload-identity-federation.md
Expand Down

0 comments on commit 55db3e2

Please sign in to comment.