nuttx/.github
Lup Yuen Lee 4e9ab20b6a github/workflow: Reimplement PR Labeling without pull_request_target
ASF Infrastructure Team has flagged a GitHub Actions workflow policy violation, inside our PR Labeling. We must remove pull_request_target before 6 Apr 2026, or ASF Infra will turn off all GitHub Builds: https://github.com/apache/nuttx/issues/18359

This PR reimplements the PR Labeling with two triggers: pull_request and workflow_run. We no longer need pull_request_target, which is an unsafe trigger and may introduce security vulnerabilities.

GitHub Actions `codelytv/pr-size-labeler` and `actions/labeler` don't work with the pull_request trigger, so we replaced them with our own code. The implementation is explained here: https://github.com/apache/nuttx/issues/18359

### Modified Files

`.github/workflows/labeler.yml`: Changed the (read-write) pull_request_target trigger to (read-only) pull_request trigger. Compute the Size Label (e.g. Size: XS) and Arch Labels (e.g. Arch: arm). Save the PR Labels into a PR Artifact.

`.github/labeler.yml`: Added comment to clarify that NuttX PR Labeler only supports a subset of the `actions/labeler` syntax: `changed-files` and `any-glob-to-any-file`

### New Files

`.github/workflows/pr_labeler.yml`: Contains the workflow_run trigger, which is executed upon completion of the pull_request trigger. Download the PR Labels from the PR Artifact. Write the PR Labels into the PR.

Signed-off-by: Lup Yuen Lee <luppy@appkaki.com>
2026-02-17 09:53:41 +01:00
..
actions free disk space action added to fix docker image build issue 2023-12-08 14:42:17 +01:00
ISSUE_TEMPLATE .github/ISSUE_TEMPLATE: Add host_info command section into bug report template 2025-01-21 09:11:17 +08:00
linters .github/linters: Ignore E704 warning 2024-11-17 08:31:08 -03:00
workflows github/workflow: Reimplement PR Labeling without pull_request_target 2026-02-17 09:53:41 +01:00
CODEOWNERS sched: Remove legacy sched_resumescheduler.c 2026-01-27 18:21:12 +08:00
dependabot.yml chore: Included githubactions in the dependabot config 2022-06-19 11:43:10 +08:00
gcc.json .github/gcc.json: Fix space/tab inconsistency 2022-04-12 13:43:06 +08:00
labeler.yml github/workflow: Reimplement PR Labeling without pull_request_target 2026-02-17 09:53:41 +01:00
nxstyle.json Add problem matching for gcc and nxstyle to github actions 2020-06-11 00:52:55 +08:00
PULL_REQUEST_TEMPLATE.md docs/pr-template: Update the testing section of the PR template 2025-09-08 08:09:57 -03:00
SECURITY.md docs: Include released 10.x and 11.x versions under security policy. 2022-11-21 10:06:31 +01:00