decidim 0.28.4 → 0.29.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/decidim-core/lib/decidim/webpacker/esbuild.config.js +14 -0
  3. data/decidim-core/lib/decidim/webpacker/shakapacker.yml +2 -2
  4. data/decidim-core/lib/decidim/webpacker/tsconfig.json +11 -0
  5. data/decidim-core/lib/decidim/webpacker/webpack/custom.js +13 -35
  6. data/decidim.gemspec +2 -1
  7. data/docs/README.adoc +2 -2
  8. data/docs/antora.yml +1 -1
  9. data/docs/modules/configure/pages/environment_variables.adoc +6 -102
  10. data/docs/modules/configure/pages/index.adoc +1 -1
  11. data/docs/modules/configure/pages/initializer.adoc +1 -1
  12. data/docs/modules/customize/pages/admin_filters.adoc +32 -0
  13. data/docs/modules/customize/pages/data_consent.adoc +1 -1
  14. data/docs/modules/customize/pages/index.adoc +2 -1
  15. data/docs/modules/customize/pages/javascript.adoc +2 -2
  16. data/docs/modules/customize/pages/logic.adoc +1 -1
  17. data/docs/modules/customize/pages/social_shares.adoc +2 -2
  18. data/docs/modules/customize/pages/styles.adoc +3 -3
  19. data/docs/modules/customize/pages/views.adoc +1 -1
  20. data/docs/modules/develop/pages/authorable.adoc +3 -3
  21. data/docs/modules/develop/pages/backports.adoc +6 -5
  22. data/docs/modules/develop/pages/c4_component.adoc +2 -7
  23. data/docs/modules/develop/pages/c4_container.adoc +1 -3
  24. data/docs/modules/develop/pages/c4_context.adoc +0 -2
  25. data/docs/modules/develop/pages/classes/commands.adoc +204 -25
  26. data/docs/modules/develop/pages/components.adoc +5 -5
  27. data/docs/modules/develop/pages/custom_seed_data.adoc +1 -1
  28. data/docs/modules/develop/pages/embeddable.adoc +1 -1
  29. data/docs/modules/develop/pages/endorsable.adoc +2 -2
  30. data/docs/modules/develop/pages/guide_conventions.adoc +6 -6
  31. data/docs/modules/develop/pages/guide_development_app.adoc +2 -1
  32. data/docs/modules/develop/pages/guide_example_apps.adoc +1 -1
  33. data/docs/modules/develop/pages/guide_github_projects.adoc +1 -1
  34. data/docs/modules/develop/pages/guide_migrate_webpacker_app.adoc +2 -2
  35. data/docs/modules/develop/pages/guide_migrate_webpacker_module.adoc +1 -1
  36. data/docs/modules/develop/pages/maintainers/releases.adoc +2 -4
  37. data/docs/modules/develop/pages/managing_translations_i18n.adoc +2 -2
  38. data/docs/modules/develop/pages/maps.adoc +5 -5
  39. data/docs/modules/develop/pages/metrics.adoc +1 -1
  40. data/docs/modules/develop/pages/modules.adoc +1 -1
  41. data/docs/modules/develop/pages/newsletter_templates.adoc +2 -2
  42. data/docs/modules/develop/pages/notifications.adoc +124 -1
  43. data/docs/modules/develop/pages/reminders.adoc +2 -2
  44. data/docs/modules/develop/pages/reportable.adoc +1 -1
  45. data/docs/modules/develop/pages/testing.adoc +2 -2
  46. data/docs/modules/develop/pages/troubleshooting_metrics.adoc +2 -2
  47. data/docs/modules/develop/pages/view_models_aka_cells.adoc +1 -1
  48. data/docs/modules/install/pages/checklist.adoc +3 -2
  49. data/docs/modules/install/pages/empty-database.adoc +3 -3
  50. data/docs/modules/install/pages/index.adoc +5 -5
  51. data/docs/modules/install/pages/manual.adoc +3 -2
  52. data/docs/modules/install/pages/update.adoc +2 -2
  53. data/docs/modules/services/pages/activestorage.adoc +1 -1
  54. data/docs/modules/services/pages/index.adoc +0 -1
  55. data/docs/modules/services/pages/maps.adoc +2 -2
  56. data/docs/modules/services/pages/sms.adoc +1 -1
  57. data/docs/modules/services/pages/social_providers.adoc +3 -3
  58. data/lib/decidim/gem_manager.rb +2 -0
  59. data/lib/decidim/version.rb +1 -1
  60. data/package-lock.json +6359 -19611
  61. data/package.json +4 -6
  62. data/packages/browserslist-config/package.json +1 -1
  63. data/packages/core/package.json +11 -11
  64. data/packages/dev/package.json +1 -1
  65. data/packages/eslint-config/index.js +58 -82
  66. data/packages/eslint-config/package.json +1 -1
  67. data/packages/prettier-config/package.json +1 -1
  68. data/packages/stylelint-config/package.json +1 -1
  69. data/packages/webpacker/index.js +2 -1
  70. data/packages/webpacker/package.json +5 -11
  71. metadata +61 -61
  72. data/babel.config.json +0 -25
  73. data/docs/modules/develop/pages/consulations_removal.bash +0 -117
  74. data/docs/modules/services/pages/elections_bulletin_board.adoc +0 -55
  75. data/lib/decidim/backporter.rb +0 -98
  76. data/lib/decidim/backports_reporter/cli_report.rb +0 -44
  77. data/lib/decidim/backports_reporter/csv_report.rb +0 -32
  78. data/lib/decidim/backports_reporter/report.rb +0 -46
  79. data/lib/decidim/git_backport_checker.rb +0 -70
  80. data/lib/decidim/git_backport_manager.rb +0 -179
  81. data/lib/decidim/github_manager/poster.rb +0 -70
  82. data/lib/decidim/github_manager/querier/base.rb +0 -78
  83. data/lib/decidim/github_manager/querier/by_issue_id.rb +0 -46
  84. data/lib/decidim/github_manager/querier/by_label.rb +0 -95
  85. data/lib/decidim/github_manager/querier/related_issues.rb +0 -51
  86. data/lib/decidim/github_manager/querier.rb +0 -20
  87. data/packages/elections/package.json +0 -17
  88. data/packages/webpacker/package-lock.json +0 -18045
