Skip to content

Commit 96ddec9

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent be5378b commit 96ddec9

File tree

11 files changed

+152
-66
lines changed

11 files changed

+152
-66
lines changed

GITLAB_KAS_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
fbc2185f0b97e3f9340bdfb365e2c8b9e24788da
1+
4cbdaf5d1ab9382c53e36fdbd2df26b6e5e6151f

app/assets/javascripts/lib/utils/datetime/date_format_utility.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,18 @@ export const toISODateFormat = (date) => {
348348
return `${year}-${month}-${day}`;
349349
};
350350

351+
/**
352+
* Formats a date into an ISO string without milliseconds.
353+
*
354+
* @example
355+
* // returns '2020-01-29T00:00:00Z'
356+
* toISOStringWithoutMilliseconds(new Date('2020-01-29:00:00:00.123'))
357+
*
358+
* @param {Date} date The date to be formatted
359+
* @returns {string} The ISO string without milliseconds.
360+
*/
361+
export const toISOStringWithoutMilliseconds = (date) => date.toISOString().replace(/\.\d+Z$/, 'Z');
362+
351363
/**
352364
* This combines a date and a time and returns the computed Date's ISO string representation.
353365
*

app/assets/javascripts/todos/utils.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
1+
import { toISOStringWithoutMilliseconds } from '~/lib/utils/datetime_utility';
12
import { updateGlobalTodoCount } from '~/sidebar/utils';
23
import snoozeTodoMutation from './components/mutations/snooze_todo.mutation.graphql';
34

45
export function snoozeTodo(apolloClient, todo, until) {
6+
/**
7+
* The API responds with the datetime in ISO 8601 format, without milliseconds. We therefore need
8+
* to strip the milliseconds client-side as well so that the optimistic response matches the
9+
* actual response. Mismatching date formats would invalidate the Apollo cache, in turn causing
10+
* the todos to be re-fetched unexpectedly.
11+
*/
12+
const snoozedUntilISOString = toISOStringWithoutMilliseconds(until);
13+
514
return apolloClient.mutate({
615
mutation: snoozeTodoMutation,
716
variables: {
817
todoId: todo.id,
9-
snoozeUntil: until,
18+
snoozeUntil: snoozedUntilISOString,
1019
},
1120
optimisticResponse: () => {
1221
updateGlobalTodoCount(-1);
@@ -15,7 +24,7 @@ export function snoozeTodo(apolloClient, todo, until) {
1524
todoSnooze: {
1625
todo: {
1726
id: todo.id,
18-
snoozedUntil: until,
27+
snoozedUntil: snoozedUntilISOString,
1928
__typename: 'Todo',
2029
},
2130
errors: [],

data/deprecations/16-5-ci-job-token-limit-setting.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
reporter: jocelynjane # (required) GitLab username of the person reporting the deprecation
1010
stage: govern # (required) String value of the stage that the feature was created in. e.g., Growth
1111
issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/383084 # (required) Link to the deprecation issue in GitLab
12+
check_impact: Use the [Authentication Log](../ci/jobs/ci_job_token.md#job-token-authentication-log) to verify which projects are authenticating with your project.
1213
impact: high # Can be one of: [critical, high, medium, low]
1314
scope: project # Can be one or a combination of: [instance, group, project]
1415
resolution_role: Maintainer # Can be one of: [Admin, Owner, Maintainer, Developer]

data/deprecations/templates/example.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
reporter: exampleuser # The GitLab username of the person reporting the change
3131
stage: stage
3232
issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/000000
33+
check_impact: # Link to a resource, like a tool, issue, docs section, or KB article, that has *concrete steps* for customers to assess the impact of this change.
3334
impact: # Can be one of: [critical, high, medium, low]
3435
impact_details: # Use the impact calculator and paste the full url in here. It will deep link to the configuration. https://gitlab-com.gitlab.io/gl-infra/breaking-change-impact-calculator/?
3536
impact_offering: # The offering this impacts. Can be one or a combination of: [GitLab.com, Dedicated, self-managed]

doc/api/graphql/reference/_index.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7679,6 +7679,35 @@ Input type: `LabelCreateInput`
76797679
| <a id="mutationlabelcreateerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
76807680
| <a id="mutationlabelcreatelabel"></a>`label` | [`Label`](#label) | Label after mutation. |
76817681

7682+
### `Mutation.ldapAdminRoleLinkCreate`
7683+
7684+
Creates an instance-level custom admin role LDAP link.
7685+
7686+
{{< details >}}
7687+
**Introduced** in GitLab 17.11.
7688+
**Status**: Experiment.
7689+
{{< /details >}}
7690+
7691+
Input type: `LdapAdminRoleLinkCreateInput`
7692+
7693+
#### Arguments
7694+
7695+
| Name | Type | Description |
7696+
| ---- | ---- | ----------- |
7697+
| <a id="mutationldapadminrolelinkcreateadminmemberroleid"></a>`adminMemberRoleId` | [`MemberRoleID!`](#memberroleid) | Global ID of the custom admin role to be assigned to a user. |
7698+
| <a id="mutationldapadminrolelinkcreateclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
7699+
| <a id="mutationldapadminrolelinkcreatecn"></a>`cn` | [`String`](#string) | Common Name (CN) of the LDAP group. |
7700+
| <a id="mutationldapadminrolelinkcreatefilter"></a>`filter` | [`String`](#string) | Search filter for the LDAP group. |
7701+
| <a id="mutationldapadminrolelinkcreateprovider"></a>`provider` | [`String!`](#string) | LDAP provider for the LDAP link. |
7702+
7703+
#### Fields
7704+
7705+
| Name | Type | Description |
7706+
| ---- | ---- | ----------- |
7707+
| <a id="mutationldapadminrolelinkcreateclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
7708+
| <a id="mutationldapadminrolelinkcreateerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
7709+
| <a id="mutationldapadminrolelinkcreateldapadminrolelink"></a>`ldapAdminRoleLink` | [`LdapAdminRoleLink`](#ldapadminrolelink) | Created instance-level LDAP link. |
7710+
76827711
### `Mutation.markAsSpamSnippet`
76837712

76847713
Input type: `MarkAsSpamSnippetInput`

0 commit comments

Comments
 (0)