Files
Nicola Corti 7a2963f2b5 Report formatting fixes on pull requests (#58464)
Summary:
Pull Request resolved: https://github.com/react/react-native/pull/58464

Add a GitHub Actions formatting check that runs the repository-wide formatter check and posts line-level suggested fixes through the GitHub API for files that need reformatting.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D119487616

fbshipit-source-id: e8534888824b5e56fa949aef0ab1e64fe73c8d96
2026-09-15 13:20:33 -07:00

39 lines
1.0 KiB
YAML

name: Format Report
on:
workflow_run:
workflows: [Format]
types: [completed]
permissions:
actions: read
contents: read
issues: write
pull-requests: write
jobs:
report:
runs-on: ubuntu-latest
if: >-
github.repository == 'react/react-native' &&
github.event.workflow_run.event == 'pull_request'
steps:
- name: Check out trusted reporter
uses: actions/checkout@v6
- name: Download formatting report
id: download
continue-on-error: true
uses: actions/download-artifact@v7
with:
name: format-results
path: .format-results
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ github.token }}
- name: Comment on formatting failures
if: steps.download.outcome == 'success'
uses: actions/github-script@v8
with:
script: |
const reportFormattingErrors = require('./.github/workflow-scripts/reportFormattingErrors');
await reportFormattingErrors({github, context, core});