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

Always fails on dependabot PR #221

Open
leemeador opened this issue Sep 1, 2022 · 0 comments
Open

Always fails on dependabot PR #221

leemeador opened this issue Sep 1, 2022 · 0 comments

Comments

@leemeador
Copy link

leemeador commented Sep 1, 2022

Dependabot creates PRs with titles that are non-conventional-commit compliant like:

Bump some-dependency from 0.79.0 to 0.81.0

I know this is not your responsibility but I would have found it helpful to handle right from the start of using your action instead of using it and then having dependabot foul things up in its default PR titles.

Sometimes this is not a problem. According to the dependabot docs, if you merge their PR with a "squash and merge" option and then put a proper conventional commit message on the PR, it will detect that and copy that form of prefix in future PRs. I don't know the quirks of this feature.

You could add a section to the main README.md showing how to skip calling the linter action. There would be an example workflow with an 'if' in it that skips the check when the PR is from dependabot.

Some docs say that this is the condition to use in a workflow to detect when a PR is generated by dependabot.

github.actor == 'dependabot[bot]'

You could also describe how to get dependabot to add prefixes to their PR titles by adding something like this to the dependabot.yaml file:

  - package-ecosystem: "pip" # for example
    directory: "/" # ... or whatever applies
    schedule:
      interval: "weekly"
    commit-message:  # this part adds 'chore:' to the front of the PR title
      prefix: "chore"

I'm still trying that last method since we don't just merge the dependabot PRs. We use the updates to create a new PR with several sets of dependabot suggestions in it and verify that they don't break anything. Then we merge that one and dependabot figures out the changes have been made and deletes its own PRs.

I'll change this comment if I find it doesn't work right.

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

No branches or pull requests

1 participant