-
Notifications
You must be signed in to change notification settings - Fork 110
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
Configurable Github/Gitea urls #163
Configurable Github/Gitea urls #163
Conversation
@@ -25,10 +25,18 @@ | |||
|
|||
class GithubWebhook extends AbstractWebhook | |||
{ | |||
public function __construct(Manager $manager, EventDispatcherInterface $dispatcher, ?string $secret = null) | |||
/** @var array */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please define array shape
public function __construct( | ||
Manager $manager, EventDispatcherInterface $dispatcher, | ||
?string $secret = null, | ||
?array $sourceUrls = ['git_url', 'ssh_url', 'clone_url', 'svn_url'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can You set this default value directly to property?
{ | ||
parent::__construct($manager, $dispatcher); | ||
$this->secret = $secret; | ||
$this->sourceUrls = $sourceUrls; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use setter for this property as it is optional and set by default.
@ramunasd Can you look at it again, please? Is that what you meant? |
The main point was to move out $sourceUrls from __constructor(), because this parameter is optional. Please set default value directly to class property. Setter mut be called from DI, not constructor. |
I have orientated myself on the secret property. Unfortunately, I'm not that deep in the project. Can you describe what you mean in more detail? |
I think I was quite clear :) |
Thank you very much. |
Rebased and merged from other branch. |
No description provided.