Skip to content

Pull Request Labeler #36

Pull Request Labeler

Pull Request Labeler #36

Workflow file for this run

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
name: "Pull Request Labeler"
on:
workflow_run:
workflows: [PR-Open-Trigger, PR-Edit-Trigger]
types: [requested]
concurrency:
group: ${{ github.event.workflow_run.name }}-${{ github.event.workflow_run.head_repository.full_name }}-${{ github.event.workflow_run.head_branch }}
cancel-in-progress: true
permissions:
checks: write
contents: read
pull-requests: write
jobs:
label:
if: github.repository == 'apache/flink-agents'
runs-on: ubuntu-latest
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v6
with:
persist-credentials: false
- name: "Label pull request"
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const script = require('./.github/workflows/pr_labeler.js');
const workflowRunId = ${{ github.event.workflow_run.id }};
const triggerWorkflow = '${{ github.event.workflow_run.name }}';
await script({ github, context, core, workflowRunId, triggerWorkflow });