forked from gitlabhq/gitlabhq
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add latest changes from gitlab-org/gitlab@master
- Loading branch information
GitLab Bot
committed
Jan 31, 2025
1 parent
9332669
commit e231a12
Showing
58 changed files
with
508 additions
and
389 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
app/graphql/resolvers/work_items/description_template_content_resolver.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# frozen_string_literal: true | ||
|
||
module Resolvers | ||
module WorkItems | ||
class DescriptionTemplateContentResolver < BaseResolver | ||
type ::Types::WorkItems::DescriptionTemplateType, null: true | ||
|
||
argument :template_content_input, ::Types::WorkItems::DescriptionTemplateContentInputType, | ||
required: true, | ||
description: "Input for fetching a specific Descriptiontemplate." | ||
|
||
def resolve(args) | ||
project = Project.find(args[:template_content_input].project_id) | ||
|
||
::TemplateFinder.new(:issues, project, { name: args[:template_content_input].name }).execute | ||
|
||
rescue Gitlab::Template::Finders::RepoTemplateFinder::FileNotFoundError, ActiveRecord::RecordNotFound | ||
nil | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
app/graphql/types/work_items/description_template_content_input_type.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
module Types | ||
module WorkItems | ||
class DescriptionTemplateContentInputType < BaseInputObject | ||
graphql_name 'WorkItemDescriptionTemplateContentInput' | ||
|
||
argument :name, GraphQL::Types::String, | ||
required: true, | ||
description: 'Name of the description template.' | ||
argument :project_id, GraphQL::Types::Int, | ||
required: true, | ||
description: 'ID of the project the template belongs to.' | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
data/deprecations/17-9-enable-gitlab-advanced-sast-by-default.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
- title: "GitLab Advanced SAST will be enabled by default" | ||
removal_milestone: "18.0" | ||
announcement_milestone: "17.9" | ||
breaking_change: true | ||
window: 1 | ||
reporter: adamcohen | ||
stage: application security testing | ||
issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/513685 | ||
impact: medium | ||
scope: instance | ||
resolution_role: Developer | ||
manual_task: true | ||
body: | # (required) Don't change this line. | ||
In GitLab 18.0, we will update the [SAST CI/CD templates](https://docs.gitlab.com/ee/user/application_security/sast#stable-vs-latest-sast-templates) to enable [GitLab Advanced SAST](https://docs.gitlab.com/ee/user/application_security/sast/gitlab_advanced_sast) by default in projects with GitLab Ultimate. | ||
Before this change, the GitLab Advanced SAST analyzer was enabled only if you set the CI/CD variable `GITLAB_ADVANCED_SAST_ENABLED` to `true`. | ||
Advanced SAST delivers more accurate results by using cross-file, cross-function scanning and a new ruleset. | ||
Advanced SAST takes over coverage for [supported languages](https://docs.gitlab.com/ee/user/application_security/sast/gitlab_advanced_sast#supported-languages) and disables scanning for that language in the previous scanner. | ||
An automated process migrates results from previous scanners after the first scan on each project's default branch, if they're still detected. | ||
Because it scans your project in more detail, Advanced SAST may take more time to scan your project. | ||
If needed, you can [disable GitLab Advanced SAST](https://docs.gitlab.com/ee/user/application_security/sast/gitlab_advanced_sast#disable-gitlab-advanced-sast-scanning) by setting the CI/CD variable `GITLAB_ADVANCED_SAST_ENABLED` to `false`. |
19 changes: 19 additions & 0 deletions
19
...migrate/20250130100818_remove_cloud_connector_keys_from_application_settings_if_exists.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# frozen_string_literal: true | ||
|
||
class RemoveCloudConnectorKeysFromApplicationSettingsIfExists < Gitlab::Database::Migration[2.2] | ||
milestone '17.9' | ||
|
||
# Follow-up to RemoveCloudConnectorKeysFromApplicationSettings. | ||
# | ||
# This actually removes a column that was added in a previous migration where we had | ||
# to make this a no-op due to a production issue. | ||
# See https://gitlab.com/gitlab-com/gl-infra/production/-/issues/19182 | ||
def up | ||
remove_column(:application_settings, :cloud_connector_keys, if_exists: true) | ||
end | ||
|
||
def down | ||
# no-op since the original migration was turned to a no-op and we don't want to | ||
# add this column back. It was never used. | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
27a9652609620958c529b36430e45199fcee17abfe6a1893719a7663dd48e508 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.