Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add commit sha in log when Nelson tries to merge a PR (3/3) #71

Merged
merged 7 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions spec/Akeneo/Git/PullRequestMergerSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
],
]);
Expand Down
3 changes: 2 additions & 1 deletion src/Akeneo/Git/PullRequestMerger.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);
Expand All @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion src/Akeneo/Resources/translations/en.fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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!'
2 changes: 1 addition & 1 deletion src/Akeneo/Resources/translations/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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!'
Loading