Skip to content

fix: Add GitHub project board automation for issues and PRs - #76

Merged
mpaulosky merged 1 commit into
devfrom
squad/76-add-project-automation
Apr 20, 2026
Merged

fix: Add GitHub project board automation for issues and PRs#76
mpaulosky merged 1 commit into
devfrom
squad/76-add-project-automation

Conversation

@mpaulosky

Copy link
Copy Markdown
Owner

Summary

Closes #76

Working as Boromir (DevOps / Infra)

The existing project-board-automation.yml only moves items between columns — it never added new issues or PRs to the board in the first place. This PR fills that gap with two dedicated workflows.

Changes

add-issues-to-project.yml

  • Triggers on issues: [opened, reopened]
  • Filters to issues labelled squad (avoids noise from unrelated issues)
  • Adds the issue to the MyBlog project board via GraphQL addProjectV2ItemById
  • Sets the Status field → Backlog (f75ad846)
  • Handles 403 errors gracefully with a hint to use a PAT with project scope

add-prs-to-project.yml

  • Triggers on pull_request: [opened, reopened]
  • Adds every new PR to the MyBlog project board
  • Sets the Status field → In Review (df73e18b)
  • Handles 403 errors gracefully

Project IDs used

Key Value
PROJECT_ID PVT_kwHOA5k0b84BVFTy
STATUS_FIELD_ID PVTSSF_lAHOA5k0b84BVFTyzhQjgPk
BACKLOG_OPTION_ID f75ad846
IN_REVIEW_OPTION_ID df73e18b

Notes

Both workflows use secrets.GITHUB_TOKEN. If GitHub's fine-grained token restrictions block project writes (403), a PAT with the project scope stored as secrets.GH_PROJECT_TOKEN can be substituted.

- add-issues-to-project.yml: adds squad-labeled issues to project board and sets Status → Backlog
- add-prs-to-project.yml: adds all new PRs to project board and sets Status → In Review
- Both workflows handle 403 errors gracefully with guidance on PAT scope

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 20, 2026 17:27
@github-actions github-actions Bot added the squad Squad triage inbox — Lead will assign to a member label Apr 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🏗️ PR Added to Squad Triage Queue

This PR has been labeled with squad and added to the triage queue.

Next steps:

  • The squad Lead will review and assign to an appropriate team member
  • A squad:member label will be added after triage

If you know which squad member should handle this, you can add the appropriate squad:member label yourself.

@github-actions

Copy link
Copy Markdown
Contributor

Summary

Summary
Generated on: 04/20/2026 - 17:29:14
Coverage date: 04/20/2026 - 17:28:40 - 04/20/2026 - 17:28:55
Parser: MultiReport (4x Cobertura)
Assemblies: 4
Classes: 51
Files: 50
Line coverage: 66.4% (556 of 837)
Covered lines: 556
Uncovered lines: 281
Coverable lines: 837
Total lines: 2525
Branch coverage: 66.5% (189 of 284)
Covered branches: 189
Total branches: 284
Method coverage: Feature is only available for sponsors
Tag: 80_24680697097

Coverage