@@ -1,95 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "active_support/core_ext/time/zones"
4
- require_relative "base"
5
-
6
- module Decidim
7
- module GithubManager
8
- module Querier
9
- # Makes a GET request for the list of Issues or Pull Requests in GitHub.
10
- # They must comply the following conditions:
11
- # * To be merged in the period between the days to check from and today. (90 days by default)
12
- # * To have the label that we are querying ("type: fix" by default)
13
- # * To not have any of the excluded labels (["backport", "no-backport"] by default)
14
- # * To have been merged
15
- #
16
- # @param token [String] token for GitHub authentication
17
- # @param days_to_check_from [Integer] the number of days since the pull requests were merged from when we will start the check
18
- # @param label [String] the label that we want to search by
19
- # @param exclude_labels [Array] the labels that we want to exclude in the search
20
- #
21
- # @see https://docs.github.com/en/rest/issues/issues#list-repository-issues GitHub API documentation
22
- class ByLabel < Decidim::GithubManager::Querier::Base
23
- def initialize(token:, days_to_check_from: 90, label: "type: fix", exclude_labels: ["backport", "no-backport"])
24
- @label = label
25
- @exclude_labels = exclude_labels
26
- @token = token
27
- @days_to_check_from = days_to_check_from
28
- end
29
-
30
- # Makes the GET request and parses the response of an Issue or Pull Request in GitHub
31
- #
32
- # @return [Hash]
33
- def call
34
- parse json_response("https://api.github.com/repos/decidim/decidim/issues")
35
- end
36
-
37
- private
38
-
39
- attr_reader :label, :exclude_labels, :days_to_check_from
40
-
41
- def headers
42
- Time.zone = "UTC"
43
-
44
- {
45
- labels: label,
46
- state: "closed",
47
- per_page: 100,
48
- since: since.iso8601
49
- }
50
- end
51
-
52
- def since
53
- Time.zone.today - days_to_check_from
54
- end
55
-
56
- # Parses the response of an Issue or Pull Request in GitHub
57
- #
58
- # @return [Hash]
59
- def parse(metadata)
60
- metadata.map do |item|
61
- next if has_any_of_excluded_labels?(item)
62
- next unless merged?(item)
63
- next unless merged_in_date_range?(item)
64
-
65
- {
66
- id: item["number"],
67
- title: item["title"]
68
- }
69
- end.compact
70
- end
71
-
72
- def has_any_of_excluded_labels?(item)
73
- item["labels"].map { |label| label.map { |_key, val| exclude_labels.include?(val) } }.flatten.any? true
74
- end
75
-
76
- def merged_at(item)
77
- Date.parse(item["pull_request"]["merged_at"])
78
- end
79
-
80
- def merged?(item)
81
- return false if item["pull_request"].nil?
82
- return false if item["pull_request"]["merged_at"].nil?
83
-
84
- merged_at(item).present?
85
- rescue TypeError, Date::Error
86
- false
87
- end
88
-
89
- def merged_in_date_range?(item)
90
- merged_at(item) > since
91
- end
92
- end
93
- end
94
- end
95
- end
@@ -1,51 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "base"
4
-
5
- module Decidim
6
- module GithubManager
7
- module Querier
8
- # Makes a GET request for the related issues of an Issue or Pull Request in GitHub
9
- # Uses the Timeline events API endpoint
10
- #
11
- # @see https://docs.github.com/en/rest/issues/timeline?apiVersion=2022-11-28 GitHub API documentation
12
- class RelatedIssues < Decidim::GithubManager::Querier::Base
13
- def initialize(issue_id:, token:)
14
- @issue_id = issue_id
15
- @token = token
16
- end
17
-
18
- # Makes the GET request and parses the response of an Issue or Pull Request in GitHub
19
- #
20
- # @return [Hash]
21
- def call
22
- parse(json_response("https://api.github.com/repos/decidim/decidim/issues/#{@issue_id}/timeline"))
23
- end
24
-
25
- private
26
-
27
- def headers
28
- { per_page: 100 }
29
- end
30
-
31
- # Parses the response of an Issue or Pull Request in GitHub
32
- #
33
- # @return [Hash]
34
- def parse(metadata)
35
- references = metadata.select do |item|
36
- item["event"] == "cross-referenced" && item["source"]["issue"]["repository"]["full_name"] == "decidim/decidim"
37
- end
38
- references.map do |item|
39
- issue = item["source"]["issue"]
40
-
41
- {
42
- id: issue["number"],
43
- title: issue["title"].strip,
44
- state: issue.dig("pull_request", "merged_at").nil? ? issue["state"] : "merged"
45
- }
46
- end
47
- end
48
- end
49
- end
50
- end
51
- end
@@ -1,20 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "faraday"
4
- require "json"
5
-
6
- require_relative "querier/by_issue_id"
7
- require_relative "querier/by_label"
8
- require_relative "querier/related_issues"
9
-
10
- module Decidim
11
- module GithubManager
12
- # Allows to make GET requests to GitHub Rest API about Issues and Pull Requests
13
- # @see https://docs.github.com/en/rest
14
- module Querier
15
- autoload :ByIssueId, "decidim/github_manager/querier/by_issue_id"
16
- autoload :ByLabel, "decidim/github_manager/querier/by_label"
17
- autoload :RelatedIssues, "decidim/github_manager/querier/related_issues"
18
- end
19
- end
20
- end
@@ -1,17 +0,0 @@
1
- {
2
- "name": "@decidim/elections",
3
- "description": "The elections and votings dependencies for Decidim",
4
- "version": "0.28.4",
5
- "repository": {
6
- "url": "git@github.com:decidim/decidim.git",
7
- "type": "git",
8
- "directory": "packages/elections"
9
- },
10
- "author": "Decidim Contributors",
11
- "license": "AGPL-3.0",
12
- "dependencies": {
13
- "@decidim/decidim-bulletin_board": "0.24.4",
14
- "@decidim/voting_schemes-dummy": "0.24.4",
15
- "@decidim/voting_schemes-electionguard": "0.24.4"
16
- }
17
- }