Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughAdds a GitHub Actions workflow that automatically manages PR lifecycle by updating GitHub Project V2 status fields based on PR events (opened, converted to draft, ready for review, closed), mapping them to corresponding project statuses. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Signed-off-by: 0xisk <iskander.andrews@openzeppelin.com>
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/pr-lifecycle.yml:
- Around line 30-55: Validate required environment variables (PROJECT_ID,
STATUS_FIELD_ID and STATUS_OPTIONS entries STATUS_OPTION_IN_PROGRESS,
STATUS_OPTION_NEEDS_REVIEW, STATUS_OPTION_CLOSED) at the start of the workflow
logic and fail fast with a clear error when any is missing; specifically check
the constants PROJECT_ID, STATUS_FIELD_ID and each STATUS_OPTIONS property
before computing targetStatus (using context.payload.action / pull_request), and
throw or call a failure helper so the action stops with a descriptive message
instead of silently no-op or producing unclear GraphQL errors.
- Around line 3-6: The workflow trigger is missing the pull_request "reopened"
type and the job-level/action condition only checks for "opened", so add
"reopened" to the pull_request types array and update any condition that
currently compares github.event.action == 'opened' (or similar) to also allow
'reopened' (e.g., github.event.action == 'opened' || github.event.action ==
'reopened' or use contains(['opened','reopened'], github.event.action)); update
both the on.pull_request.types list and every conditional that gates
draft/status handling to include reopened so reopened PRs run the same lifecycle
logic as opened PRs.
andrew-fleming
left a comment
There was a problem hiding this comment.
Looks good @0xisk! Just left a question
I also wonder if there's a way to leverage a reusable workflow so we don't have to repeat ourselves in each repo
Signed-off-by: 0xisk <iskander.andrews@openzeppelin.com>
Signed-off-by: 0xisk <iskander.andrews@openzeppelin.com>
Signed-off-by: 0xisk <iskander.andrews@openzeppelin.com>
Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com> Signed-off-by: 0xisk <0xisk@proton.me>
…ed and pin template version Signed-off-by: 0xisk <iskander.andrews@openzeppelin.com>
Types of changes
What types of changes does your code introduce to OpenZeppelin Midnight Contracts?
Put an
xin the boxes that applyFixes #295
PR Checklist
Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...
Summary by CodeRabbit