Skip to content

Commit

Permalink
Merge pull request #46 from boherm/improve-welcome-command
Browse files Browse the repository at this point in the history
  • Loading branch information
boherm authored Jun 11, 2024
2 parents 2e2536c + ec17e48 commit 1f01408
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ public function addWelcomeComment(PullRequestId $pullRequestId, string $contribu
// Then we need to format the new comment with the new contributor.
$welcomeComment = $this->twig->render('pr_comments/welcome.html.twig', [
'contributor' => $contributor,
'repositoryOwner' => $pullRequestId->repositoryOwner,
'repositoryName' => $pullRequestId->repositoryName,
]);

// We add the comment to the PR.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function (ItemInterface $item) use ($owner, $repo, $committer) {
$lastCommit = $this->githubClient->request('GET', '/repos/'.$owner.'/'.$repo.'/commits',
[
'query' => [
'committer' => $committer,
'author' => $committer,
'per_page' => 1,
],
]
Expand Down
4 changes: 3 additions & 1 deletion templates/pr_comments/welcome.html.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<!-- PR_WELCOME -->
Hello @{{ contributor }}!

This is your first pull request on the PrestaShop project. Thank you, and welcome to this Open Source community!
This is your first pull request on [{{ repositoryName }}](https://github.com/{{ repositoryOwner }}/{{ repositoryName }}/) repository of the PrestaShop project.

Thank you, and welcome to this Open Source community!

0 comments on commit 1f01408

Please sign in to comment.