Skip to content

Add GH workflows to automate adding pull requests and issues to organizational projects and convert the PR validation workflow to reusable#196

Merged
dshevtsov merged 7 commits intoAdobeDocs:mainfrom
commerce-docs:ds_add-project-wf
Nov 6, 2025
Merged

Add GH workflows to automate adding pull requests and issues to organizational projects and convert the PR validation workflow to reusable#196
dshevtsov merged 7 commits intoAdobeDocs:mainfrom
commerce-docs:ds_add-project-wf

Conversation

@dshevtsov
Copy link
Contributor

@dshevtsov dshevtsov commented Nov 5, 2025

This pull request refactors and improves the GitHub Actions workflows for PR validation, project automation, and artifact handling. The main changes include splitting workflows for better modularity, introducing workflow calls with inputs, and automating the addition of PRs and issues to organizational projects. These updates enhance maintainability, flexibility, and automation in the CI/CD process.

Workflow modularization and refactoring

  • Introduced a new workflow pr-validation.yml that calls the validation workflow using workflow_call and passes required inputs (pr_number, base_ref), replacing direct PR triggers. (.github/workflows/pr-validation.yml, .github/workflows/pr-validation.ymlR1-R12)
  • Refactored validate-pr.yml to accept inputs for PR number and base branch, updating all relevant steps to use these inputs instead of GitHub context variables. (.github/workflows/validate-pr.yml, [1] [2] [3] [4] [5]
  • Updated artifact upload logic to handle skipped validations, ensuring lint results are always available for downstream workflows. (.github/workflows/validate-pr.yml, .github/workflows/validate-pr.ymlR161-R169)

Project automation improvements

  • Added new workflows (add-to-project-board.yml and add-to-project_job.yml) to automatically add PRs and issues to their respective organizational project boards using the actions/add-to-project action. (.github/workflows/add-to-project-board.yml, [1]; .github/workflows/add-to-project_job.yml, [2]

Workflow naming and trigger updates

  • Renamed the workflow referenced in pr-comment.yml from "Validate pull request" to "PR validation" to match the new workflow names and triggers. (.github/workflows/pr-comment.yml, .github/workflows/pr-comment.ymlL5-R5)

…ues to organizational projects.

Introduce this in the reusable workflow form to be able to use from from other projects to avoid code duplication.
@dshevtsov dshevtsov self-assigned this Nov 5, 2025
@dshevtsov dshevtsov requested a review from meker12 November 5, 2025 23:48
@dshevtsov dshevtsov changed the title Add GitHub Actions workflows to automate adding pull requests and issues to organizational projects Add GH workflows to automate adding pull requests and issues to organizational projects and convert the PR validation workflow to reusable Nov 6, 2025
@dshevtsov dshevtsov requested a review from Copilot November 6, 2025 19:02
Copy link
Contributor

Copilot AI left a comment

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 refactors the GitHub Actions workflow architecture by converting the validation workflow into a reusable workflow that can be called by other workflows. It also introduces new workflows for adding pull requests and issues to organizational project boards.

  • Converted validate-pr.yml from a direct pull request trigger to a reusable workflow_call workflow with input parameters
  • Created pr-validation.yml as the new entry point workflow that calls the refactored validation workflow
  • Added workflows for automatically adding PRs and issues to organizational project boards

Reviewed Changes

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

Show a summary per file
File Description
.github/workflows/validate-pr.yml Converted to reusable workflow with workflow_call trigger, accepting pr_number and base_ref as inputs; updated all references from github.event.pull_request to use input parameters
.github/workflows/pr-validation.yml New entry point workflow that triggers on pull requests and calls the refactored validation workflow with appropriate parameters
.github/workflows/pr-comment.yml Updated workflow name reference from "Validate pull request" to "PR validation" to match the new entry point workflow
.github/workflows/add-to-project_job.yml New reusable workflow job for adding items to organizational project boards based on event type
.github/workflows/add-to-project-board.yml New workflow that triggers on PR/issue open events and calls the project board workflow

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

dshevtsov and others added 2 commits November 6, 2025 13:11
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
… and update workflow reference to local path
@dshevtsov dshevtsov merged commit d42fc41 into AdobeDocs:main Nov 6, 2025
6 checks passed
@dshevtsov dshevtsov deleted the ds_add-project-wf branch November 6, 2025 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants