Skip to content

Commit

Permalink
Adding retrigger support on PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
Crebs committed Jan 21, 2025
1 parent ca119e9 commit e588c71
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: Pull Request

on:
# Dangerious without Member Check setep!
# Dangerious without Member Check setep!
pull_request_target:
branches:
- dev
workflow_dispatch: "true"

jobs:
static-analysis:
Expand All @@ -21,16 +22,17 @@ jobs:
# We need a sufficient depth or Danger will occasionally run into issues checking which files were modified.
fetch-depth: 100
# This is dangerous without the member check
ref: ${{ github.event.pull_request.head.sha }}
ref: ${{ github.event.pull_request.head.sha }}
- name: Install Dependencies
run: |
npm install [email protected]
./install.sh
- name: Run Static Analysis
# It would be nice to use xcbeaufity here but all the warnings and errors get annotated onto the PR, including
# files not mofified in the PR which is annoying.
run: xcodebuild analyze -workspace SalesforceMobileSDK.xcworkspace -scheme MobileSync -sdk 'iphonesimulator' \
CLANG_ANALYZER_OUTPUT=plist-html CLANG_ANALYZER_OUTPUT_DIR=./clangReport RUN_CLANG_STATIC_ANALYZER=YES
# It would be nice to use xcbeaufity here but all the warnings and errors get annotated onto the PR, including
# files not mofified in the PR which is annoying.
run:
xcodebuild analyze -workspace SalesforceMobileSDK.xcworkspace -scheme MobileSync -sdk 'iphonesimulator' \
CLANG_ANALYZER_OUTPUT=plist-html CLANG_ANALYZER_OUTPUT_DIR=./clangReport RUN_CLANG_STATIC_ANALYZER=YES
- name: Report Static Analysis
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -55,7 +57,7 @@ jobs:
# We need a sufficient depth or Danger will occasionally run into issues checking which files were modified.
fetch-depth: 100
# This is dangerous without the member check
ref: ${{ github.event.pull_request.head.sha }}
ref: ${{ github.event.pull_request.head.sha }}
- name: Determine Tests to Run
id: test-orchestrator
env:
Expand All @@ -74,4 +76,4 @@ jobs:
uses: ./.github/workflows/reusable-workflow.yaml
with:
lib: ${{ matrix.lib }}
secrets: inherit
secrets: inherit

0 comments on commit e588c71

Please sign in to comment.