Skip to content

Commit 8e7b4e2

Browse files
committed
Addressing PR feedback
1 parent 2d31f93 commit 8e7b4e2

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,9 @@ Instructions on using the action within Azure Pipelines can be found
150150

151151
## Git History
152152

153-
Depending on the nature of your repository history, it may be necessary to fetch
154-
Git history during checkout. This can be done by updating the `actions/checkout`
155-
step:
153+
If your repository contains _any_ non-linear history, it will be necessary to
154+
fetch Git history during checkout. This can be done by updating the
155+
`actions/checkout` step:
156156

157157
```YAML
158158
- uses: actions/[email protected]
@@ -165,6 +165,9 @@ set this to a value greater than 0 if you only require a partial history, but it
165165
can be difficult to determine a value that will work consistently, due to the
166166
nature of Git history.
167167

168+
To avoid this, it is recommended to only use commit types that squash the Git
169+
history such as "squash merge" or "rebase and fast-forward".
170+
168171
## Troubleshooting
169172

170173
A set of steps for troubleshooting any issues encountered can be found

docs/azure-pipelines-task.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,9 @@ name `PR_METRICS_ACCESS_TOKEN` cannot be altered.
9696

9797
## Git History
9898

99-
Depending on the nature of your repository history, it may be necessary to fetch
100-
Git history during checkout. This can be done by updating the `checkout` step:
99+
If your repository contains _any_ non-linear history, it will be necessary to
100+
fetch Git history during checkout. This can be done by updating the `checkout`
101+
step:
101102

102103
```YAML
103104
- checkout: self
@@ -113,6 +114,9 @@ to a value greater than 0 if you only require a partial history, but it can be
113114
difficult to determine a value that will work consistently, due to the nature of
114115
Git history.
115116

117+
To avoid this, it is recommended to only use commit types that squash the Git
118+
history such as ["squash merge" or "rebase and fast-forward"][squashmerge].
119+
116120
## Always Close Comment
117121

118122
By default, the comment is left open if it requires further attention, such as
@@ -124,3 +128,4 @@ prevent it blocking automatic closure of the PR.
124128
[workloadidentityfederation]: workload-identity-federation.md
125129
[githubpat]: https://docs.github.com/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token
126130
[githubsecret]: https://docs.github.com/actions/reference/encrypted-secrets
131+
[squashmerge]: https://learn.microsoft.com/azure/devops/repos/git/merging-with-squash

0 commit comments

Comments
 (0)