Skip to content

Commit

Permalink
Change job conditions user check. Change committer on update-poetry-l…
Browse files Browse the repository at this point in the history
…ock (#77)

* Change job conditions to check user who created the request rather than run the action. Change update poetry lock to use abd-vro-machine as use for commit. Drop versions back for a pre-commit hook and a pyproject.toml dependency. Update readme badge for CI.
  • Loading branch information
dfitchett authored Jan 13, 2025
1 parent 6493657 commit 6122ca5
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
name: Run Dependabot Auto-Merge
needs: call-test-code
if: >
github.actor == 'dependabot[bot]' &&
(github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'abd-vro-machine') &&
needs.call-test-code.result == 'success'
uses: ./.github/workflows/dependabot-auto-merge.yml
secrets: inherit
3 changes: 1 addition & 2 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ name: "Dependabot Auto-Merge"

on:
workflow_call: # Allows this workflow to be called from another workflow
workflow_dispatch: # Allow manual triggering

permissions:
contents: write
pull-requests: write

jobs:
dependabot-auto-merge:
if: github.actor == 'dependabot[bot]'
if: github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'abd-vro-machine'
runs-on: ubuntu-latest
steps:
- name: Fetch Dependabot Metadata
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-poetry-lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ jobs:
- name: Commit and push changes
if: env.lock_needs_update == 'true'
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git config user.name "abd-vro-machine"
git config user.email "${{ secrets.ABD_VRO_MACHINE_EMAIL }}"
git add poetry.lock
git commit -m "Update poetry.lock using Poetry ${{ env.POETRY_VERSION }}"
git push
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ repos:
- id: validate-pyproject

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.1
rev: v0.9.0
hooks:
- id: ruff
args: [ --fix ]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Disability Max Ratings API

[![Tests](https://github.com/department-of-veterans-affairs/disability-max-ratings-api/actions/workflows/test-code.yml/badge.svg)](https://github.com/department-of-veterans-affairs/disability-max-ratings-api/actions/workflows/test-code.yml)
[![Continuous Integration](https://github.com/department-of-veterans-affairs/disability-max-ratings-api/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/department-of-veterans-affairs/disability-max-ratings-api/actions/workflows/continuous-integration.yml)
[![Maintainability](https://api.codeclimate.com/v1/badges/3cdea963cb3092674df1/maintainability)](https://codeclimate.com/github/department-of-veterans-affairs/disability-max-ratings-api/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/3cdea963cb3092674df1/test_coverage)](https://codeclimate.com/github/department-of-veterans-affairs/disability-max-ratings-api/test_coverage)
[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
Expand Down
16 changes: 8 additions & 8 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ exclude = [

[tool.poetry.dependencies]
python = "3.12.3"
poetry = "2.0.1"
poetry = "2.0.0"
fastapi = "0.115.6"
httpx = "0.28.1"
uvicorn = {version = "0.34.0", extras = ["standard"]}
Expand Down

0 comments on commit 6122ca5

Please sign in to comment.