From 2c2faf913568b1cb87d5c621e68de8628d0a7cc4 Mon Sep 17 00:00:00 2001 From: Philip Niedertscheider Date: Sat, 6 Jul 2024 10:00:41 +0200 Subject: [PATCH 1/7] fix: removed iOS specific code from experiment example factory --- Shared/Examples/ExperimentFactory.swift | 28 ++----------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/Shared/Examples/ExperimentFactory.swift b/Shared/Examples/ExperimentFactory.swift index 96c4c9b8..4537b261 100644 --- a/Shared/Examples/ExperimentFactory.swift +++ b/Shared/Examples/ExperimentFactory.swift @@ -8,37 +8,13 @@ import Foundation import TPPDF -import UIKit class ExperimentFactory: ExampleFactory { func generateDocument() -> [PDFDocument] { let document = PDFDocument(format: .b5) - document.add(.contentCenter, text: "Some Test Name") - let images = [ - "file:///Users/Philip/Downloads/test_images/0000.jpg", - "file:///Users/Philip/Downloads/test_images/0001.jpg", - "file:///Users/Philip/Downloads/test_images/0002.jpg", - "file:///Users/Philip/Downloads/test_images/0003.jpg", - "file:///Users/Philip/Downloads/test_images/0004.jpg", - "file:///Users/Philip/Downloads/test_images/0005.jpg", - "file:///Users/Philip/Downloads/test_images/0006.jpg", - "file:///Users/Philip/Downloads/test_images/0007.jpg", - "file:///Users/Philip/Downloads/test_images/0008.jpg", - "file:///Users/Philip/Downloads/test_images/0009.jpg", - ] - images[0.. PDFImage? in - guard let imageURL = URL(string: imageFileUrl), - let image = UIImage(contentsOfFile: imageURL.path(percentEncoded: false)), - image.size != .zero - else { - return nil - } - let pdfImage = PDFImage(image: image) - return pdfImage - }).forEach({ pdfImage in - document.add(image: pdfImage) - }) + // Create custom documents to experiment with the framework + return [document] } } From 39fb5f1e2441ca18100800f7108664a95ebe65d6 Mon Sep 17 00:00:00 2001 From: Philip Niedertscheider Date: Sat, 6 Jul 2024 10:02:55 +0200 Subject: [PATCH 2/7] WIP --- .github/workflows/danger.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml index b4f23fbb..90089206 100644 --- a/.github/workflows/danger.yml +++ b/.github/workflows/danger.yml @@ -17,4 +17,4 @@ jobs: with: args: --failOnErrors --no-publish-check env: - GITHUB_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 9eb3182012ce10782adad58b1ea116741a1eccb3 Mon Sep 17 00:00:00 2001 From: Philip Niedertscheider Date: Sat, 6 Jul 2024 10:06:13 +0200 Subject: [PATCH 3/7] WIP --- .github/workflows/danger.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml index 90089206..35f7b514 100644 --- a/.github/workflows/danger.yml +++ b/.github/workflows/danger.yml @@ -9,6 +9,8 @@ jobs: job-danger: name: Review, Lint, Verify runs-on: ubuntu-latest + permissions: + issues: write steps: - uses: actions/checkout@v4 From 5a098146df3066301c231a54fd5f462d1c4cedd7 Mon Sep 17 00:00:00 2001 From: Philip Niedertscheider Date: Sat, 6 Jul 2024 10:09:38 +0200 Subject: [PATCH 4/7] WIP --- .github/workflows/danger.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml index 35f7b514..8c0bc1ad 100644 --- a/.github/workflows/danger.yml +++ b/.github/workflows/danger.yml @@ -11,6 +11,7 @@ jobs: runs-on: ubuntu-latest permissions: issues: write + pull-requests: write steps: - uses: actions/checkout@v4 From 2ca21188b7ae46c2f387c7a6dfaa81accbc7e0ed Mon Sep 17 00:00:00 2001 From: Philip Niedertscheider Date: Sat, 6 Jul 2024 10:25:42 +0200 Subject: [PATCH 5/7] WIP --- .github/workflows/danger.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml index 8c0bc1ad..339ff2d1 100644 --- a/.github/workflows/danger.yml +++ b/.github/workflows/danger.yml @@ -10,8 +10,20 @@ jobs: name: Review, Lint, Verify runs-on: ubuntu-latest permissions: + actions: read + attestations: read + checks: read + contents: read + deployments: read + discussions: read + id-token: write issues: write + packages: read + pages: read pull-requests: write + repository-projects: read + security-events: read + statuses: read steps: - uses: actions/checkout@v4 From 35508eba602087fb7d161acfa93ed80181c7d198 Mon Sep 17 00:00:00 2001 From: Philip Niedertscheider Date: Mon, 8 Jul 2024 11:09:19 +0200 Subject: [PATCH 6/7] Update danger.yml --- .github/workflows/danger.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml index 339ff2d1..63e6ddfd 100644 --- a/.github/workflows/danger.yml +++ b/.github/workflows/danger.yml @@ -32,4 +32,4 @@ jobs: with: args: --failOnErrors --no-publish-check env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN || secrets.GITHUB_TOKEN }} From e5b7a266e29f54d094eebc59186cae03a6b1d4f9 Mon Sep 17 00:00:00 2001 From: Philip Niedertscheider Date: Mon, 8 Jul 2024 11:10:16 +0200 Subject: [PATCH 7/7] Update danger.yml --- .github/workflows/danger.yml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml index 63e6ddfd..06c63576 100644 --- a/.github/workflows/danger.yml +++ b/.github/workflows/danger.yml @@ -9,21 +9,6 @@ jobs: job-danger: name: Review, Lint, Verify runs-on: ubuntu-latest - permissions: - actions: read - attestations: read - checks: read - contents: read - deployments: read - discussions: read - id-token: write - issues: write - packages: read - pages: read - pull-requests: write - repository-projects: read - security-events: read - statuses: read steps: - uses: actions/checkout@v4