AppHost - 0%
Name Line Branch
AppHost 0% ****
Program 0%
Domain - 87.2%
Name Line Branch
Domain 87.2% 91.6%
Domain.Abstractions.Result 95% 50%
Domain.Abstractions.Result`1 75% 50%
MyBlog.Domain.Behaviors.ValidationBehavior`2 100% 100%
MyBlog.Domain.Entities.BlogPost 100%
MyBlog.Domain.Features.BlogPosts.Commands.CreateBlogPost.CreateBlogPostComm
and
100%
MyBlog.Domain.Features.BlogPosts.Commands.CreateBlogPost.CreateBlogPostComm
andHandler
100%
MyBlog.Domain.Features.BlogPosts.Commands.CreateBlogPost.CreateBlogPostComm
andValidator
0%
MyBlog.Domain.Features.BlogPosts.Commands.DeleteBlogPost.DeleteBlogPostComm
and
100%
MyBlog.Domain.Features.BlogPosts.Commands.DeleteBlogPost.DeleteBlogPostComm
andHandler
100%
MyBlog.Domain.Features.BlogPosts.Commands.DeleteBlogPost.DeleteBlogPostComm
andValidator
0%
MyBlog.Domain.Features.BlogPosts.Commands.UpdateBlogPost.UpdateBlogPostComm
and
100%
MyBlog.Domain.Features.BlogPosts.Commands.UpdateBlogPost.UpdateBlogPostComm
andHandler
100% 100%
MyBlog.Domain.Features.BlogPosts.Commands.UpdateBlogPost.UpdateBlogPostComm
andValidator
0%
MyBlog.Domain.Features.BlogPosts.Queries.GetAllBlogPosts.GetAllBlogPostsQue
ryHandler
100%
MyBlog.Domain.Features.BlogPosts.Queries.GetBlogPostById.GetBlogPostByIdQue
ry
100%
MyBlog.Domain.Features.BlogPosts.Queries.GetBlogPostById.GetBlogPostByIdQue
ryHandler
100% 100%
ServiceDefaults - 0%
Name Line Branch
ServiceDefaults 0% 0%
Microsoft.Extensions.Hosting.Extensions 0% 0%
Web - 68.7%
Name Line Branch
Web 68.7% 69%
MyBlog.Web.Components.Layout.MainLayout 100%
MyBlog.Web.Components.Layout.NavMenu 82.8% 71.4%
MyBlog.Web.Components.Pages.Error 100% 75%
MyBlog.Web.Components.Routes 0% 0%
MyBlog.Web.Components.Shared.RedirectToLogin 100%
MyBlog.Web.Data.BlogDbContext 100%
MyBlog.Web.Data.BlogPostDto 100%
MyBlog.Web.Data.BlogPostMappings 100%
MyBlog.Web.Data.MongoDbBlogPostRepository 100% 100%
MyBlog.Web.Features.BlogPosts.Create.Create 75% 50%
MyBlog.Web.Features.BlogPosts.Create.CreateBlogPostCommand 100%
MyBlog.Web.Features.BlogPosts.Create.CreateBlogPostCommandValidator 100%
MyBlog.Web.Features.BlogPosts.Create.CreateBlogPostHandler 100%
MyBlog.Web.Features.BlogPosts.Delete.ConfirmDeleteDialog 100% 100%
MyBlog.Web.Features.BlogPosts.Delete.DeleteBlogPostCommand 100%
MyBlog.Web.Features.BlogPosts.Delete.DeleteBlogPostCommandValidator 100%
MyBlog.Web.Features.BlogPosts.Delete.DeleteBlogPostHandler 100%
MyBlog.Web.Features.BlogPosts.Edit.Edit 88% 75%
MyBlog.Web.Features.BlogPosts.Edit.EditBlogPostCommand 100%
MyBlog.Web.Features.BlogPosts.Edit.EditBlogPostCommandValidator 100%
MyBlog.Web.Features.BlogPosts.Edit.EditBlogPostHandler 84% 90%
MyBlog.Web.Features.BlogPosts.Edit.GetBlogPostByIdQuery 100%
MyBlog.Web.Features.BlogPosts.List.GetBlogPostsHandler 100% 100%
MyBlog.Web.Features.BlogPosts.List.Index 86.8% 84.6%
MyBlog.Web.Features.UserManagement.AssignRoleCommand 100%
MyBlog.Web.Features.UserManagement.ManageRoles 90.4% 75%
MyBlog.Web.Features.UserManagement.Profile 97.2% 82%
MyBlog.Web.Features.UserManagement.RemoveRoleCommand 100%
MyBlog.Web.Features.UserManagement.RoleDto 100%
MyBlog.Web.Features.UserManagement.UserManagementHandler 0% 0%
MyBlog.Web.Features.UserManagement.UserWithRolesDto 100%
MyBlog.Web.Security.RoleClaimsHelper 91.8% 91.1%
Program 0% 0%

@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Branch Rate Complexity Health
Domain 0% 0% 77
Web 0% 0% 337
ServiceDefaults 0% 0% 18
Domain 0% 0% 77
Web 0% 0% 337
ServiceDefaults 0% 0% 18
AppHost 0% 100% 1
Domain 20% 0% 77
Web 5% 1% 337
ServiceDefaults 0% 0% 18
AppHost 0% 100% 1
Domain 20% 0% 77
Web 5% 1% 337
ServiceDefaults 0% 0% 18
Domain 87% 92% 77
Web 64% 65% 337
ServiceDefaults 0% 0% 18
Domain 87% 92% 77
Web 64% 65% 337
ServiceDefaults 0% 0% 18
Summary 23% (1164 / 4982) 22% (382 / 1776) 2594

@mpaulosky
mpaulosky merged commit cce9a1e into dev Apr 20, 2026
11 checks passed
@mpaulosky
mpaulosky deleted the squad/76-add-project-automation branch April 20, 2026 17:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adds two new GitHub Actions workflows to automatically add newly opened/reopened issues and PRs to the MyBlog GitHub Project (v2) board, addressing the gap where existing automation only moved already-added items.

Changes:

  • Add workflow to auto-add squad-labeled issues to the project and set Status → Backlog.
  • Add workflow to auto-add new PRs to the project and set Status → In Review.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
.github/workflows/add-issues-to-project.yml Adds squad-labeled issues to the project board and sets Status to Backlog via GraphQL mutations.
.github/workflows/add-prs-to-project.yml Adds PRs to the project board and sets Status to In Review via GraphQL mutations.

Comment on lines +24 to +27
uses: actions/github-script@v9
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |

core.info(`✅ Issue #${issue.number} added to project → Backlog`);
} catch (err) {
if (err.message.includes('403')) {
Comment on lines +3 to +6
on:
pull_request:
types: [opened, reopened]

Comment on lines +23 to +25
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Comment on lines +70 to +75
} catch (err) {
if (err.message.includes('403')) {
core.warning(`Access denied (403). If this persists, create a PAT with 'project' scope and store as secrets.GH_PROJECT_TOKEN`);
} else {
core.warning(`Could not add PR to project: ${err.message}`);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

squad Squad triage inbox — Lead will assign to a member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants