diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml index f497113edd3..82cd1be6bd3 100644 --- a/.gitlab/ci/rules.gitlab-ci.yml +++ b/.gitlab/ci/rules.gitlab-ci.yml @@ -3113,6 +3113,8 @@ - <<: *if-merge-request-labels-force-as-if-jh - if: '$CI_AS_IF_JH_ENABLED != "true"' when: never + - <<: *if-merge-request-not-approved + when: never - <<: *if-merge-request-labels-as-if-jh - <<: *if-merge-request changes: *feature-flag-development-config-patterns @@ -3141,6 +3143,8 @@ changes: *dependency-patterns - if: '$CI_AS_IF_JH_ENABLED != "true"' when: never + - <<: *if-merge-request-not-approved + when: never - <<: *if-merge-request-labels-as-if-jh changes: *dependency-patterns # Ideally, we should be able to do this: diff --git a/GITLAB_PAGES_VERSION b/GITLAB_PAGES_VERSION index 776de310e9a..8573e5508c1 100644 --- a/GITLAB_PAGES_VERSION +++ b/GITLAB_PAGES_VERSION @@ -1 +1 @@ -8a5598bb7b9a2d5a57a299ffda88a71adc57f41b +4b1de41ff2b02d54bf57b0c965d9b265a175a3ec diff --git a/app/models/user.rb b/app/models/user.rb index 9e297234d59..ad70bc39140 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -182,7 +182,7 @@ class User < MainClusterwide::ApplicationRecord has_many :followees, through: :followed_users has_many :following_users, foreign_key: :followee_id, class_name: 'Users::UserFollowUser' - has_many :followers, through: :following_users + has_many :followers, -> { active }, through: :following_users # Namespaces has_many :members diff --git a/doc/api/merge_request_approvals.md b/doc/api/merge_request_approvals.md index 1e107b6b5c2..b7b68577099 100644 --- a/doc/api/merge_request_approvals.md +++ b/doc/api/merge_request_approvals.md @@ -31,6 +31,63 @@ This feature is not ready for production use. Group approval rules apply to all protected branches of projects belonging to the group. This feature is an [Experiment](../policy/experiment-beta-support.md). +### Get group-level approval rules + +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/440638) in GitLab 16.10. + +Group admins can request information about a group's approval rules using the following endpoint: + +```plaintext +GET /groups/:id/approval_rules +``` + +Use the `page` and `per_page` [pagination](rest/index.md#offset-based-pagination) parameters to restrict the list of approval rules. + +Supported attributes: + +| Attribute | Type | Required | Description | +|-----------|-------------------|------------------------|-------------------------------------------------------------------------------| +| `id` | integer or string | Yes | The ID or [URL-encoded path of a project](rest/index.md#namespaced-path-encoding). | + +Example request: + +```shell +curl --request GET --header "PRIVATE-TOKEN: " \ + --url "https://gitlab.example.com/api/v4/groups/29/approval_rules" +``` + +Example response: + +```json +[ + { + "id": 2, + "name": "rule1", + "rule_type": "any_approver", + "eligible_approvers": [], + "approvals_required": 3, + "users": [], + "groups": [], + "contains_hidden_groups": false, + "protected_branches": [], + "applies_to_all_protected_branches": true + }, + { + "id": 3, + "name": "rule2", + "rule_type": "code_owner", + "eligible_approvers": [], + "approvals_required": 2, + "users": [], + "groups": [], + "contains_hidden_groups": false, + "protected_branches": [], + "applies_to_all_protected_branches": true + } +] + +``` + ### Create group-level approval rules Group admins can create group level approval rules using the following endpoint: diff --git a/doc/ci/jobs/img/collapsible-job.png b/doc/ci/jobs/img/collapsible-job.png new file mode 100644 index 00000000000..97f8c475764 Binary files /dev/null and b/doc/ci/jobs/img/collapsible-job.png differ diff --git a/doc/ci/jobs/index.md b/doc/ci/jobs/index.md index 7672a3490a4..125b400326b 100644 --- a/doc/ci/jobs/index.md +++ b/doc/ci/jobs/index.md @@ -356,7 +356,51 @@ Sample raw job log: \e[0Ksection_start:1560896352:my_first_section\r\e[0KHeader of the 1st collapsible section this line should be hidden when collapsed \e[0Ksection_end:1560896353:my_first_section\r\e[0K -``` +``` + +Sample job console log: + +![Custom collapsible sections](img/collapsible-job.png) + +#### Use a script to improve display of collapsible sections + +To remove `echo` statements from the job output, you can move the job contents to a script file and invoke it from the job: + +1. Create a script that can handle the section headers. For example: + + ```shell + # function for starting the section + function section_start () { + local section_title="${1}" + local section_description="${2:-$section_title}" + + echo -e "section_start:`date +%s`:${section_title}[collapsed=true]\r\e[0K${section_description}" + } + + # Function for ending the section + function section_end () { + local section_title="${1}" + + echo -e "section_end:`date +%s`:${section_title}\r\e[0K" + } + + # Create sections + section_start "my_first_section" "Header of the 1st collapsible section" + + echo "this line should be hidden when collapsed" + + section_end "my_first_section" + + # Repeat as required + ``` + +1. Add the script to the `.gitlab-ci.yml` file: + + ```yaml + job: + script: + - source script.sh + ``` ### Pre-collapse sections diff --git a/doc/development/identity_verification.md b/doc/development/identity_verification.md index 7c4aceade90..11e7e4f4969 100644 --- a/doc/development/identity_verification.md +++ b/doc/development/identity_verification.md @@ -19,8 +19,7 @@ Before you enable these features, ensure [hard email confirmation](../security/u | `identity_verification` | Turns on email verification for all registration paths | | `identity_verification_phone_number` | Turns on phone verification for medium risk users for all flows (the Arkose challenge flag for the specific flow and the `identity_verification` flag must be enabled for this to have effect) | | `identity_verification_credit_card` | Turns on credit card verification for high risk users for all flows (the Arkose challenge flag for the specific flow and the `identity_verification` flag must be enabled for this to have effect) | -| `arkose_labs_signup_challenge` | Enables Arkose challenge for all flows, except the Trial and OAuth flows | -| `arkose_labs_oauth_signup_challenge` | Enables Arkose challenge for the OAuth flow | +| `arkose_labs_signup_challenge` | Enables Arkose challenge for all flows | ## Logging diff --git a/doc/subscriptions/gitlab_com/index.md b/doc/subscriptions/gitlab_com/index.md index a76de8b8952..4f95c866075 100644 --- a/doc/subscriptions/gitlab_com/index.md +++ b/doc/subscriptions/gitlab_com/index.md @@ -519,3 +519,10 @@ apply, contact [GitLab Support](https://support.gitlab.com/hc/en-us/requests/new If you cannot link a subscription to your namespace, ensure that you have the Owner role for that namespace. + +### No purchases listed in the Customers Portal account + +To view purchases in the Customers Portal, in the **Manage Purchases** page, you +must be a contact in your organization for the subscription. + +To be added as a contact, [create a ticket with the GitLab Support team](https://support.gitlab.com/hc/en-us/requests/new?ticket_form_id=360000071293). diff --git a/doc/user/profile/index.md b/doc/user/profile/index.md index 8ad0f9db81f..46b399222a4 100644 --- a/doc/user/profile/index.md +++ b/doc/user/profile/index.md @@ -341,6 +341,9 @@ You can follow or unfollow users from either: In [GitLab 15.5 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/360755), the maximum number of users you can follow is 300. +In [GitLab 16.10 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/441774), +blocked users don't appear in the followers list on user profiles. + ### Disable following and being followed by other users > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/325558) in GitLab 16.0 [with a flag](../feature_flags.md) named `disable_follow_users`. diff --git a/doc/user/search/exact_code_search.md b/doc/user/search/exact_code_search.md index 6be9ea3f842..462c0751d88 100644 --- a/doc/user/search/exact_code_search.md +++ b/doc/user/search/exact_code_search.md @@ -52,18 +52,18 @@ To request access to this feature, contact GitLab. This table shows some example queries for exact code search. -| Query | Description | -| -------------------- |-------------------------------------------------------------------------------------- | -| `foo` | Returns files that contain `foo` | -| `foo file:^doc/` | Returns files that contain `foo` in directories that start with `doc/` | -| `"class foo"` | Returns files that contain the exact string `class foo` | -| `class foo` | Returns files that contain both `class` and `foo` | -| `foo or bar` | Returns files that contain either `foo` or `bar` | -| `class Foo` | Returns files that contain `class` (case insensitive) and `Foo` (case sensitive) | -| `class Foo case:yes` | Returns files that contain `class` and `Foo` (both case sensitive) | -| `foo -bar` | Returns files that contain `foo` but not `bar` | -| `foo file:js` | Searches for `foo` in files with names that contain `js` | -| `foo -file:test` | Searches for `foo` in files with names that do not contain `test` | -| `foo lang:ruby` | Searches for `foo` in Ruby source code | -| `foo file:\.js$` | Searches for `foo` in files with names that end with `.js` | -| `foo.*bar` | Searches for strings that match the regular expression `foo.*bar` | +| Query | Description | +|----------------------|-----------------------------------------------------------------------------------| +| `foo` | Returns files that contain `foo`. | +| `foo file:^doc/` | Returns files that contain `foo` in directories that start with `doc/`. | +| `"class foo"` | Returns files that contain the exact string `class foo`. | +| `class foo` | Returns files that contain both `class` and `foo`. | +| `foo or bar` | Returns files that contain either `foo` or `bar`. | +| `class Foo` | Returns files that contain `class` (case insensitive) and `Foo` (case sensitive). | +| `class Foo case:yes` | Returns files that contain `class` and `Foo` (both case sensitive). | +| `foo -bar` | Returns files that contain `foo` but not `bar`. | +| `foo file:js` | Searches for `foo` in files with names that contain `js`. | +| `foo -file:test` | Searches for `foo` in files with names that do not contain `test`. | +| `foo lang:ruby` | Searches for `foo` in Ruby source code. | +| `foo file:\.js$` | Searches for `foo` in files with names that end with `.js`. | +| `foo.*bar` | Searches for strings that match the regular expression `foo.*bar`. | diff --git a/doc/user/search/index.md b/doc/user/search/index.md index 07079932c49..9d978ef08df 100644 --- a/doc/user/search/index.md +++ b/doc/user/search/index.md @@ -169,7 +169,9 @@ in your browser. To run a search from history: 1. On the left sidebar, select **Search or go to** and find your project. 1. To view recent searches: - - For issues, on the left sidebar, select **Plan > Issues**. Above the list, to the left of the search box, select (**{history}**). - - For merge requests, on the left sidebar, select **Code > Merge requests**. Above the list, to the left of the search box, select **Recent searches**. + - For issues, select **Plan > Issues**. + To the left of the search box, select **Recent searches** (**{history}**). + - For merge requests, select **Code > Merge requests**. + To the left of the search box, select **Recent searches**. 1. From the dropdown list, select a search. diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index c6a51c230a9..e62d79c5170 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -4378,6 +4378,19 @@ RSpec.describe User, feature_category: :user_profile do expect(user.following?(followee)).to be_falsey end + + it 'does not include follow if follower user is banned' do + user = create(:user) + + follower = create(:user) + follower.follow(user) + + expect(user.followed_by?(follower)).to be_truthy + + follower.ban + + expect(user.followed_by?(follower)).to be_falsey + end end describe '#unfollow' do