Skip to content

Commit

Permalink
ci/check_changelog: reduce race condition (#7734)
Browse files Browse the repository at this point in the history
PR #7732 illustrated a bug in our current changelog check: it only worked
if the PR was up-to-date with `master` at the time of pushing. This was
not the intention. Fortunately, the fix is fairly easy: check out the PR
commit before running the check, rather than run it from the merge
commit (as Azure does by default).

CHANGELOG_BEGIN
CHANGELOG_END
  • Loading branch information
garyverhaegen-da authored Oct 19, 2020
1 parent 8e4e0f9 commit 5945040
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,17 @@ jobs:
- git_sha
variables:
fork_sha: $[ dependencies.git_sha.outputs['out.fork_point'] ]
pr_commit: $[ dependencies.git_sha.outputs['out.branch'] ]
condition: eq(variables['Build.Reason'], 'PullRequest')
pool:
name: 'linux-pool'
demands: assignment -equals default
steps:
- checkout: self
- bash: ci/check-changelog.sh $(fork_sha)
- bash: |
set -euo pipefail
git checkout $(pr_commit)
ci/check-changelog.sh $(fork_sha)
- template: ci/da-ghc-lib/compile.yml
parameters:
Expand Down

0 comments on commit 5945040

Please sign in to comment.