The fork gate looked up the pull request head on GitHub after the checkout,
and accepted it when it was the checked out commit or that commit's second
parent. The contributor chooses the parents of the commits they push: a
commit whose second parent is an approved one, pushed back to that approved
commit right after the checkout, passed the gate while its own tree was
built. Reading the head after the checkout also left a race open.
Once a member's approval of the head commit is confirmed, the gate now
checks that commit out, cleans the workspace, and merges the target branch
as fetched from this repository when there is one, before any code of the
pull request runs. Whatever the branch did meanwhile, the approved tree is
the one built. If the approved commit is not in the workspace, the build
fails and asks for a re-run, as before.
The same block is in the Jenkinsfiles of twake-contacts-frontend,
twake-calendar-frontend, twake-calendar-side-service, webadmin-proxy,
tmail-flutter, esn-sabre, tmail-backend and twake-mail-admin.
* ci: fail a fork build whose pinned revision is not the approved commit
Checking out the approved commit in place of the pinned revision built the
right tree, but Jenkins still reported the build status on the revision it
pinned: a passing build could mark a commit nobody reviewed as green.
The gate no longer changes the checkout. It accepts it when HEAD is the
approved commit, or when HEAD is the merge Jenkins made of the approved
commit with the target branch: its first parent is the approved commit, and
so is the pull request revision Jenkins fetched as origin/<BRANCH_NAME>.
Otherwise the build fails and asks for a re-run.
* ci: compare the tree of a fork merge build with the approved merge
The merge case of the fork gate trusted HEAD^1 once origin/<BRANCH_NAME> was
the approved commit. That ref is fetched apart from the revision Jenkins
checks out, so it does not prove which one was pinned, and a single-parent
child of the approved commit passed.
A checkout other than the approved commit is now accepted only as the merge
Jenkins makes: two parents, the approved commit then origin/<CHANGE_TARGET>,
and a tree equal to that merge redone in a scratch worktree outside the
workspace. A commit the contributor shaped like that merge but with a tree
of their own is refused.
* ci: apply the fork gate fix to JenkinsfileMobile
The mobile pipeline carries the same fork gate block as the Jenkinsfile and
still accepted the approved commit as HEAD^2 of the checkout. It now uses the
same pullRequestHead and requireApprovedCheckout.
Start the pipeline with the Authorize fork stage of twake-contacts-frontend:
a fork pull request builds only when its owner is a linagora member, or a
member approved its head commit or reviewed it with "Build this please".
Bind the github and dockerHub credentials only around the steps that use
them, Docker Hub in a throwaway Docker config. The helpers are the same
block in the Jenkinsfiles of twake-contacts-frontend, twake-calendar-frontend,
twake-calendar-side-service, webadmin-proxy and tmail-flutter.
* Bump tmail-backend docker image to 1.0.23.1
* Synchronize the pool backend image tag with the main Compose configuration
---------
Co-authored-by: Software Factory <software-factory@linagora.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* TF-5156 Expose AccountSwitchLoadingDialog as a named dialog and hide its avatar initial from screen readers
* TF-5156 Keep AccountSwitchLoadingDialog semantics merged with its Focus node and assert the dialog is focusable
* TF-5022 T-11 Send the session request to the JMAP URL in DynamicUrlInterceptors so a session reload no longer hits the API URL
* TF-5022 T-11 Add Settings › Delegation with DelegatedToMeNotifier and DelegatedToMeSection to list mailboxes delegated to me and remove my access
* TF-5022 T-11 Drop stale or signed-out session re-reads in DelegatedToMeNotifier and open a delegation link once the local settings load
* TF-5022 T-11 Share the pending re-read setup of the sign-out and user-change tests in DelegatedToMeNotifier tests
* TF-5022 T-11 Keep Delegation selected in ManageAccountMenuController when the quota loads after a deferred delegation link opens
* TF-5022 T-11 Clear the stored Delegation selection in ManageAccountMenuController when Delegation becomes hidden
* TF-5022 T-11 Clear the pending delegation link in ManageAccountDashBoardController.selectSettings when the user picks a settings page
* TF-4924 Pass number of days to recover deleted messages description
* TF-4924 Remove env.file from the change
* TF-4924 Add day boundary tests for restoration horizon
* TF-4924 Rename horizon to restorationDuration
* TF-4924 Add web scenario for recover deleted messages description
Open Trash and tap the toolbar recover button on the desktop layout, then assert the description has no duplicated day unit.
* TF-4924 Add zero day clamp test for getRestorationHorizonInDays
---------
Co-authored-by: dab246 <tdvu@linagora.com>
* TF-5099 Prevent StringConvert from corrupting plain entries matching Base64 and URL patterns
- Only decode Base64 strings when decoded output contains '@' and raw input does not
- Wrap Uri.decodeComponent in try-catch to preserve addresses with literal '%'
- Add regression tests in string_convert_test.dart
* refactor: extract _decodeInputIfNeeded to reduce cognitive complexity
* TF-5099 Cover percent and base64 address extraction with more tests
* Update core/lib/utils/string_convert.dart
Co-authored-by: Dat Vu <datx1995@gmail.com>
* refactor: flatten URL decode condition and add regression test for percent-escaped addresses
* TF-5099 Cover invalid percent and partial-encode address pins
* TF-5099 Pin behavior for mixed and quoted partially encoded addresses
---------
Co-authored-by: Dat H. Pham <dphamhoang@linagora.com>
Co-authored-by: Dat Vu <datx1995@gmail.com>
Co-authored-by: dab246 <80730648+dab246@users.noreply.github.com>
* TF-5022 T-08 Add WorkplaceAccountSwitcher chip in the Workplace header with web e2e
* TF-5022 T-08 Extract CozyHeaderRow and drop the Spacer before WorkplaceAccountSwitcher in MailboxDashBoardView
* TF-5022 T-08 Reuse switchShownAccountOrToastFailure in WorkplaceAccountSwitcher
* TF-5022 T-08 Share AccountSwitchRobotMixin across web account switcher robots and drop unfocus in WebWorkplaceAccountSwitcherAssertionRobot
* TF-5022 T-08 Dispose keyboardShortcutFocusNode after the composer view unmounts in ComposerController.onKeyboardShortcutDispose
* TF-5022 T-08 Switch to the URL account inside Cozy in startOnUrlAccount and drop duplicated PDF keys in intl_messages.arb
* TF-5022 T-08 Point linagora_design_flutter at fix/tf-5022-account-menu-item-key for unique LinagoraAccountMenu row keys
* TF-5022 T-08 Point linagora_design_flutter back to master now that LinagoraAccountMenu row keys are merged
* TF-5022 T-07.1 Write the shown delegated account into web URLs and parse it back in RouteUtils and NavigationRouter
* TF-5022 T-07.1 Preview the .eml of the URL account in EmailPreviewerController via SessionDelegationExtension.delegatedAccountIdOrMine
* TF-5022 T-07.1 Reset LabelController.isLabelsLoaded when checkLabelSettingState gets another account
* TF-5022 T-07.1 Start on the URL account via startOnUrlAccount in MailboxController
* TF-5022 T-07.1 Open Inbox instead of the unknown page for missing delegated link targets in MailboxController and ThreadController
* TF-5022 T-07.1 Add the stand-alone web e2e naming the shown delegated account in the URL
* TF-5022 T-07.1 Return no account from RouteUtils.parseAccountId for a malformed account instead of throwing
* TF-5022 T-07.1 Open nested .eml links on the account of the tab in EmailPreviewerController.emlPreviewUriOnAccount
* TF-5022 T-07.1 Ignore a late GetAllLabelFailure of another account in LabelController.handleFailureViewState
* TF-5022 T-07.1 Open Inbox via _switchBackToMailboxDefault in MailboxController.openMissingTargetFromLocationBar
* TF-5022 T-07.1 Leave search to Inbox only on NotFoundEmailException from ThreadAPI.getEmailById in ThreadController
* TF-5022 T-07.1 Keep the shown delegated account in RouteUtils.generateNavigationRoute dashboard paths