mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
include previous_filename
This commit is contained in:
committed by
harsh mahajan
parent
a70d241da0
commit
87f29c6889
+4
-1
@@ -131,7 +131,10 @@ class Update extends Action
|
||||
$providerCommitAuthorUrl = $commitDetails["commitAuthorUrl"] ?? '';
|
||||
|
||||
$prFiles = $github->getPullRequestFiles($owner, $providerRepositoryName, $providerPullRequestId);
|
||||
$providerAffectedFiles = array_column($prFiles, 'filename');
|
||||
$providerAffectedFiles = [
|
||||
...array_column($prFiles, 'filename'),
|
||||
...array_column($prFiles, 'previous_filename')
|
||||
];
|
||||
|
||||
$this->createGitDeployments($github, $providerInstallationId, $repositories, $providerBranch, $providerBranchUrl, $providerRepositoryName, $providerRepositoryUrl, $providerRepositoryOwner, $providerCommitHash, $providerCommitAuthor, $providerCommitAuthorUrl, $providerCommitMessage, $providerCommitUrl, $providerPullRequestId, $providerAffectedFiles, true, $dbForPlatform, $authorization, $queueForBuilds, $getProjectDB, $platform);
|
||||
|
||||
|
||||
@@ -213,7 +213,10 @@ class Create extends Action
|
||||
$providerCommitMessage = $commitDetails["commitMessage"] ?? '';
|
||||
|
||||
$prFiles = $github->getPullRequestFiles($providerRepositoryOwner, $providerRepositoryName, $providerPullRequestId);
|
||||
$providerAffectedFiles = array_column($prFiles, 'filename');
|
||||
$providerAffectedFiles = [
|
||||
...array_column($prFiles, 'filename'),
|
||||
...array_column($prFiles, 'previous_filename')
|
||||
];
|
||||
|
||||
$repositories = $authorization->skip(fn () => $dbForPlatform->find('repositories', [
|
||||
Query::equal('providerRepositoryId', [$providerRepositoryId]),
|
||||
|
||||
@@ -6,7 +6,9 @@ use Utopia\Validator;
|
||||
|
||||
class BuildTrigger extends Validator
|
||||
{
|
||||
public function __construct(private readonly array $patterns) {}
|
||||
public function __construct(private readonly array $patterns)
|
||||
{
|
||||
}
|
||||
|
||||
public function isValid($value): bool
|
||||
{
|
||||
@@ -32,7 +34,7 @@ class BuildTrigger extends Validator
|
||||
}
|
||||
|
||||
// A pattern is "specific" when it contains no wildcard characters.
|
||||
$isSpecific = fn($p) => !str_contains($p, '*') && !str_contains($p, '?');
|
||||
$isSpecific = fn ($p) => !str_contains($p, '*') && !str_contains($p, '?');
|
||||
|
||||
// 1. Specific inclusion always wins — an explicit exact match is never blocked.
|
||||
foreach ($include as $pattern) {
|
||||
|
||||
Reference in New Issue
Block a user