Skip to content
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

Development #3289

Merged
merged 74 commits into from
Feb 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
15eb3ae
add popover for org_profile page
pengyin-shan Nov 17, 2022
5fa3d11
update message for public plan definition
pengyin-shan Nov 17, 2022
3e8815e
update csv name for statistics
pengyin-shan Nov 17, 2022
f27bcd4
Merge branch 'development' into statistics_filename_change
briri Nov 29, 2022
d480507
Merge branch 'development' into org_type_tip
briri Nov 29, 2022
ba2a988
Merge branch 'development' into statistics_filename_change
pengyin-shan Nov 29, 2022
3d254a1
Merge branch 'development' into org_type_tip
pengyin-shan Nov 29, 2022
1feb31b
Froze mail gem version
benjaminfaure Dec 6, 2022
c759ba1
Added scss files to editorconfig
benjaminfaure Dec 6, 2022
9387356
test CHANGELOG file
pengyin-shan Dec 6, 2022
8a441a4
update danger in gemfile
pengyin-shan Dec 6, 2022
c5b88e6
add danger figuration
pengyin-shan Dec 6, 2022
157a0d9
fix rubocop
pengyin-shan Dec 6, 2022
0320a29
Rubocoped Gemfile
benjaminfaure Dec 8, 2022
439d642
fix test folder name
pengyin-shan Dec 8, 2022
aeba6b5
Merge pull request #3258 from DMPRoadmap/changelog_danger
pengyin-shan Dec 8, 2022
b72e34d
sync translation again and update Danger file
pengyin-shan Dec 9, 2022
9cf7dbd
use failure instead of fail to aovid rubocop complain
pengyin-shan Dec 9, 2022
bdb07f2
add exception message for translation.io changes
pengyin-shan Dec 9, 2022
3f64a77
fix Dangerfile
pengyin-shan Dec 9, 2022
482f355
test CHANGELOG file
pengyin-shan Dec 6, 2022
eeab22e
update danger in gemfile
pengyin-shan Dec 6, 2022
2e761b5
add danger figuration
pengyin-shan Dec 6, 2022
e7231ab
fix rubocop
pengyin-shan Dec 6, 2022
f6a13bd
fix test folder name
pengyin-shan Dec 8, 2022
54797da
Updated CHANGELOG
benjaminfaure Dec 12, 2022
35bd57a
Merge branch 'development' into issue3254
benjaminfaure Dec 12, 2022
e2fb1f5
Merge branch 'development' into add_scss_to_editorconfig
briri Dec 13, 2022
66cb809
Merge pull request #3263 from DMPRoadmap/translation_sync_dangerfile_…
pengyin-shan Dec 13, 2022
951bae2
Updated CHANGELOG
benjaminfaure Dec 14, 2022
fe49376
Merge branch 'development' into issue3254
briri Dec 14, 2022
2572363
added validation with error message when user enters very large value…
gjacob24 Jan 9, 2023
b8cc5ab
edited CHANGELOG.md to add details of the previous PR
gjacob24 Jan 9, 2023
e861efb
added research outputs to the CSV download of the plan
briri Jan 9, 2023
9cfce0d
updated JS that interacts with TinyMCE so that it stops using depreca…
briri Jan 9, 2023
44667f8
updated changelog
briri Jan 10, 2023
f089114
updated changelog
briri Jan 10, 2023
d104060
fix to properly use max per page settings
briri Jan 11, 2023
ffbe90c
added changelog entry
briri Jan 11, 2023
d6ee0ff
updated api v0 to use max_pages config value for api
briri Jan 23, 2023
6bb36e8
Merge branch 'development' into org_type_tip
briri Jan 23, 2023
16c2f27
Updated PDF font selector to use Roboto instead of Helvetica since Go…
briri Jan 23, 2023
85063e0
Merge branch 'development' into add_scss_to_editorconfig
benjaminfaure Jan 24, 2023
9f55ff5
Merge pull request #3275 from DMPRoadmap/research_output_file_size_issue
benjaminfaure Jan 24, 2023
afe989e
Merge pull request #3276 from DMPRoadmap/tinymce-update
benjaminfaure Jan 24, 2023
dfe09ee
Merge branch 'development' into research-outputs-csv
benjaminfaure Jan 24, 2023
b9b21f6
Merge branch 'development' into issue3254
benjaminfaure Jan 24, 2023
d0c1ecc
Merge pull request #3256 from benjaminfaure/add_scss_to_editorconfig
benjaminfaure Jan 24, 2023
0fc240e
Merge pull request #3242 from DMPRoadmap/statistics_filename_change
benjaminfaure Jan 24, 2023
70ecdf1
Merge pull request #3241 from DMPRoadmap/org_type_tip
benjaminfaure Jan 24, 2023
68ac8a7
Update CHANGELOG.md
benjaminfaure Jan 24, 2023
6734056
updated paginable concern to fix issue with keyword args
briri Jan 24, 2023
1d02678
fixed an issue that was causing templates.visibility to get set to or…
briri Jan 24, 2023
5246ce3
updated change log
briri Jan 24, 2023
f90fc88
fixed typo
briri Jan 24, 2023
beaaa93
make rubocop happy
briri Jan 24, 2023
b664780
removed before action from api v0 base_controller. opted to just incl…
briri Jan 25, 2023
66b628c
Merge branch 'development' of github.com:DMPRoadmap/roadmap into pagi…
briri Jan 25, 2023
7e2e563
Added missing show_research_outputs option into as_csv method
benjaminfaure Jan 27, 2023
00459b6
Merge pull request #3279 from DMPRoadmap/pagination-fix
benjaminfaure Jan 27, 2023
cfc9b39
Merge branch 'development' into domo-arigato
benjaminfaure Jan 27, 2023
1b816d9
Merge pull request #3284 from DMPRoadmap/domo-arigato
benjaminfaure Jan 27, 2023
223a7f9
Merge branch 'development' into fix-pagniable-links
benjaminfaure Jan 27, 2023
1348990
Merge pull request #3285 from DMPRoadmap/fix-pagniable-links
benjaminfaure Jan 27, 2023
9a62130
Merge branch 'development' into issue3254
benjaminfaure Jan 27, 2023
2300c89
Merge branch 'development' into research-outputs-csv
benjaminfaure Jan 30, 2023
36b6dfb
Merge pull request #3277 from DMPRoadmap/research-outputs-csv
benjaminfaure Jan 30, 2023
16f35a4
Merge branch 'development' into issue3254
benjaminfaure Jan 30, 2023
b99cadc
Merge pull request #3255 from benjaminfaure/issue3254
benjaminfaure Jan 30, 2023
20093d2
Merge branch 'development' into fix-template-save
benjaminfaure Jan 30, 2023
72e6f76
Merge pull request #3286 from DMPRoadmap/fix-template-save
benjaminfaure Jan 30, 2023
af32bbe
Updated translations
benjaminfaure Feb 3, 2023
203a1c2
Updated Ruby & JS dependencies
benjaminfaure Feb 3, 2023
27c3c4a
Make rubocop happy
benjaminfaure Feb 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ insert_final_newline = true

