diff --git a/spec/Akeneo/Git/PullRequestMergerSpec.php b/spec/Akeneo/Git/PullRequestMergerSpec.php index 386cbdb..61bd392 100644 --- a/spec/Akeneo/Git/PullRequestMergerSpec.php +++ b/spec/Akeneo/Git/PullRequestMergerSpec.php @@ -30,6 +30,9 @@ public function it_merges_a_pull_request(Client $client, PullRequest $githubMerg 'base' => [ 'user' => ['login' => 'nelson'], 'repo' => ['name' => 'akeneo/repo'], + 'sha' => 'master_branch_sha', + ], + 'head' => [ 'sha' => 'pr_sha', ], ]); diff --git a/src/Akeneo/Git/PullRequestMerger.php b/src/Akeneo/Git/PullRequestMerger.php index 20b18c3..6a554e6 100644 --- a/src/Akeneo/Git/PullRequestMerger.php +++ b/src/Akeneo/Git/PullRequestMerger.php @@ -24,6 +24,7 @@ public function mergePullRequest(array $pullRequest): void $this->eventDispatcher->dispatch( new GenericEvent($this, [ 'number' => $pullRequest['number'], + 'commit_sha' => $pullRequest['head']['sha'], ]), Events::PRE_GITHUB_MERGE_PR, ); @@ -33,7 +34,7 @@ public function mergePullRequest(array $pullRequest): void $pullRequest['base']['repo']['name'], $pullRequest['number'], $mergeTitle, - $pullRequest['base']['sha'], + $pullRequest['head']['sha'], ); $this->eventDispatcher->dispatch( diff --git a/src/Akeneo/Resources/translations/en.fr.yml b/src/Akeneo/Resources/translations/en.fr.yml index f4f76a8..bdbb4e9 100644 --- a/src/Akeneo/Resources/translations/en.fr.yml +++ b/src/Akeneo/Resources/translations/en.fr.yml @@ -29,5 +29,5 @@ pre_github_check_diff: Vérifie les différences avec la branche courante post_github_check_diff: '%diff% différence(s) trouvée(s) !' pre_crowdin_packages: Vérifie les archives à mettre à jour post_crowdin_packages: '%count% archive(s) trouvée(s) !' -pre_github_merge_pr: 'Merge Pull Request %number%' +pre_github_merge_pr: 'Merge Pull Request %number% . Commit: %commit_sha% ' post_github_merge_pr: 'Pull Request mergée!' diff --git a/src/Akeneo/Resources/translations/en.yml b/src/Akeneo/Resources/translations/en.yml index a4601ac..b59b5e8 100644 --- a/src/Akeneo/Resources/translations/en.yml +++ b/src/Akeneo/Resources/translations/en.yml @@ -31,5 +31,5 @@ pre_crowdin_packages: 'Checking packages to update' post_crowdin_packages: '%count% package(s) found!' nelson_rename: 'Rename %from% to %to%' nelson_drop_useless: 'Drop useless file %file%' -pre_github_merge_pr: 'Merging Pull Request %number%' +pre_github_merge_pr: 'Merging Pull Request %number% . Commit: %commit_sha% ' post_github_merge_pr: 'Pull Request merged!'