Repository navigation
Open
Labels
Complexity: See issue making labelSee the Issue Making label to understand the issue writing difficulty levelSee the Issue Making label to understand the issue writing difficulty levelEREmergent RequestEmergent RequestFeature: Refactor GHARefactoring GitHub actions to fit latest architectural normsRefactoring GitHub actions to fit latest architectural normsIssue Making: Level 2Make issue(s) from an ER or EpicMake issue(s) from an ER or Epicready for merge teamneeds a senior review either to do some re writing or to approve it for ready for prioritizationneeds a senior review either to do some re writing or to approve it for ready for prioritizationrole: back end/devOpsTasks for back-end developersTasks for back-end developerssize: 0.5ptCan be done in 3 hours or lessCan be done in 3 hours or less
Description
Emergent Requirement - Problem
We need to create one shared module between set-pr-labels and pull-request-trigger workflows since both files have repetitive code.
Issue you discovered this emergent requirement in
Date discovered
9-30-2026
Did you have to do something temporarily
- YES
- NO
Who was involved
What happens if this is not addressed
If this remains unaddressed, then repetitive code will continue to bloat the overall codebase. We want to consolidate artifact handling functions into a single, shared utility file to minimize redundancy, improve consistency, and make it easier to maintain.
Resources
Recommended Action Items
- Make a new issue
- Discuss with team
- Let a Team Lead know
Potential solutions [draft]
We will split the solution into two issues. One issue will create the module and implement the change in the PR trigger workflow. The other issue will implement the change in the set PR labels workflow.
Issue 1
- Complexity: Large
- Relationships: Blocks issue 2
- Size: 0.5pt
Issue 1 Solution
- View the following workflows to understand how artifacts are integrated and how they work:
- PR Trigger workflow
github-actions/trigger-pr/check-linked-issue.js.github/workflows/pull-request-trigger.yml.github/workflows/wr-pull-request-trigger.yml
- Set PR labels workflow
github-actions/trigger-pr/set-pr-labels.js.github/workflows/set-pr-labels.yaml.github/workflows/wr-set-pr-labels.yaml
- PR Trigger workflow
- In
github-actions/trigger-pr/check-linked-issue.jsandgithub-actions/trigger-pr/set-pr-labels.js, note the duplicate functions and understand how they work. These functions will be moved into a shared utility module:_downloadArtifact_listWorkflowRunArtifactsdownloadPRCommentArtifact/downloadLabelsArtifact
- Create a utility file called
download-artifacts.jsingithub-actions/utils- Transform
downloadPRCommentArtifact/downloadLabelsArtifactinto one generic function, calleddownloadAndStoreArtifact - Keep
_downloadArtifactand_listWorkflowRunArtifactsas private functions that will be called bydownloadAndStoreArtifact
- Transform
- Implement the new utility file into the PR trigger workflow
- In
github-actions/trigger-pr/check-linked-issue.js:- Remove the deprecated artifact functions:
_downloadArtifactand_listWorkflowRunArtifacts - Import
downloadAndStoreArtifactby addingconst downloadAndStoreArtifact = require('../utils/download-artifacts');to the top of the file - Refactor
downloadPRCommentArtifactto only calldownloadAndStoreArtifactas a wrapper - Verify the workflow still runs as expected
- Remove the deprecated artifact functions:
Issue 2
- Complexity: Medium
- Relationships: Blocked by issue 1
- Note, once both issues are created mark issue 2 as blocked by issue 1
- Size: 0.25pt
Issue 2 Solution
- View the following files to understand how the workflow executes and what needs to be refactored:
github-actions/trigger-pr/set-pr-labels.jsgithub-actions/utils/download-artifacts.github/workflows/set-pr-labels.yaml.github/workflows/wr-set-pr-labels.yaml
- Implement the download artifacts utility into the Set PR labels workflow
- In
github-actions/trigger-pr/set-pr-labels.js:- Remove the deprecated artifact functions:
_downloadArtifactand_listWorkflowRunArtifacts - Import
downloadAndStoreArtifactby addingconst downloadAndStoreArtifact = require('../utils/download-artifacts');to the top of the file - Refactor
downloadLabelsArtifactto only calldownloadAndStoreArtifactas a wrapper - Verify the workflow still runs as expected
- Remove the deprecated artifact functions:
Resources/Instructions
- Refer to The "Hack for LA's GitHub Actions" Wiki guide needs additional explanation #6537 (comment), especially Tips 6, 7, and 8, if you have not already created you personal environment for testing.
- How to Test GitHub Actions
- Additional Notes for GitHub Actions
- Workflow artifacts
- Using data from a triggering workflow
Metadata
Metadata
Assignees
Labels
Complexity: See issue making labelSee the Issue Making label to understand the issue writing difficulty levelSee the Issue Making label to understand the issue writing difficulty levelEREmergent RequestEmergent RequestFeature: Refactor GHARefactoring GitHub actions to fit latest architectural normsRefactoring GitHub actions to fit latest architectural normsIssue Making: Level 2Make issue(s) from an ER or EpicMake issue(s) from an ER or Epicready for merge teamneeds a senior review either to do some re writing or to approve it for ready for prioritizationneeds a senior review either to do some re writing or to approve it for ready for prioritizationrole: back end/devOpsTasks for back-end developersTasks for back-end developerssize: 0.5ptCan be done in 3 hours or lessCan be done in 3 hours or less
Type
Projects
- StatusShow more project fieldsNew Issue Approval
Activity
pull-request-trigger.ymlandwr-pull-request-trigger.yml#8590