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

Allow commit_message_options to be passed to pull request creator #1227

Merged
merged 1 commit into from Jun 26, 2019

Conversation

greysteil
Copy link
Contributor

@greysteil greysteil commented Jun 25, 2019

Allows a hash of commit message options to be passed to the pull request creator. The allowed options are:

  • signoff_details which works as currently used
  • prefix which allows a prefix to be specified
  • include_scope which takes a boolean to determine with the dependency's scope should be included in the prefix

The intention is for prefix and include_scope to be allowed keys under commit_message in Dependabot's config files, and for this to provide a robust way for folks to specify that they want to use a particular commit style. A config file might look like:

version: 1
update_configs:
  - package_manager: "ruby:bundler"
    directory: "/"
    update_schedule: "live"
    commit_message:
      prefix: "chore"
      include_scope: true

One deficiency here is that the same prefix will be used for all commits, so this won't help folks who want to specify fix for some commits and build for others. That's a pity, but we can iterate towards a solution there if required.

Another option I've toyed with including but so far excluded is downcase_subject, as some conventions require that the entire first line of the commit message is downcased. That would be easy to add later.

@greysteil greysteil requested a review from feelepxyz June 25, 2019 12:25
@greysteil
Copy link
Contributor Author

@feelepxyz I'm most interested in your review of the proposed config file changes. The code here should be fine.

@feelepxyz
Copy link
Contributor

@greysteil config file changes make sense to me! 🙌

@Kocal
Copy link

Kocal commented Jun 25, 2019

That's awesome, thank you for your work! :)

@greysteil
Copy link
Contributor Author

OK, let's do this. Will need some work on Dependabot's backend to parse and store those options from config files - I'll get that done today / tomorrow.

@greysteil greysteil merged commit 46b4fd3 into master Jun 26, 2019
@greysteil greysteil deleted the pass-commit-message-options branch June 26, 2019 09:47
@greysteil
Copy link
Contributor Author

The work is now finished in Dependabot Backend, and I've just pushed updated docs here.

@missjwo
Copy link

missjwo commented Apr 11, 2023

The link in the last message is broken now.

This is probably the link you now want: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#commit-message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants