Skip to content

Organize imports with Prettier plugin #2853

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 5, 2024
Merged

Organize imports with Prettier plugin #2853

merged 1 commit into from
Sep 5, 2024

Conversation

pquentin
Copy link
Member

@pquentin pquentin commented Sep 4, 2024

Prettier does not organize imports by default, but there's a popular plugin to do so: https://www.npmjs.com/package/prettier-plugin-organize-imports. My initial motivation was to avoid unused imports, but not having to worry about import order is nice too.

Copy link
Member Author

@pquentin pquentin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are plenty of unused imports, but they can be hidden in the noise, so I've highlighted two.

@@ -18,7 +18,6 @@
*/

import { Dictionary } from '@spec_utils/Dictionary'
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's an example of unused import.

import { IndexSettings } from '@indices/_types/IndexSettings'
import { Dictionary } from '@spec_utils/Dictionary'
import { IndexName, Metadata, Name, VersionNumber } from '@_types/common'
import { TypeMapping } from '@_types/mapping/TypeMapping'
import {
DataStreamLifecycle,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this is the import that actively misled me, as it shows up when I asked my editor to find references or DataStreamLifecycle.

Copy link
Contributor

github-actions bot commented Sep 4, 2024

Following you can find the validation results for the APIs you have changed.

API Status Request Response
async_search.submit 🟢 7/7 7/7
autoscaling.get_autoscaling_capacity Missing test Missing test
autoscaling.put_autoscaling_policy Missing test Missing test
bulk 🟢 419/419 437/437
cat.count 🟢 9/9 9/9
cat.health 🔴 3/3 0/3
cat.ml_data_frame_analytics 🟢 5/5 5/5
cat.ml_datafeeds 🟢 4/4 4/4
cat.ml_jobs 🟢 4/4 4/4
cat.recovery 🟢 6/6 6/6
cat.snapshots 🟢 4/4 4/4
cat.tasks 🟢 11/11 11/11
cat.transforms 🟢 7/7 7/7
ccr.delete_auto_follow_pattern Missing test Missing test
ccr.follow_info Missing test Missing test
ccr.follow_stats Missing test Missing test
ccr.follow Missing test Missing test
ccr.forget_follower Missing test Missing test
ccr.get_auto_follow_pattern Missing test Missing test
ccr.pause_auto_follow_pattern Missing test Missing test
ccr.pause_follow Missing test Missing test
ccr.put_auto_follow_pattern Missing test Missing test
ccr.resume_auto_follow_pattern Missing test Missing test
ccr.resume_follow Missing test Missing test
ccr.stats Missing test Missing test
ccr.unfollow Missing test Missing test
clear_scroll 🟢 17/17 17/17
cluster.allocation_explain 🔴 5/5 1/5
cluster.delete_component_template 🟢 2/2 2/2
cluster.delete_voting_config_exclusions 🟢 1/1 1/1
cluster.exists_component_template Missing test Missing test
cluster.get_component_template 🔴 10/10 8/10
cluster.get_settings 🟢 7/7 7/7
cluster.health 🔴 153/153 31/153
cluster.info 🔴 4/4 2/4
cluster.pending_tasks 🟢 3/3 3/3
cluster.post_voting_config_exclusions 🔴 5/5 1/5
cluster.put_component_template 🔴 21/29 29/29
cluster.put_settings 🟢 58/58 57/57
cluster.remote_info 🟢 3/3 3/3
cluster.reroute 🟢 6/6 5/5
cluster.state 🟢 80/80 79/79
cluster.stats 🔴 21/21 0/21
connector.check_in 🟢 3/3 3/3
connector.delete 🟢 9/9 9/9
connector.get 🔴 60/60 59/60
connector.last_sync 🟢 7/7 7/7
connector.list 🟢 19/19 19/19
connector.post 🟢 7/7 7/7
connector.put 🟢 13/13 13/13
connector.secret_delete 🟠 Missing type Missing type
connector.secret_get 🟠 Missing type Missing type
connector.secret_post 🟠 Missing type Missing type
connector.secret_put 🟠 Missing type Missing type
connector.sync_job_cancel 🟢 3/3 3/3
connector.sync_job_check_in 🟠 Missing type Missing type
connector.sync_job_claim 🟠 Missing type Missing type
connector.sync_job_delete 🟢 4/4 4/4
connector.sync_job_error 🟠 Missing type Missing type
connector.sync_job_get 🟢 22/22 22/22
connector.sync_job_list 🟢 12/12 12/12
connector.sync_job_post 🟢 50/50 50/50
connector.sync_job_update_stats 🟠 Missing type Missing type
connector.update_active_filtering 🟢 1/1 1/1
connector.update_api_key_id 🟢 4/4 4/4
connector.update_configuration 🔴 8/9 9/9
connector.update_error 🟢 4/4 4/4
connector.update_features 🟠 Missing type Missing type
connector.update_filtering_validation 🟢 3/3 3/3
connector.update_filtering 🟢 12/12 12/12
connector.update_index_name 🟢 4/4 4/4
connector.update_name 🟢 4/4 4/4
connector.update_native 🟢 3/3 3/3
connector.update_pipeline 🟢 3/3 3/3
connector.update_scheduling 🟢 3/3 3/3
connector.update_service_type 🟢 2/2 2/2
connector.update_status 🟢 3/3 3/3
delete_by_query 🟢 5/5 4/4
enrich.delete_policy 🟢 9/9 9/9
enrich.execute_policy 🟢 9/9 9/9
enrich.get_policy 🟢 6/6 6/6
enrich.put_policy 🟢 10/10 10/10
enrich.stats 🟢 6/6 6/6
eql.delete 🟢 3/3 3/3
eql.get_status 🟢 3/3 3/3
eql.get 🟢 3/3 3/3
eql.search 🟢 32/32 32/32
esql.async_query_get 🟠 Missing type Missing type
esql.async_query 🟠 Missing type Missing type
esql.query 🔴 253/253 15/253
exists_source 🟢 3/3 3/3
exists 🟢 19/19 19/19
explain 🟢 15/15 15/15
fleet.global_checkpoints Missing test Missing test
fleet.msearch Missing test Missing test
fleet.search Missing test Missing test
get_source 🟢 18/18 18/18
get 🟢 295/295 292/292
graph.explore 🟢 4/4 4/4
health_report 🟢 4/4 4/4
ilm.delete_lifecycle 🟢 2/2 2/2
ilm.explain_lifecycle 🟢 5/5 5/5
ilm.get_lifecycle 🟢 8/8 8/8
ilm.get_status 🟢 4/4 4/4
ilm.migrate_to_data_tiers Missing test Missing test
ilm.move_to_step Missing test Missing test
ilm.put_lifecycle 🟢 6/6 6/6
ilm.remove_policy 🟢 5/5 5/5
ilm.retry Missing test Missing test
ilm.start Missing test Missing test
ilm.stop 🟢 4/4 4/4
indices.add_block 🟢 2/2 2/2
indices.analyze 🔴 234/244 244/244
indices.clear_cache 🟢 4/4 4/4
indices.clone 🟢 5/5 5/5
indices.close 🟢 49/49 49/49
indices.create_data_stream 🟢 28/28 28/28
indices.create 🔴 1009/1083 1083/1083
indices.data_streams_stats 🟢 4/4 4/4
indices.delete_alias 🔴 15/15 5/15
indices.delete_data_lifecycle Missing test Missing test
indices.delete_data_stream 🟢 28/28 28/28
indices.delete_index_template 🟢 1/1 1/1
indices.delete_template 🟢 9/9 9/9
indices.delete 🟢 105/105 105/105
indices.disk_usage 🟢 5/5 5/5
indices.downsample 🟢 1/1 1/1
indices.exists_alias 🟢 38/38 38/38
indices.exists_index_template Missing test Missing test
indices.exists_template 🟢 15/15 15/15
indices.exists 🟢 39/39 39/39
indices.explain_data_lifecycle Missing test Missing test
indices.field_usage_stats 🟢 5/5 5/5
indices.flush 🟢 40/40 40/40
indices.forcemerge 🔴 12/12 11/12
indices.get_alias 🔴 86/86 74/86
indices.get_data_lifecycle Missing test Missing test
indices.get_data_stream 🟢 11/11 11/11
indices.get_field_mapping 🔴 15/15 14/15
indices.get_index_template 🟢 11/11 11/11
indices.get_mapping 🔴 135/135 133/135
indices.get_settings 🔴 62/62 60/62
indices.get_template 🟢 30/30 30/30
indices.get 🟢 53/53 53/53
indices.migrate_to_data_stream Missing test Missing test
indices.modify_data_stream Missing test Missing test
indices.open 🟢 20/20 20/20
indices.promote_data_stream Missing test Missing test
indices.put_alias 🔴 59/59 20/59
indices.put_data_lifecycle Missing test Missing test
indices.put_index_template 🔴 48/58 58/58
indices.put_mapping 🔴 114/115 115/115
indices.put_settings 🔴 54/57 57/57
indices.put_template 🔴 44/45 45/45
indices.recovery 🟢 9/9 9/9
indices.refresh 🟢 268/268 268/268
indices.reload_search_analyzers 🟢 2/2 2/2
indices.resolve_cluster 🔴 10/12 12/12
indices.resolve_index 🟢 6/6 6/6
indices.rollover 🔴 26/26 1/26
indices.segments 🔴 6/6 5/6
indices.shard_stores 🔴 5/5 4/5
indices.shrink 🟢 5/5 5/5
indices.simulate_index_template 🔴 6/7 5/7
indices.simulate_template 🔴 5/5 4/5
indices.split 🟢 11/11 11/11
indices.stats 🔴 112/112 33/111
indices.unfreeze 🟢 1/1 1/1
indices.update_aliases 🔴 26/26 7/26
indices.validate_query 🟢 12/12 12/12
inference.delete Missing test Missing test
inference.get 🟢 4/4 4/4
inference.inference Missing test Missing test
inference.put Missing test Missing test
ingest.delete_geoip_database 🟢 1/1 1/1
ingest.delete_pipeline 🟢 15/15 15/15
ingest.geo_ip_stats 🟢 1/1 1/1
ingest.get_geoip_database 🟢 4/4 4/4
ingest.get_pipeline 🔴 22/22 21/22
ingest.processor_grok 🟢 1/1 1/1
ingest.put_geoip_database 🟢 3/3 3/3
ingest.put_pipeline 🔴 57/59 59/59
ingest.simulate 🔴 6/9 9/9
knn_search 🟢 4/4 4/4
logstash.put_pipeline Missing test Missing test
mget 🟢 53/53 52/52
migration.get_feature_upgrade_status 🟢 2/2 2/2
ml.clear_trained_model_deployment_cache 🟢 1/1 1/1
ml.close_job 🟢 64/64 63/63
ml.delete_calendar_event 🟢 4/4 4/4
ml.delete_calendar_job 🟢 3/3 3/3
ml.delete_calendar 🟢 5/5 5/5
ml.delete_data_frame_analytics 🟢 2/2 2/2
ml.delete_datafeed 🟢 3/3 3/3
ml.delete_expired_data 🟢 5/5 5/5
ml.delete_filter 🟢 27/27 27/27
ml.delete_forecast 🟢 3/3 3/3
ml.delete_job 🟢 47/47 47/47
ml.delete_model_snapshot 🟢 2/2 2/2
ml.delete_trained_model_alias 🟢 3/3 3/3
ml.delete_trained_model 🟢 5/5 5/5
ml.estimate_model_memory 🟢 16/16 16/16
ml.evaluate_data_frame 🟢 15/15 15/15
ml.explain_data_frame_analytics 🟢 7/7 7/7
ml.flush_job 🟢 15/15 15/15
ml.forecast 🟢 1/1 1/1
ml.get_buckets 🟢 14/14 14/14
ml.get_calendar_events 🟢 17/17 17/17
ml.get_calendars 🟢 17/17 17/17
ml.get_categories 🟢 12/12 12/12
ml.get_data_frame_analytics_stats 🟢 12/12 12/12
ml.get_data_frame_analytics 🔴 17/17 14/17
ml.get_datafeed_stats 🟢 27/27 27/27
ml.get_datafeeds 🔴 20/20 9/20
ml.get_filters 🟢 13/13 13/13
ml.get_influencers 🟢 11/11 11/11
ml.get_job_stats 🔴 32/32 30/32
ml.get_jobs 🔴 31/31 22/31
ml.get_memory_stats 🟢 6/6 6/6
ml.get_model_snapshot_upgrade_stats 🟢 3/3 3/3
ml.get_model_snapshots 🟢 18/18 18/18
ml.get_overall_buckets 🟢 16/16 15/15
ml.get_records 🟢 8/8 8/8
ml.get_trained_models_stats 🔴 17/17 10/17
ml.get_trained_models 🔴 36/37 32/37
ml.infer_trained_model 🟢 10/10 10/10
ml.info 🔴 10/10 2/10
ml.open_job 🟢 83/83 83/83
ml.post_calendar_events 🟢 21/21 21/21
ml.post_data 🔴 9/11 14/18
ml.preview_data_frame_analytics 🟢 3/3 3/3
ml.preview_datafeed 🟢 17/17 17/17
ml.put_calendar_job 🟢 12/12 12/12
ml.put_calendar 🟢 135/135 135/135
ml.put_data_frame_analytics 🔴 32/33 32/33
ml.put_datafeed 🔴 70/71 53/71
ml.put_filter 🟢 27/27 27/27
ml.put_job 🔴 219/227 223/225
ml.put_trained_model_alias 🟢 13/13 13/13
ml.put_trained_model_definition_part 🟢 1/1 1/1
ml.put_trained_model_vocabulary 🟢 1/1 1/1
ml.put_trained_model 🔴 15/16 6/16
ml.reset_job 🟢 2/2 2/2
ml.revert_model_snapshot 🟢 2/2 2/2
ml.set_upgrade_mode 🟢 6/6 6/6
ml.start_data_frame_analytics 🟢 1/1 1/1
ml.start_datafeed 🟢 24/24 24/24
ml.start_trained_model_deployment 🔴 14/14 4/14
ml.stop_data_frame_analytics 🟢 5/5 5/5
ml.stop_datafeed 🟢 17/17 17/17
ml.stop_trained_model_deployment 🟢 10/10 10/10
ml.update_data_frame_analytics 🟢 2/2 2/2
ml.update_datafeed 🔴 7/7 2/7
ml.update_filter 🟢 3/3 3/3
ml.update_job 🔴 4/5 5/5
ml.update_model_snapshot 🟢 3/3 3/3
ml.update_trained_model_deployment 🔴 4/4 2/4
ml.upgrade_job_snapshot 🟢 3/3 3/3
ml.validate_detector 🟢 2/2 2/2
ml.validate 🟢 3/3 3/3
monitoring.bulk 🟢 6/6 6/6
msearch_template 🟢 1/1 1/1
msearch 🟢 17/17 16/16
nodes.clear_repositories_metering_archive Missing test Missing test
nodes.get_repositories_metering_info Missing test Missing test
nodes.hot_threads 🟢 5/5 5/5
nodes.info 🔴 116/116 1/116
nodes.reload_secure_settings 🟢 2/2 2/2
nodes.stats 🔴 52/52 15/52
nodes.usage 🟢 1/1 1/1
query_rules.delete_rule 🟢 6/6 6/6
query_rules.delete_ruleset 🟢 7/7 7/7
query_rules.get_rule 🟢 5/5 5/5
query_rules.get_ruleset 🟢 8/8 8/8
query_rules.list_rulesets 🟢 7/7 7/7
query_rules.put_rule 🟢 7/7 7/7
query_rules.put_ruleset 🟢 13/13 13/13
reindex 🟢 15/15 14/14
rollup.delete_job 🟢 3/3 3/3
rollup.get_rollup_caps 🟢 3/3 3/3
search_application.delete_behavioral_analytics 🟢 3/3 3/3
search_application.delete 🟢 7/7 7/7
search_application.get_behavioral_analytics 🔴 2/5 5/5
search_application.get 🔴 10/10 6/10
search_application.list 🔴 7/7 2/7
search_application.post_behavioral_analytics_event 🟠 Missing type Missing type
search_application.put_behavioral_analytics 🟢 3/3 3/3
search_application.put 🔴 0/10 10/10
search_application.render_query 🟠 Missing type Missing type
search_application.search 🟢 16/16 16/16
search_mvt 🔴 34/34 0/34
search_shards 🟢 7/7 7/7
search_template 🟢 2/2 1/1
search 🔴 2188/2265 2199/2247
searchable_snapshots.cache_stats Missing test Missing test
searchable_snapshots.stats 🟢 1/1 1/1
security.activate_user_profile 🟢 9/9 9/9
security.authenticate 🟢 30/30 30/30
security.bulk_delete_role 🟢 1/1 1/1
security.bulk_put_role 🟢 1/1 1/1
security.bulk_update_api_keys 🟠 Missing type Missing type
security.change_password 🟢 9/9 9/9
security.clear_api_key_cache 🟢 13/13 13/13
security.clear_cached_privileges 🟢 3/3 3/3
security.clear_cached_realms 🟢 1/1 1/1
security.clear_cached_roles 🟢 2/2 2/2
security.clear_cached_service_tokens 🟢 4/4 4/4
security.create_api_key 🔴 67/69 60/60
security.create_cross_cluster_api_key 🟠 Missing type Missing type
security.create_service_token 🟢 3/3 3/3
security.delete_privileges 🟢 6/6 6/6
security.delete_role_mapping 🟢 9/9 9/9
security.delete_role 🟢 8/8 8/8
security.delete_service_token Missing test Missing test
security.delete_user 🟢 9/9 9/9
security.disable_user_profile 🟢 1/1 1/1
security.disable_user 🟢 3/3 3/3
security.enable_user_profile 🟢 1/1 1/1
security.enable_user 🟢 4/4 4/4
security.enroll_kibana Missing test Missing test
security.enroll_node Missing test Missing test
security.get_api_key 🔴 38/38 15/38
security.get_builtin_privileges 🔴 2/2 1/2
security.get_privileges 🟢 12/12 12/12
security.get_role_mapping 🔴 18/18 10/18
security.get_role 🔴 24/24 21/24
security.get_service_accounts Missing test Missing test
security.get_service_credentials 🟢 1/1 1/1
security.get_settings 🟠 Missing type Missing type
security.get_token 🟢 25/25 24/24
security.get_user_privileges 🔴 8/8 7/8
security.get_user_profile 🟢 8/8 8/8
security.get_user 🟢 25/25 25/25
security.grant_api_key 🟢 7/7 7/7
security.has_privileges_user_profile 🟢 3/3 3/3
security.has_privileges 🟢 24/24 24/24
security.invalidate_api_key 🟢 12/12 12/12
security.invalidate_token 🟢 11/11 11/11
security.oidc_authenticate 🟠 Missing type Missing type
security.oidc_logout 🟠 Missing type Missing type
security.oidc_prepare_authentication 🟠 Missing type Missing type
security.put_privileges 🟢 10/10 10/10
security.put_role_mapping 🔴 2/11 11/11
security.put_role 🔴 38/39 38/38
security.put_user 🟢 48/48 47/47
security.query_api_keys 🔴 14/14 1/14
security.query_role 🟢 2/2 2/2
security.query_user 🟢 4/4 4/4
security.saml_authenticate Missing test Missing test
security.saml_complete_logout Missing test Missing test
security.saml_invalidate Missing test Missing test
security.saml_logout Missing test Missing test
security.saml_prepare_authentication Missing test Missing test
security.saml_service_provider_metadata Missing test Missing test
security.suggest_user_profiles 🟢 1/1 1/1
security.update_api_key 🟢 5/5 5/5
security.update_cross_cluster_api_key 🟠 Missing type Missing type
security.update_settings 🟠 Missing type Missing type
security.update_user_profile_data 🟢 1/1 1/1
slm.delete_lifecycle 🟢 4/4 4/4
slm.execute_lifecycle 🟢 4/4 4/4
slm.execute_retention 🟢 4/4 4/4
slm.get_lifecycle 🟢 16/16 16/16
slm.get_stats 🟢 4/4 4/4
slm.get_status 🟢 4/4 4/4
slm.put_lifecycle 🟢 4/4 4/4
slm.start Missing test Missing test
slm.stop 🟢 4/4 4/4
snapshot.cleanup_repository 🟢 3/3 3/3
snapshot.clone 🟢 5/5 5/5
snapshot.create_repository 🔴 24/29 29/29
snapshot.create 🟢 26/26 26/26
snapshot.delete_repository 🟢 10/10 10/10
snapshot.delete 🔴 21/23 23/23
snapshot.get_repository 🔴 19/19 7/19
snapshot.get 🟢 13/13 13/13
snapshot.repository_analyze 🟠 Missing type Missing type
snapshot.restore 🟢 5/5 5/5
snapshot.status 🟢 2/2 2/2
snapshot.verify_repository 🟢 2/2 2/2
sql.get_async_status Missing test Missing test
sql.get_async Missing test Missing test
sql.translate 🔴 1/1 0/1
synonyms.delete_synonym_rule 🟢 7/7 7/7
synonyms.delete_synonym 🟢 6/6 6/6
synonyms.get_synonym_rule 🟢 4/4 4/4
synonyms.get_synonym 🟢 16/16 16/16
synonyms.get_synonyms_sets 🟢 6/6 6/6
synonyms.put_synonym_rule 🟢 4/4 4/4
synonyms.put_synonym 🟢 27/27 27/27
tasks.cancel 🟢 2/2 2/2
tasks.get 🟢 10/10 10/10
tasks.list 🟢 9/9 9/9
text_structure.test_grok_pattern 🟢 2/2 2/2
transform.get_transform_stats 🔴 34/34 33/34
transform.get_transform 🟢 26/26 26/26
transform.preview_transform 🟢 19/19 19/19
transform.put_transform 🟢 28/28 28/28
transform.update_transform 🟢 14/14 14/14
update_by_query_rethrottle 🟢 1/1 1/1
update_by_query 🟢 5/5 4/4
update 🟢 36/36 36/36
watcher.ack_watch 🟢 1/1 1/1
watcher.activate_watch 🟢 1/1 1/1
watcher.deactivate_watch 🟢 1/1 1/1
watcher.delete_watch 🟢 2/2 2/2
watcher.execute_watch 🟢 7/7 7/7
watcher.get_settings 🟠 Missing type Missing type
watcher.get_watch 🟢 9/9 9/9
watcher.put_watch 🔴 29/38 38/38
watcher.query_watches Missing test Missing test
watcher.start 🟢 1/1 1/1
watcher.stats 🟢 1/1 1/1
watcher.stop 🟢 1/1 1/1
watcher.update_settings 🟠 Missing type Missing type
xpack.usage 🔴 35/35 2/31

You can validate these APIs yourself by using the make validate target.

Copy link
Member

@flobernd flobernd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

If it does not change the output, I assume it's fine.

@pquentin pquentin merged commit 82c3eff into main Sep 5, 2024
8 checks passed
@pquentin pquentin deleted the organize-imports branch September 5, 2024 08:05
@pquentin pquentin mentioned this pull request Sep 5, 2024
Copy link
Contributor

github-actions bot commented Sep 6, 2024

The backport to 8.14 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-8.14 8.14
# Navigate to the new working tree
cd .worktrees/backport-8.14
# Create a new branch
git switch --create backport-2853-to-8.14
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 82c3eff90b4db30469321f9f67c26d5753452b2b
# Push it to GitHub
git push --set-upstream origin backport-2853-to-8.14
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.14

Then, create a pull request where the base branch is 8.14 and the compare/head branch is backport-2853-to-8.14.

Copy link
Contributor

github-actions bot commented Sep 6, 2024

The backport to 8.15 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-8.15 8.15
# Navigate to the new working tree
cd .worktrees/backport-8.15
# Create a new branch
git switch --create backport-2853-to-8.15
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 82c3eff90b4db30469321f9f67c26d5753452b2b
# Push it to GitHub
git push --set-upstream origin backport-2853-to-8.15
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.15

Then, create a pull request where the base branch is 8.15 and the compare/head branch is backport-2853-to-8.15.

pquentin added a commit that referenced this pull request Sep 6, 2024
pquentin added a commit that referenced this pull request Sep 6, 2024
pquentin added a commit that referenced this pull request Sep 6, 2024
pquentin added a commit that referenced this pull request Sep 6, 2024
@pquentin
Copy link
Member Author

pquentin commented Sep 6, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants