meteocat 3.0.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/ISSUE_TEMPLATE/bug_report.md +8 -2
- package/.github/ISSUE_TEMPLATE/config.yml +7 -0
- package/.github/ISSUE_TEMPLATE/improvement.md +39 -0
- package/.github/ISSUE_TEMPLATE/new_function.md +41 -0
- package/.github/labels.yml +63 -0
- package/.github/workflows/autocloser.yaml +11 -9
- package/.github/workflows/close-on-label.yml +48 -0
- package/.github/workflows/force-sync-labels.yml +18 -0
- package/.github/workflows/sync-gitlab.yml +15 -4
- package/.github/workflows/sync-labels.yml +21 -0
- package/CHANGELOG.md +80 -11
- package/README.md +16 -4
- package/custom_components/meteocat/__init__.py +57 -42
- package/custom_components/meteocat/condition.py +6 -2
- package/custom_components/meteocat/config_flow.py +231 -4
- package/custom_components/meteocat/const.py +17 -2
- package/custom_components/meteocat/coordinator.py +1122 -101
- package/custom_components/meteocat/helpers.py +31 -36
- package/custom_components/meteocat/manifest.json +3 -2
- package/custom_components/meteocat/options_flow.py +71 -3
- package/custom_components/meteocat/sensor.py +660 -247
- package/custom_components/meteocat/strings.json +252 -15
- package/custom_components/meteocat/translations/ca.json +249 -13
- package/custom_components/meteocat/translations/en.json +252 -15
- package/custom_components/meteocat/translations/es.json +252 -15
- package/custom_components/meteocat/version.py +1 -1
- package/filetree.txt +12 -3
- package/hacs.json +1 -1
- package/images/daily_forecast_2_alerts.png +0 -0
- package/images/daily_forecast_no_alerts.png +0 -0
- package/images/diagnostic_sensors.png +0 -0
- package/images/dynamic_sensors.png +0 -0
- package/images/options.png +0 -0
- package/images/regenerate_assets.png +0 -0
- package/images/setup_options.png +0 -0
- package/images/system_options.png +0 -0
- package/package.json +1 -1
- package/pyproject.toml +1 -1
- package/scripts/update_version.sh +6 -0
- package/.github/workflows/close-duplicates.yml +0 -57
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
"options": {
|
|
37
|
-
"step":{
|
|
37
|
+
"step": {
|
|
38
38
|
"init": {
|
|
39
|
-
"description": "Configura
|
|
39
|
+
"description": "Configura la clave API, los límites de la API, regenera los archivos de 'assets' o actualiza las coordenadas.",
|
|
40
40
|
"title": "Opciones de configuración",
|
|
41
41
|
"data": {
|
|
42
42
|
"option": "Opciones"
|
|
@@ -50,6 +50,15 @@
|
|
|
50
50
|
"description": "Configura los límites de la API.",
|
|
51
51
|
"title": "Límites de la API"
|
|
52
52
|
},
|
|
53
|
+
"update_coordinates": {
|
|
54
|
+
"description": "Introduce nuevas coordenadas. Coordenadas actuales: latitud {current_latitude}, longitud {current_longitude}. Altitud actual: {current_altitude} metros.",
|
|
55
|
+
"title": "Actualizar coordenadas",
|
|
56
|
+
"data": {
|
|
57
|
+
"latitude": "Latitud",
|
|
58
|
+
"longitude": "Longitud",
|
|
59
|
+
"altitude": "Altitud (metros)"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
53
62
|
"confirm_regenerate_assets": {
|
|
54
63
|
"description": "Regenera los archivos de 'assets'.",
|
|
55
64
|
"title": "Regenera 'assets'",
|
|
@@ -61,7 +70,9 @@
|
|
|
61
70
|
"error": {
|
|
62
71
|
"cannot_connect": "Error de conexión. Error al comprobar la nueva API Key.",
|
|
63
72
|
"unknown": "Error desconocido al comprobar la nueva API Key.",
|
|
64
|
-
"invalid_limit": "Límite no válido. El límite debe ser un número positivo."
|
|
73
|
+
"invalid_limit": "Límite no válido. El límite debe ser un número positivo.",
|
|
74
|
+
"invalid_coordinates": "Las coordenadas deben estar dentro del rango de Cataluña (latitud: 40.5 a 42.5, longitud: 0.1 a 3.3).",
|
|
75
|
+
"invalid_altitude": "Altitud no puede ser negativa."
|
|
65
76
|
}
|
|
66
77
|
},
|
|
67
78
|
"selector": {
|
|
@@ -69,7 +80,8 @@
|
|
|
69
80
|
"options": {
|
|
70
81
|
"update_api_and_limits": "Actualizar API Key y límites.",
|
|
71
82
|
"update_limits_only": "Actualizar API límites.",
|
|
72
|
-
"regenerate_assets": "Regenerar archivos de 'assets'."
|
|
83
|
+
"regenerate_assets": "Regenerar archivos de 'assets'.",
|
|
84
|
+
"update_coordinates": "Actualizar coordenadas (latitud y longitud) y altitud (metros)."
|
|
73
85
|
}
|
|
74
86
|
}
|
|
75
87
|
},
|
|
@@ -269,7 +281,7 @@
|
|
|
269
281
|
"cloud_cloud": {
|
|
270
282
|
"name": "Nube-Nube"
|
|
271
283
|
},
|
|
272
|
-
"cloud_ground_neg":{
|
|
284
|
+
"cloud_ground_neg": {
|
|
273
285
|
"name": "Nube-Tierra Negativo"
|
|
274
286
|
},
|
|
275
287
|
"cloud_ground_pos": {
|
|
@@ -283,7 +295,7 @@
|
|
|
283
295
|
"cloud_cloud": {
|
|
284
296
|
"name": "Nube-Nube"
|
|
285
297
|
},
|
|
286
|
-
"cloud_ground_neg":{
|
|
298
|
+
"cloud_ground_neg": {
|
|
287
299
|
"name": "Nube-Tierra Negativo"
|
|
288
300
|
},
|
|
289
301
|
"cloud_ground_pos": {
|
|
@@ -533,7 +545,8 @@
|
|
|
533
545
|
"wind_35": "Racha máxima > 35 m/s",
|
|
534
546
|
"wind_30": "Racha máxima > 30 m/s",
|
|
535
547
|
"wind_25": "Racha máxima > 25 m/s",
|
|
536
|
-
"wind_20": "Racha máxima > 20 m/s"
|
|
548
|
+
"wind_20": "Racha máxima > 20 m/s",
|
|
549
|
+
"unknown": "Desconocido"
|
|
537
550
|
}
|
|
538
551
|
},
|
|
539
552
|
"peligro": {
|
|
@@ -572,7 +585,8 @@
|
|
|
572
585
|
"hail_2_cm": "Granizo de diámetro > 2 cm",
|
|
573
586
|
"microburst": "Reventón",
|
|
574
587
|
"intensity_40_30": "Intensidad > 40 mm / 30 minutos",
|
|
575
|
-
"intensity_20_30": "Intensidad > 20 mm / 30 minutos"
|
|
588
|
+
"intensity_20_30": "Intensidad > 20 mm / 30 minutos",
|
|
589
|
+
"unknown": "Desconocido"
|
|
576
590
|
}
|
|
577
591
|
},
|
|
578
592
|
"peligro": {
|
|
@@ -610,7 +624,8 @@
|
|
|
610
624
|
"state": {
|
|
611
625
|
"microburst": "Reventón",
|
|
612
626
|
"rain_200_24": "Acumulada > 200 mm /24 horas",
|
|
613
|
-
"rain_100_24": "Acumulada > 100 mm /24 horas"
|
|
627
|
+
"rain_100_24": "Acumulada > 100 mm /24 horas",
|
|
628
|
+
"unknown": "Desconocido"
|
|
614
629
|
}
|
|
615
630
|
},
|
|
616
631
|
"peligro": {
|
|
@@ -649,7 +664,8 @@
|
|
|
649
664
|
"microburst": "Reventón",
|
|
650
665
|
"tornadoes": "Tornados o mangas marinas",
|
|
651
666
|
"waves_4": "Olas > 4.00 metros (mar brava)",
|
|
652
|
-
"waves_2_50": "Olas > 2.50 metros (mar temporal)"
|
|
667
|
+
"waves_2_50": "Olas > 2.50 metros (mar temporal)",
|
|
668
|
+
"unknown": "Desconocido"
|
|
653
669
|
}
|
|
654
670
|
},
|
|
655
671
|
"peligro": {
|
|
@@ -686,7 +702,8 @@
|
|
|
686
702
|
"name": "Umbral",
|
|
687
703
|
"state": {
|
|
688
704
|
"cold_very_intense": "Frío muy intenso",
|
|
689
|
-
"cold_intense": "Frío intenso"
|
|
705
|
+
"cold_intense": "Frío intenso",
|
|
706
|
+
"unknown": "Desconocido"
|
|
690
707
|
}
|
|
691
708
|
},
|
|
692
709
|
"peligro": {
|
|
@@ -723,7 +740,8 @@
|
|
|
723
740
|
"name": "Umbral",
|
|
724
741
|
"state": {
|
|
725
742
|
"heat_very_intense": "Calor muy intenso",
|
|
726
|
-
"heat_intense": "Calor intenso"
|
|
743
|
+
"heat_intense": "Calor intenso",
|
|
744
|
+
"unknown": "Desconocido"
|
|
727
745
|
}
|
|
728
746
|
},
|
|
729
747
|
"peligro": {
|
|
@@ -760,7 +778,8 @@
|
|
|
760
778
|
"name": "Umbral",
|
|
761
779
|
"state": {
|
|
762
780
|
"heat_night_very_intense": "Calor nocturno muy intenso",
|
|
763
|
-
"heat_night_intense": "Calor nocturno intenso"
|
|
781
|
+
"heat_night_intense": "Calor nocturno intenso",
|
|
782
|
+
"unknown": "Desconocido"
|
|
764
783
|
}
|
|
765
784
|
},
|
|
766
785
|
"peligro": {
|
|
@@ -806,7 +825,8 @@
|
|
|
806
825
|
"thickness_5_at_300": "grosor > 5 cm en cotas inferiores a 300 metros",
|
|
807
826
|
"thickness_5_at_600": "grosor > 5 cm en cotas superiores a 600 metros hasta 800 metros",
|
|
808
827
|
"thickness_2_at_300": "grosor > 2 cm en cotas superiores a 300 metros hasta 600 metros",
|
|
809
|
-
"thickness_0_at_300": "grosor ≥ 0 cm en cotas inferiores a 300 metros"
|
|
828
|
+
"thickness_0_at_300": "grosor ≥ 0 cm en cotas inferiores a 300 metros",
|
|
829
|
+
"unknown": "Desconocido"
|
|
810
830
|
}
|
|
811
831
|
},
|
|
812
832
|
"peligro": {
|
|
@@ -816,7 +836,224 @@
|
|
|
816
836
|
"name": "Nivel"
|
|
817
837
|
}
|
|
818
838
|
}
|
|
839
|
+
},
|
|
840
|
+
"sun": {
|
|
841
|
+
"name": "Sol",
|
|
842
|
+
"state": {
|
|
843
|
+
"above_horizon": "Sobre el horizonte",
|
|
844
|
+
"below_horizon": "Bajo el horizonte"
|
|
845
|
+
},
|
|
846
|
+
"state_attributes": {
|
|
847
|
+
"elevation": {
|
|
848
|
+
"name": "Elevación"
|
|
849
|
+
},
|
|
850
|
+
"azimuth": {
|
|
851
|
+
"name": "Azimut"
|
|
852
|
+
},
|
|
853
|
+
"rising": {
|
|
854
|
+
"name": "Ascendente",
|
|
855
|
+
"state": {
|
|
856
|
+
"false": "No",
|
|
857
|
+
"true": "Sí"
|
|
858
|
+
}
|
|
859
|
+
},
|
|
860
|
+
"last_updated": {
|
|
861
|
+
"name": "Actualizado"
|
|
862
|
+
},
|
|
863
|
+
"sunrise": {
|
|
864
|
+
"name": "Amanecer"
|
|
865
|
+
},
|
|
866
|
+
"sunset": {
|
|
867
|
+
"name": "Atardecer"
|
|
868
|
+
},
|
|
869
|
+
"noon": {
|
|
870
|
+
"name": "Mediodía"
|
|
871
|
+
},
|
|
872
|
+
"dawn_civil": {
|
|
873
|
+
"name": "Amanecer civil"
|
|
874
|
+
},
|
|
875
|
+
"dusk_civil": {
|
|
876
|
+
"name": "Atardecer civil"
|
|
877
|
+
},
|
|
878
|
+
"dawn_nautical": {
|
|
879
|
+
"name": "Amanecer náutico"
|
|
880
|
+
},
|
|
881
|
+
"dusk_nautical": {
|
|
882
|
+
"name": "Atardecer náutico"
|
|
883
|
+
},
|
|
884
|
+
"dawn_astronomical": {
|
|
885
|
+
"name": "Amanecer astronómico"
|
|
886
|
+
},
|
|
887
|
+
"dusk_astronomical": {
|
|
888
|
+
"name": "Atardecer astronómico"
|
|
889
|
+
},
|
|
890
|
+
"midnight": {
|
|
891
|
+
"name": "Medianoche solar"
|
|
892
|
+
},
|
|
893
|
+
"daylight_duration": {
|
|
894
|
+
"name": "Duración del día"
|
|
895
|
+
},
|
|
896
|
+
"daylight_duration_hms": {
|
|
897
|
+
"name": "Duración del día (HH:MM:SS)"
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
},
|
|
901
|
+
"sunrise": {
|
|
902
|
+
"name": "Amanecer",
|
|
903
|
+
"state_attributes": {
|
|
904
|
+
"friendly_time": {
|
|
905
|
+
"name": "Hora"
|
|
906
|
+
},
|
|
907
|
+
"friendly_date": {
|
|
908
|
+
"name": "Fecha"
|
|
909
|
+
},
|
|
910
|
+
"friendly_day": {
|
|
911
|
+
"name": "Día",
|
|
912
|
+
"state": {
|
|
913
|
+
"monday": "Lunes",
|
|
914
|
+
"tuesday": "Martes",
|
|
915
|
+
"wednesday": "Miércoles",
|
|
916
|
+
"thursday": "Jueves",
|
|
917
|
+
"friday": "Viernes",
|
|
918
|
+
"saturday": "Sábado",
|
|
919
|
+
"sunday": "Domingo"
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
},
|
|
924
|
+
"sunset": {
|
|
925
|
+
"name": "Atardecer",
|
|
926
|
+
"state_attributes": {
|
|
927
|
+
"friendly_time": {
|
|
928
|
+
"name": "Hora"
|
|
929
|
+
},
|
|
930
|
+
"friendly_date": {
|
|
931
|
+
"name": "Fecha"
|
|
932
|
+
},
|
|
933
|
+
"friendly_day": {
|
|
934
|
+
"name": "Día",
|
|
935
|
+
"state": {
|
|
936
|
+
"monday": "Lunes",
|
|
937
|
+
"tuesday": "Martes",
|
|
938
|
+
"wednesday": "Miércoles",
|
|
939
|
+
"thursday": "Jueves",
|
|
940
|
+
"friday": "Viernes",
|
|
941
|
+
"saturday": "Sábado",
|
|
942
|
+
"sunday": "Domingo"
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
},
|
|
947
|
+
"sun_file_status": {
|
|
948
|
+
"name": "Archivo Sol",
|
|
949
|
+
"state": {
|
|
950
|
+
"updated": "Actualizado",
|
|
951
|
+
"obsolete": "Obsoleto"
|
|
952
|
+
},
|
|
953
|
+
"state_attributes": {
|
|
954
|
+
"update_date": {
|
|
955
|
+
"name": "Fecha"
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
},
|
|
959
|
+
"moon_phase": {
|
|
960
|
+
"name": "Fase lunar",
|
|
961
|
+
"state": {
|
|
962
|
+
"new_moon": "Luna nueva",
|
|
963
|
+
"waxing_crescent": "Creciente",
|
|
964
|
+
"first_quarter": "Cuarto creciente",
|
|
965
|
+
"waxing_gibbous": "Gibosa creciente",
|
|
966
|
+
"full_moon": "Luna llena",
|
|
967
|
+
"waning_gibbous": "Gibosa menguante",
|
|
968
|
+
"last_quarter": "Cuarto menguante",
|
|
969
|
+
"waning_crescent": "Menguante",
|
|
970
|
+
"unknown": "Desconocido"
|
|
971
|
+
},
|
|
972
|
+
"state_attributes": {
|
|
973
|
+
"moon_day": {
|
|
974
|
+
"name": "Día lunar"
|
|
975
|
+
},
|
|
976
|
+
"moon_phase_value": {
|
|
977
|
+
"name": "Valor fase"
|
|
978
|
+
},
|
|
979
|
+
"illuminated_percentage": {
|
|
980
|
+
"name": "Iluminada (%)"
|
|
981
|
+
},
|
|
982
|
+
"moon_distance": {
|
|
983
|
+
"name": "Distancia (Km)"
|
|
984
|
+
},
|
|
985
|
+
"moon_angular_diameter": {
|
|
986
|
+
"name": "Diámetro angular (arcseg)"
|
|
987
|
+
},
|
|
988
|
+
"lunation": {
|
|
989
|
+
"name": "Lunación"
|
|
990
|
+
},
|
|
991
|
+
"lunation_duration": {
|
|
992
|
+
"name": "Duración lunación"
|
|
993
|
+
},
|
|
994
|
+
"last_updated": {
|
|
995
|
+
"name": "Actualizado"
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
},
|
|
999
|
+
"moon_file_status": {
|
|
1000
|
+
"name": "Archivo Luna",
|
|
1001
|
+
"state": {
|
|
1002
|
+
"updated": "Actualizado",
|
|
1003
|
+
"obsolete": "Obsoleto"
|
|
1004
|
+
},
|
|
1005
|
+
"state_attributes": {
|
|
1006
|
+
"update_date": {
|
|
1007
|
+
"name": "Fecha"
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
},
|
|
1011
|
+
"moonrise": {
|
|
1012
|
+
"name": "Luna salida",
|
|
1013
|
+
"state_attributes": {
|
|
1014
|
+
"friendly_time": {
|
|
1015
|
+
"name": "Hora"
|
|
1016
|
+
},
|
|
1017
|
+
"friendly_date": {
|
|
1018
|
+
"name": "Fecha"
|
|
1019
|
+
},
|
|
1020
|
+
"friendly_day": {
|
|
1021
|
+
"name": "Día",
|
|
1022
|
+
"state": {
|
|
1023
|
+
"monday": "Lunes",
|
|
1024
|
+
"tuesday": "Martes",
|
|
1025
|
+
"wednesday": "Miércoles",
|
|
1026
|
+
"thursday": "Jueves",
|
|
1027
|
+
"friday": "Viernes",
|
|
1028
|
+
"saturday": "Sábado",
|
|
1029
|
+
"sunday": "Domingo"
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
},
|
|
1034
|
+
"moonset": {
|
|
1035
|
+
"name": "Luna puesta",
|
|
1036
|
+
"state_attributes": {
|
|
1037
|
+
"friendly_time": {
|
|
1038
|
+
"name": "Hora"
|
|
1039
|
+
},
|
|
1040
|
+
"friendly_date": {
|
|
1041
|
+
"name": "Fecha"
|
|
1042
|
+
},
|
|
1043
|
+
"friendly_day": {
|
|
1044
|
+
"name": "Día",
|
|
1045
|
+
"state": {
|
|
1046
|
+
"monday": "Lunes",
|
|
1047
|
+
"tuesday": "Martes",
|
|
1048
|
+
"wednesday": "Miércoles",
|
|
1049
|
+
"thursday": "Jueves",
|
|
1050
|
+
"friday": "Viernes",
|
|
1051
|
+
"saturday": "Sábado",
|
|
1052
|
+
"sunday": "Domingo"
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
819
1056
|
}
|
|
820
1057
|
}
|
|
821
1058
|
}
|
|
822
|
-
}
|
|
1059
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "3.
|
|
1
|
+
__version__ = "3.2.0"
|
package/filetree.txt
CHANGED
|
@@ -2,20 +2,24 @@
|
|
|
2
2
|
└── ISSUE_TEMPLATE/
|
|
3
3
|
├── bug_report.md
|
|
4
4
|
├── config.yml
|
|
5
|
+
├── improvement.md
|
|
6
|
+
├── new_function.md
|
|
7
|
+
├── labels.yml
|
|
5
8
|
└── workflows/
|
|
6
9
|
├── autocloser.yaml
|
|
7
|
-
├── close-
|
|
10
|
+
├── close-on-label.yml
|
|
11
|
+
├── force-sync-labels.yml
|
|
8
12
|
├── hassfest.yaml
|
|
9
13
|
├── publish-zip.yml
|
|
10
14
|
├── release.yml
|
|
11
15
|
├── stale.yml
|
|
12
16
|
├── sync-gitlab.yml
|
|
17
|
+
├── sync-labels.yml
|
|
13
18
|
├── validate.yaml
|
|
14
19
|
├── .gitignore
|
|
15
20
|
├── .gitlab-ci.yml
|
|
16
21
|
├── .pre-commit-config.yaml
|
|
17
22
|
├── .releaserc
|
|
18
|
-
├── .releaserc.toml
|
|
19
23
|
├── AUTHORS.md
|
|
20
24
|
├── CHANGELOG.md
|
|
21
25
|
├── LICENSE
|
|
@@ -46,6 +50,7 @@
|
|
|
46
50
|
├── api_limits.png
|
|
47
51
|
├── banner.png
|
|
48
52
|
├── change_units.png
|
|
53
|
+
├── daily_forecast_2_alerts.png
|
|
49
54
|
├── devices.png
|
|
50
55
|
├── diagnostic_sensors.png
|
|
51
56
|
├── dynamic_sensors.png
|
|
@@ -54,13 +59,17 @@
|
|
|
54
59
|
├── pick_area.png
|
|
55
60
|
├── pick_station.png
|
|
56
61
|
├── pick_town.png
|
|
62
|
+
├── regenerate_assets.png
|
|
63
|
+
├── setup_options.png
|
|
64
|
+
├── system_options.png
|
|
57
65
|
├── info.md
|
|
58
66
|
├── package-lock.json
|
|
59
67
|
├── package.json
|
|
60
68
|
├── poetry.lock
|
|
61
69
|
├── pyproject.toml
|
|
62
|
-
├── releaserc.json
|
|
63
70
|
├── requirements.test.txt
|
|
71
|
+
└── scripts/
|
|
72
|
+
├── update_version.sh
|
|
64
73
|
├── setup.cfg
|
|
65
74
|
├── setup.py
|
|
66
75
|
└── tests/
|
package/hacs.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/images/options.png
CHANGED
|
Binary file
|
|
Binary file
|
package/images/setup_options.png
CHANGED
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "meteocat",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "[](https://opensource.org/licenses/Apache-2.0)\r [](https://pypi.org/project/meteocat)\r [](https://gitlab.com/figorr/meteocat/commits/master)",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"directories": {
|
package/pyproject.toml
CHANGED
|
@@ -14,3 +14,9 @@ echo "__version__ = \"$version\"" > custom_components/meteocat/version.py
|
|
|
14
14
|
|
|
15
15
|
# __init__.py
|
|
16
16
|
sed -i "s/^__version__ = \".*\"/__version__ = \"$version\"/" custom_components/meteocat/__init__.py
|
|
17
|
+
|
|
18
|
+
# package.json
|
|
19
|
+
jq --arg ver "$version" '.version = $ver' package.json > tmp.json && mv tmp.json package.json
|
|
20
|
+
|
|
21
|
+
# package-lock.json
|
|
22
|
+
jq --arg ver "$version" '.version = $ver | .packages[""].version = $ver' package-lock.json > tmp.json && mv tmp.json package-lock.json
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
name: Close duplicate issues
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
issues:
|
|
5
|
-
types:
|
|
6
|
-
- labeled
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
close-duplicate:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
if: github.event.label.name == 'duplicate'
|
|
12
|
-
steps:
|
|
13
|
-
- name: Extract linked issue number
|
|
14
|
-
id: extract
|
|
15
|
-
run: |
|
|
16
|
-
body="${{ github.event.issue.body }}"
|
|
17
|
-
# Convertimos a minúsculas para que el match sea insensible a mayúsculas
|
|
18
|
-
lower=$(echo "$body" | tr '[:upper:]' '[:lower:]')
|
|
19
|
-
|
|
20
|
-
# Buscamos "closed as duplicate of #123" o "duplicate of #123"
|
|
21
|
-
if [[ "$lower" =~ closed[[:space:]]+as[[:space:]]+duplicate[[:space:]]+of[[:space:]]+#([0-9]+) ]]; then
|
|
22
|
-
echo "number=${BASH_REMATCH[1]}" >> $GITHUB_OUTPUT
|
|
23
|
-
elif [[ "$lower" =~ duplicate[[:space:]]+of[[:space:]]+#([0-9]+) ]]; then
|
|
24
|
-
echo "number=${BASH_REMATCH[1]}" >> $GITHUB_OUTPUT
|
|
25
|
-
fi
|
|
26
|
-
|
|
27
|
-
- name: Close issue
|
|
28
|
-
if: steps.extract.outputs.number != ''
|
|
29
|
-
uses: peter-evans/close-issue@v2
|
|
30
|
-
with:
|
|
31
|
-
issue-number: ${{ github.event.issue.number }}
|
|
32
|
-
comment: |
|
|
33
|
-
Closed as duplicate of #${{ steps.extract.outputs.number }}.
|
|
34
|
-
Please follow the discussion there.
|
|
35
|
-
|
|
36
|
-
- name: Update title
|
|
37
|
-
if: steps.extract.outputs.number != ''
|
|
38
|
-
uses: actions-ecosystem/action-edit-issue@v1
|
|
39
|
-
with:
|
|
40
|
-
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
41
|
-
issue_number: ${{ github.event.issue.number }}
|
|
42
|
-
title: "[Duplicate] ${{ github.event.issue.title }}"
|
|
43
|
-
|
|
44
|
-
- name: Remove duplicate label
|
|
45
|
-
if: steps.extract.outputs.number != ''
|
|
46
|
-
uses: actions-ecosystem/action-remove-labels@v1
|
|
47
|
-
with:
|
|
48
|
-
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
49
|
-
issue_number: ${{ github.event.issue.number }}
|
|
50
|
-
labels: duplicate
|
|
51
|
-
|
|
52
|
-
- name: Lock conversation
|
|
53
|
-
if: steps.extract.outputs.number != ''
|
|
54
|
-
uses: dessant/lock-threads@v4
|
|
55
|
-
with:
|
|
56
|
-
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
57
|
-
issue-lock-reason: "resolved"
|