Skip to content

Commit

Permalink
Do not attempt to comment on PRs when on forks (facebook#36316)
Browse files Browse the repository at this point in the history
Summary:
I'm gating this workflow to run only upstream as I'm receiving notifications that it fails on my fork. We don't want to run this workflow on forks at all hence we can add a `if:` there.

## Changelog

[INTERNAL] - Do not attempt to comment on PRs when on forks

Pull Request resolved: facebook#36316

Test Plan: If Github Actions UI is green, we're good to go

Reviewed By: cipolleschi

Differential Revision: D43657315

Pulled By: cortinico

fbshipit-source-id: 8fb260d142a43375bd9a3b10eac235550a6aecb0
  • Loading branch information
cortinico authored and facebook-github-bot committed Feb 28, 2023
1 parent 0f56cee commit d56bd11
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/apply-version-label-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
issues: write # for react-native-community/actions-apply-version-label to label issues
runs-on: ubuntu-latest
continue-on-error: true
if: github.repository == 'facebook/react-native'

steps:
- uses: react-native-community/[email protected]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/close_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ permissions:
jobs:
comment-and-label:
runs-on: ubuntu-latest
if: github.repository == 'facebook/react-native'
steps:
- uses: actions/github-script@v6
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/danger_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ permissions:
jobs:
danger:
runs-on: ubuntu-latest
if: github.repository == 'facebook/react-native'
steps:
- uses: actions/checkout@v3
- name: Run Yarn Install on Root
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/needs-attention.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
issues: write # for hramos/needs-attention to label issues
name: Apply Needs Attention Label
runs-on: ubuntu-latest
if: github.repository == 'facebook/react-native'
steps:
- uses: actions/checkout@v3
- name: Apply Needs Attention Label
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/on-issue-labeled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
# then invokes actOnLabel to react to any added labels
triage-issue:
runs-on: ubuntu-latest
if: "${{ contains(github.event.label.name, 'Needs: Triage :mag:') }}"
if: "${{ github.repository == 'facebook/react-native' && contains(github.event.label.name, 'Needs: Triage :mag:') }}"
steps:
- uses: actions/checkout@v3
- uses: actions/github-script@v6
Expand All @@ -36,6 +36,7 @@ jobs:
# Reacts to the label that triggered this workflow (added manually or via other workflows)
act-on-label:
runs-on: ubuntu-latest
if: github.repository == 'facebook/react-native'
steps:
- uses: actions/checkout@v3
- uses: actions/github-script@v6
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/stale-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
jobs:
stale:
runs-on: ubuntu-latest
if: github.repository == 'facebook/react-native'
permissions:
issues: write
pull-requests: write
Expand All @@ -19,6 +20,7 @@ jobs:
close-pr-message: 'This PR was closed because it has been stalled for 7 days with no activity.'
stale-needs-author-feedback:
runs-on: ubuntu-latest
if: github.repository == 'facebook/react-native'
permissions:
issues: write
pull-requests: write
Expand Down

0 comments on commit d56bd11

Please sign in to comment.