All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
-
New
secretstask group, defined viaRakeGithub.define_secrets_tasks, for managing GitHub repository secrets. It exposesprovision,destroyandensuretasks. Each secret is written to the Actions secret store, and additionally to the Dependabot secret store when it setsdependabot: true, so that Dependabot-triggered workflow runs can read the secrets they need.Secrets are supplied as an array of hashes, e.g.
[{ name: 'SOME_SECRET', value: 'plaintext' }], and are encrypted client-side before being sent to GitHub. -
The
secretstask group is also included in the tasks defined byRakeGithub.define_repository_tasks. -
New
environmentstask group, defined viaRakeGithub.define_environments_tasks, for managing GitHub deployment environments. It exposesprovision,destroyandensuretasks, and supports protection rules including required reviewers.Environments are supplied as an array of hashes, e.g.
[{ name: 'release', reviewers: [{ team: 'maintainers' }] }]. Onlynameis required; team and user reviewers are resolved to their numeric ids before being sent to GitHub. -
The
environmentstask group is also included in the tasks defined byRakeGithub.define_repository_tasks.
- The
pull_requests:mergetask no longer requires setting the branch name and commit message provide via arguments as parameters within the task definition. - The
octokitdependency lower bound has been raised from>= 4.16to>= 7.0, as the Dependabot secret methods used by thesecretstask group were introduced in octokit 7.0. Consumers pinning octokit below 7.0 will need to relax that constraint. - Added a new runtime dependency on
rbnacl(~> 7.1), used to encrypt secrets client-side.rbnaclrequires the native libsodium library to be installed on the host (see the Installation section of the README); this is only needed when using thesecretstask group.
-
New task
pull_requests:merge[branch_name,commit_message]to merge the PR associated with the specified branch.commit_messageis optional, and can contain the original commit message with the%splaceholder, e.g.pull_requests:merge[new_feature,"%s [skip ci]"].Make sure to pass through
branch_nameandcommit_messagewhen defining your rake task:RakeGithub.define_repository_tasks( # ... ) do |t, args| # ... t.branch_name = args.branch_name t.commit_message = args.commit_message end