Skip to content

[Chore] Rationalize GHA as part of 'how we docs' exercise #23761

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ import * as codeOwnersUtils from "codeowners-utils";

console.log("Assignees added (if present)");

// Add labels for future reporting
// Add "product" labels

const labelPrefix = "product:";
const newLabels = new Set<string>();
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"version": "0.0.0",
"name": "assign-issue",
"name": "issue-label-assign",
"scripts": {
"build": "esbuild index.ts --bundle --format=cjs --platform=node --minify --outfile=index.js"
},
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/issue-label-assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Issue - Label and assign

# **What it does**: Labels Issues with associated products. Updates assignees to match our CODEOWNERS file.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Re-creates issue.yml, but with clearer naming

# **Why we have it**: Easier scanning of repo PRs && backend reporting on our team's work.
# **Who does it impact**: PCX team

on:
issues:
types: [opened]

jobs:
compile:
name: Label and assign
permissions:
issues: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/issue-label-assign
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17 changes: 0 additions & 17 deletions .github/workflows/issue.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
name: Label PRs
name: PR - Label and assign

# **What it does**: Uses the files to label PRs with updated doc areas && size estimates.
# **What it does**: Labels PRs with size and associated products. Updates assignees to match our CODEOWNERS file.
# **Why we have it**: Easier scanning of repo PRs && backend reporting on our team's work.
# **Who does it impact**: PCX team

on: [pull_request_target]
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target
on:
pull_request_target:
types: [opened, reopened]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down Expand Up @@ -36,3 +39,16 @@ jobs:
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true

assign:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This pulls in from the pr.yml. These are triggered on the same event, so we should have them all running in the same action.

name: Update assignees
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/assign-pr
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true
23 changes: 0 additions & 23 deletions .github/workflows/pr.yml

This file was deleted.