Skip to content

fix(email): don't fail link teardown when FA IdP unlink fails #10931

fix(email): don't fail link teardown when FA IdP unlink fails

fix(email): don't fail link teardown when FA IdP unlink fails #10931

Workflow file for this run

name: Auto Label PRs
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
label:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v47
- name: Label based on paths
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const changedFiles = `${{ steps.changed-files.outputs.all_changed_files }}`.split(' ');
const labels = new Set();
// Define path-to-label mappings
const pathMappings = [
{ path: 'rust/cloud-storage', label: 'cloud-storage' },
{ path: 'js/app', label: 'web-app' },
{ path: 'infra', label: 'infra' }
];
// Check each changed file against path mappings
for (const file of changedFiles) {
for (const mapping of pathMappings) {
if (file.startsWith(mapping.path)) {
labels.add(mapping.label);
}
}
}
// Add labels to the PR
if (labels.size > 0) {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: Array.from(labels)
});
console.log(`Added labels: ${Array.from(labels).join(', ')}`);
} else {
console.log('No matching labels found for changed files');
}