# Matches multiple files with brace expansion notation
# Set default charset
[*.{js,rb,erb}]
[*.{js,scss,rb,erb}]
charset = utf-8
indent_style = space
indent_size = 2
indent_size = 2
32 changes: 32 additions & 0 deletions .github/workflows/danger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Danger

on: [push, pull_request]

jobs:
danger:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3

- name: 'Determine Ruby and Bundler Versions from Gemfile.lock'
run: |
echo "RUBY_VERSION=`cat ./Gemfile.lock | grep -A 1 'RUBY VERSION' | grep 'ruby' | grep -oE '[0-9]\.[0-9]'`" >> $GITHUB_ENV
echo "BUNDLER_VERSION=`cat ./Gemfile.lock | grep -A 1 'BUNDLED WITH' | grep -oE '[0-9]\.[0-9]'`" >> $GITHUB_ENV

# Install Ruby - using the version found in the Gemfile.lock
- name: 'Install Ruby'
uses: actions/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}

- name: 'Bundle Install'
run: |
gem install bundler -v ${{ env.BUNDLER_VERSION }}
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3 --without pgsql rollbar aws

- name: 'Run Danger'
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bundle exec danger
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Changelog

### Added

- Added CHANGELOG.md and Danger Github Action [#3257](https://github.com/DMPRoadmap/roadmap/issues/3257)
- Added validation with custom error message in research_output.rb to ensure a user does not enter a very large value as 'Anticipated file size'. [#3161](https://github.com/DMPRoadmap/roadmap/issues/3161)
- Added popover for org profile page and added explanation for public plan
### Fixed

- Froze mail gem version [#3254](https://github.com/DMPRoadmap/roadmap/issues/3254)
- Updated the CSV export so that it now includes research outputs
- Updated sans-serif font used in PDF downloads to Roboto since Google API no longer offers Helvetica
- Fixed discrepencies with default/max per_page values for API and UI pagination
- Updated JS that used to call the TinyMCE `setMode()` function so that it now calls `mode.set()` because the former is now deprecated.
- Patched an issue that was causing a template's visibility to change to 'organizationally_visible' when saving on the template details page.
- Fixed an issue with the Rails 6 keyword arguments change that was causing the `paginable_sort_link` to fail

### Changed

- Added scss files to EditorConfig
- Change csv file name for statistics from 'Completed' to 'Created'
34 changes: 34 additions & 0 deletions Dangerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# frozen_string_literal: true

# Make sure non-trivial amounts of code changes come with corresponding tests
has_app_changes = !git.modified_files.grep(/lib/).empty? || !git.modified_files.grep(/app/).empty?
has_test_changes = !git.modified_files.grep(/spec/).empty?

if git.lines_of_code > 50 && has_app_changes && !has_test_changes
warn('There are code changes, but no corresponding tests. ' \
'Please include tests if this PR introduces any modifications in ' \
'behavior. \n
Ignore this warning if the PR ONLY contains translation.io synced updates.',
sticky: false)
end

# Mainly to encourage writing up some reasoning about the PR, rather than
# just leaving a title
warn('Please add a detailed summary in the description.') if github.pr_body.length < 3

# Warn when there is a big PR
warn('This PR is too big! Consider breaking it down into smaller PRs.') if git.lines_of_code > 1000

# Make it more obvious that a PR is a work in progress and shouldn't be merged yet
warn('PR is classed as Work in Progress') if github.pr_title.include? '[WIP]'

# Let people say that this isn't worth a CHANGELOG entry in the PR if they choose
declared_trivial = (github.pr_title + github.pr_body).include?('#trivial') || !has_app_changes

if !git.modified_files.include?('CHANGELOG.md') && !declared_trivial
failure(
"Please include a CHANGELOG entry. \n
You can find it at [CHANGELOG.md](https://github.com/DMPRoadmap/roadmap/blob/main/CHANGELOG.md).",
sticky: false
)
end
8 changes: 8 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,11 @@ gem 'dotenv-rails'

gem 'activerecord_json_validator'

# We need to freeze the mail gem version as the recently released 2.8.0 triggers an exception
# We will need to check if it's fixed when we migrate to Ruby 3.0/3.1
# See : https://github.com/DMPRoadmap/roadmap/issues/3254
gem 'mail', '2.7.1'

# ================================= #
# ENVIRONMENT SPECIFIC DEPENDENCIES #
# ================================= #
Expand Down Expand Up @@ -292,6 +297,9 @@ group :test do
# This gem brings back assigns to your controller tests as well as assert_template
# to both controller and integration tests.
gem 'rails-controller-testing'

# automating code review
gem 'danger', '~> 9.0', require: false
end

group :ci, :development do
Expand Down
Loading