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

Adapt to the new default branch name ("main") #56

Merged
merged 1 commit into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ The more detailed you are, the better.
**Before submitting the PR make sure the following are checked:**

* [ ] The PR relates to *only* one cop with a clear title and description.
* [ ] Feature branch is up-to-date with `master` (if not - rebase it).
* [ ] Feature branch is up-to-date with `main` (if not - rebase it).
* [ ] Squashed related commits together.
* [ ] Added tests.
* [ ] Ran and ensured all tests are passing on a development environment.
* [ ] If this is a new cop, added an entry for the cop on `/config/default.yml`
* [ ] Updated Changelog
* [ ] Updated Changelog
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## master (unreleased)
## main (unreleased)

## 0.1.4 (2023-08-04)

Expand Down
4 changes: 2 additions & 2 deletions rubocop-solidus.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ Gem::Specification.new do |spec|

spec.metadata['homepage_uri'] = spec.homepage
spec.metadata['source_code_uri'] = 'https://www.github.com/solidusio/rubocop-solidus'
spec.metadata['changelog_uri'] = 'https://www.github.com/solidusio/rubocop-solidus/blob/master/CHANGELOG.md'
spec.metadata['documentation_uri'] = 'https://www.github.com/solidusio/rubocop-solidus/blob/master/docs/cops.md'
spec.metadata['changelog_uri'] = 'https://www.github.com/solidusio/rubocop-solidus/blob/main/CHANGELOG.md'
spec.metadata['documentation_uri'] = 'https://www.github.com/solidusio/rubocop-solidus/blob/main/docs/cops.md'

# Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
Expand Down
2 changes: 1 addition & 1 deletion tasks/changelog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Changelog utility
class Changelog
ENTRIES_PATH = 'changelog/'
FIRST_HEADER = /#{Regexp.escape("## master (unreleased)\n")}/m.freeze
FIRST_HEADER = /#{Regexp.escape("## main (unreleased)\n")}/m.freeze
ENTRIES_PATH_TEMPLATE = "#{ENTRIES_PATH}%<type>s_%<name>s.md"
TYPE_REGEXP = /#{Regexp.escape(ENTRIES_PATH)}([a-z]+)_/.freeze
TYPE_TO_HEADER = { new: 'New features', fix: 'Bug fixes', change: 'Changes' }.freeze
Expand Down
4 changes: 2 additions & 2 deletions tasks/cut_release.rake
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ namespace :cut_release do

def add_header_to_changelog(version)
changelog = File.read('CHANGELOG.md')
head, tail = changelog.split("## master (unreleased)\n\n", 2)
head, tail = changelog.split("## main (unreleased)\n\n", 2)

File.open('CHANGELOG.md', 'w') do |f|
f << head
f << "## master (unreleased)\n\n"
f << "## main (unreleased)\n\n"
f << "## #{version} (#{Time.now.strftime('%F')})\n\n"
f << tail
end
Expand Down