Skip to content

Commit

Permalink
Extract tools related to releases to gem (decidim#12281)
Browse files Browse the repository at this point in the history
* Create new decidim-maintainers_toolbox gem with the bundler skeleton

* Add documentation

* Add gem specifications

* Extract classes, specs and scripts to decidim-maintainers_toolbox gem

* Add missing gem dependencies

* Fix filepaths and namespaces

* Add CI workflow configuration for decidim-maintainers_toolbox

* Exclude decidim-maintainers_toolbox gem from the GemManager gems

* Use ruby 2.7.5 for decidim-maintainers_toolbox

* Fix rubocop offense

* Document special case on versions

* Extract GemManager to decidim-maintainers-toolbox gem

* Extract GemManager rake tasks to gem

* Add namespace in GemManager tasks

* Fix spellchecker offenses

* Fix ruby syntax for this version

* Fix autocorrectable rubocop offenses

* Add missing directories in requires after moving files

* Revert "Add missing directories in requires after moving files"

This reverts commit e3b1b56.

* Revert "Add namespace in GemManager tasks"

This reverts commit 89b447d.

* Revert "Extract GemManager rake tasks to gem"

This reverts commit d8b18a4.

* Revert "Extract GemManager to decidim-maintainers-toolbox gem"

This reverts commit 9f2f782.

* Fix rubocop offenses

* Fix markdownlint offense

* Rename scripts to use the decidim preffix

Suggested on code review

* Add missing dependencies

* Fix relative requires

* Fix rubocop offenses

* Add missing namespaces

Suggested on code review

Co-authored-by: Alexandru Emil Lupu <[email protected]>

* Add missing namespace in spec

* Fix arguments for hashes

Suggested on code review

* Refactor ChangelogGenerator to use the CLI pattern (with Thor)

* Implement ChangeLogGenerator class in Releaser

* Fix rubocop offenses

* Remove decidim-maintainers_toolbox gem from this repository

Now it lives in https://github.com/decidim/decidim-maintainers_toolbox

* Restore changes made in GemManager

* Update link to repository

---------

Co-authored-by: Alexandru Emil Lupu <[email protected]>
  • Loading branch information
andreslucena and alecslupu authored Feb 7, 2024
1 parent c27d269 commit 088eb28
Show file tree
Hide file tree
Showing 29 changed files with 5 additions and 2,456 deletions.
44 changes: 0 additions & 44 deletions bin/backporter

This file was deleted.

48 changes: 0 additions & 48 deletions bin/backports_checker

This file was deleted.

196 changes: 0 additions & 196 deletions bin/changelog_generator

This file was deleted.

41 changes: 0 additions & 41 deletions bin/releaser

This file was deleted.

9 changes: 5 additions & 4 deletions docs/modules/develop/pages/backports.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,21 @@ The process for making backports is the following:
. Check in the git commit history what was the latest backports on the branch that you are working with. https://github.com/decidim/decidim/commits/release/0.27-stable[Example for v0.27]. Copy the number of the last PR backported.
. Search in GitHub for the this PR in the list of merged PRs of the `type: fix`. https://github.com/decidim/decidim/pulls?page=1&q=is%3Apr+sort%3Aupdated-desc+label%3A%22type%3A+fix%22+is%3Amerged[Example URL].
. Check the PRs merged just before and after this one. You need to find the last ones that were not backported already to start with the backport process. A fast way for checking this out is to open the PRs and see the mentions from the backports in the GitHub references.
. Once you have the list of the PRs that you want to backport, you can start with the process by using the https://github.com/decidim/decidim/blob/develop/bin/backporter[backporter script]. This script mostly handles the branch creation, cherrypicking, labeling and pushing of the fix. For using it you will need to have a GitHub Personal Access Token.
. Once you have the list of the PRs that you want to backport, you can start with the process by using the https://github.com/decidim/decidim-maintainers_toolbox[decidim-backporter script]. This script mostly handles the branch creation, cherrypicking, labeling and pushing of the fix. For using it you will need to have a GitHub Personal Access Token.

This is an example on how this command is called:

```shell
$ backporter --github-token=GITHUB_TOKEN --pull-request-id=10248 --version-number=0.27
$ gem install UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
$ decidim-backporter --github-token=GITHUB_TOKEN --pull-request-id=10248 --version-number=0.27
```

And this is the current full documentation for this script:

```shell
$ ./bin/backporter --help
$ decidim-backporter --help
Usage:
backporter --github-token=GITHUB_TOKEN --pull-request-id=PULL_REQUEST_ID --version-number=VERSION_NUMBER
decidim-backporter --github-token=GITHUB_TOKEN --pull-request-id=PULL_REQUEST_ID --version-number=VERSION_NUMBER

Options:
--github-token=GITHUB_TOKEN # Required. Github Personal Access Token (PAT). It can be obtained from https://github.com/settings/tokens/new. You will need to create one with `public_repo` access.
Expand Down
Loading

0 comments on commit 088eb28

Please sign in to comment.