Skip to content

feat: add set-project-month reusable workflow#61

Merged
kevwilliams merged 4 commits intomainfrom
feat/set-project-month
Apr 9, 2026
Merged

feat: add set-project-month reusable workflow#61
kevwilliams merged 4 commits intomainfrom
feat/set-project-month

Conversation

@kevwilliams
Copy link
Copy Markdown
Contributor

@kevwilliams kevwilliams commented Apr 9, 2026

Summary

  • Adds a reusable workflow that automatically adds a PR to the datum-cloud org project and sets the Month field based on the current calendar month (e.g. April 2026)
  • Month option is resolved dynamically at runtime — no hardcoded IDs, works month-to-month as long as the option exists in the project
  • Gracefully skips (exit 0) if no matching Month option is found, so PRs are never blocked
  • Uses ORG_PROJECT_TOKEN org secret for project write access (classic PAT with project scope)

Usage

Consumers opt in with a small workflow file:

```yaml
name: Set Project Month

on:
pull_request:
types: [opened, ready_for_review, reopened]

jobs:
set-month:
uses: datum-cloud/actions/.github/workflows/set-project-month.yaml@main
secrets: inherit
```

First consumer PRs will follow for: cloud-portal, staff-portal, infra, milo.

Test plan

  • Merge this PR
  • Confirm ORG_PROJECT_TOKEN org secret is set with a PAT that has project scope
  • Open a test PR in a consumer repo and verify it appears in project 60 with the correct Month set

Adds a reusable workflow that automatically adds a PR to the org-level
GitHub Project (project 60) and sets the Month field based on the
current calendar month (e.g. 'April 2026').

Key features:
- Dynamically resolves the Month field option ID at runtime — no
  hardcoded IDs, works month-to-month as long as the option exists
- Gracefully skips with a clear log message if no matching Month option
  is found in the project, so PRs are never blocked
- Idempotent — safe to call on reopened or ready-for-review events
- Uses ORG_PROJECT_TOKEN secret for project write access

Consumers opt in with a single 6-line workflow calling:
  uses: datum-cloud/actions/.github/workflows/set-project-month.yaml@main
  secrets: inherit
@kevwilliams kevwilliams self-assigned this Apr 9, 2026
@kevwilliams kevwilliams requested a review from scotwells April 9, 2026 18:59
@kevwilliams kevwilliams merged commit d123370 into main Apr 9, 2026
3 checks passed
@kevwilliams kevwilliams deleted the feat/set-project-month branch April 9, 2026 21:31
kevwilliams added a commit to datum-cloud/cloud-portal that referenced this pull request Apr 10, 2026
## Summary

- Adds the `set-project-month` reusable workflow from
`datum-cloud/actions`
- Automatically adds new PRs to the org project (#60) and sets the
**Month** field to the current calendar month (e.g. `May 2026`)
- Triggers on `opened`, `ready_for_review`, and `reopened` events
- Requires the `ORG_PROJECT_TOKEN` org secret to be set (classic PAT
with `project` scope)

## Test plan

- [ ] Merge datum-cloud/actions#61 first
- [ ] Confirm `ORG_PROJECT_TOKEN` org secret is in place
- [ ] Open a test PR and verify it appears in project #60 with the
correct Month set
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.

2 participants