-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3289 from DMPRoadmap/development
Development
- Loading branch information
Showing
58 changed files
with
2,535 additions
and
1,883 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
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 |
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,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' |
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,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 |
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.