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

Add auto merge for pre commit and dependabot in a CI job #24

Merged
merged 2 commits into from
Jun 14, 2024

Conversation

uittenbroekrobbert
Copy link
Contributor

@uittenbroekrobbert uittenbroekrobbert commented Jun 12, 2024

Description

Add a CI job to auto merge updates done by dependabot and pre-commit. Merges for dependabot are only done if minor or patch. For pre-commit it updates everything, as we don't have that level of control.

Resolves #

https://github.com/orgs/MinBZK/projects/7?pane=issue&itemId=65105178

Checklist

Please check all the boxes that apply to this pull request using "x":

Most changes are GitHub actions and those can not be tested locally. Pre-commit has been tested locally.

  • I have tested the changes locally and verified that they work as expected.
  • I have followed the project's coding conventions and style guidelines.
  • I have rebased my branch onto the latest commit of the main branch.
  • I have squashed or reorganized my commits into logical units.
  • I have read, understood and agree to the Developer Certificate of Origin, which this project utilizes.

@uittenbroekrobbert uittenbroekrobbert requested a review from a team as a code owner June 12, 2024 07:09
@uittenbroekrobbert uittenbroekrobbert linked an issue Jun 12, 2024 that may be closed by this pull request
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to our community 🤗 and thank you for your first contribution.

As a first time contributor please make sure to review our contribution guidelines ❤️

Copy link
Member

@berrydenhartog berrydenhartog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also add a CI workflow that build/lint the project?

@uittenbroekrobbert
Copy link
Contributor Author

Could you also add a CI workflow that build/lint the project?

@berrydenhartog

I assume this would be steps to perform before approve / merge, so it becomes something like:
steps:

  • checkout project
  • lint project (abort if failed)
  • build project (abort if failed)
  • (optional) test project (abort if failed)
  • approve
  • merge

Is it worth looking into reusable workflows (have you done that before?), it seems like a good way to avoid code duplication but is some more work to set up:
https://docs.github.com/en/actions/using-workflows/reusing-workflows

@berrydenhartog
Copy link
Member

berrydenhartog commented Jun 12, 2024

Could you also add a CI workflow that build/lint the project?

@berrydenhartog

I assume this would be steps to perform before approve / merge, so it becomes something like: steps:

* checkout project

* lint project (abort if failed)

* build project (abort if failed)

* (optional) test project (abort if failed)

* approve

* merge

Is it worth looking into reusable workflows (have you done that before?), it seems like a good way to avoid code duplication but is some more work to set up: https://docs.github.com/en/actions/using-workflows/reusing-workflows

Indeed. but the approve and merge is done by your current action.
in another action you could implement a very simple ci job that builds the package and runs a linter:

example:

<install deps>
poetry build
poetry run ruff 
poetry run pyright

@berrydenhartog
Copy link
Member

Reusable workflows could be usefull, but often i do not see them used because everyone wants control over there pipeline.

@berrydenhartog berrydenhartog self-requested a review June 13, 2024 12:30
berrydenhartog
berrydenhartog previously approved these changes Jun 13, 2024
Copy link
Member

@berrydenhartog berrydenhartog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@uittenbroekrobbert uittenbroekrobbert force-pushed the 21-automate-pre-commit-and-dependabot-prs branch from 8d1be58 to b9b6158 Compare June 14, 2024 14:30
@uittenbroekrobbert uittenbroekrobbert force-pushed the 21-automate-pre-commit-and-dependabot-prs branch from b9b6158 to d843223 Compare June 14, 2024 14:32
Copy link
Member

@berrydenhartog berrydenhartog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@berrydenhartog berrydenhartog merged commit 3b253c2 into main Jun 14, 2024
8 checks passed
@berrydenhartog berrydenhartog deleted the 21-automate-pre-commit-and-dependabot-prs branch June 14, 2024 14:37
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.

Automate Pre-commit and Dependabot PRs
2 participants