evergreen
evergreen copied to clipboard
v1.11.1 422 Error
Describe the bug
It seems that the v1.11.1
version introduced a validation error being returned from the GitHub API at the very end of the process.
The error message:
Checking org/**** for compatible package managers
Traceback (most recent call last):
File "/action/workspace/evergreen.py", line 427, in <module>
main() # pragma: no cover
^^^^^^
File "/action/workspace/evergreen.py", line 162, in main
pull = commit_changes(
^^^^^^^^^^^^^^^
File "/action/workspace/evergreen.py", line 321, in commit_changes
pull = repo.create_pull(
^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/github3/decorators.py", line 24, in auth_wrapper
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/github3/repos/repo.py", line 1185, in create_pull
return self._create_pull(data)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/github3/repos/repo.py", line 117, in _create_pull
json = self._json(self._post(url, data=data), 201)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/github3/models.py", line 161, in _json
raise exceptions.error_for(response)
github3.exceptions.UnprocessableEntity: 422 Validation Failed
To Reproduce
- Pull latest
- Run as normal with the config below
Expected behavior
Expect a successful processing of repos created in the last week.
Screenshots
No response
Additional context
Configuration
---
name: Weekly dependabot checks
on:
workflow_dispatch:
inputs:
batch_size:
description: "Number of repositories to process in a single run"
required: false
default: 5
type: number
schedule:
# Runs twice per week, Tuesdays and Saturdays at 2:00 AM UTC
- cron: "0 2 * * 2,6"
jobs:
evergreen:
name: evergreen
runs-on: ubuntu-latest
steps:
- shell: bash
run: |
# Get the current date
current_date=$(date +'%Y-%m-%d')
# Calculate the previous month
previous_date=$(date -d "$current_date -7 day" +'%Y-%m-%d')
echo "$previous_date..$current_date"
echo "one_week_ago=$previous_date" >> "$GITHUB_ENV"
- name: Run evergreen action
uses: github/evergreen@v1
env:
GH_APP_ID: "<id>"
GH_APP_INSTALLATION_ID: "<id>"
GH_APP_PRIVATE_KEY: ${{ secrets.GH_APP_PRIVATE_KEY }}
ORGANIZATION: <org>
GROUP_DEPENDENCIES: true
PROJECT_ID: 9
BATCH_SIZE: ${{ inputs.batch_size || 50 }}
CREATED_AFTER_DATE: ${{ env.one_week_ago }}