Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test-target-update #2670

Closed
wants to merge 80 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
61bb34f
Create commit_lint.yml
NiklasBuchfink Apr 16, 2024
b3993c2
Fink 🐦: update translations
NiklasBuchfink Apr 16, 2024
5498101
chore: update translations with Fink 🐦
NiklasBuchfink Apr 16, 2024
675c192
chore: update translations with Fink 🐦
NiklasBuchfink Apr 16, 2024
b160edf
Merge branch 'opral:main' into main
NiklasBuchfink Apr 22, 2024
ab6af78
chore: remove commit lint
NiklasBuchfink Apr 23, 2024
bd0a6f9
Update GitHub Actions workflow to checkout merge commit for pull requ…
NiklasBuchfink Apr 24, 2024
297af11
Update GitHub Actions workflow to use 'clean' mergeable state for pul…
NiklasBuchfink Apr 24, 2024
7a0c96f
Update GitHub Actions workflow to enable pull request testing on clea…
NiklasBuchfink Apr 24, 2024
78d3585
Update GitHub Actions workflow to log PR hash and checkout merge comm…
NiklasBuchfink Apr 24, 2024
d19189a
Fix directory path in main.ts
NiklasBuchfink Apr 24, 2024
69f98bd
Update GitHub Actions workflow to move checkout paths for target and …
NiklasBuchfink Apr 24, 2024
9ef33ae
Fix directory path in main.ts and move into the target directory in G…
NiklasBuchfink Apr 24, 2024
2d24127
Refactor GitHub Actions workflow to move into the target directory
NiklasBuchfink Apr 24, 2024
beb8043
Refactor GitHub Actions workflow to move into the target directory an…
NiklasBuchfink Apr 24, 2024
aee774c
Refactor GitHub Actions workflow to move into the target directory an…
NiklasBuchfink Apr 24, 2024
3c95755
Refactor GitHub Actions workflow to move into the target directory an…
NiklasBuchfink Apr 24, 2024
6635da7
Refactor GitHub Actions workflow to move into the target directory an…
NiklasBuchfink Apr 24, 2024
84fa9e6
Refactor GitHub Actions workflow to update directory path and move in…
NiklasBuchfink Apr 24, 2024
cf2496d
Update directory path in main.ts for GitHub Actions workflow
NiklasBuchfink Apr 24, 2024
3b497a0
Refactor GitHub Actions workflow to move checkout paths for target an…
NiklasBuchfink Apr 24, 2024
78ecbd1
Refactor GitHub Actions workflow to move into the target directory an…
NiklasBuchfink Apr 24, 2024
61e3a38
Refactor GitHub Actions workflow to move into the target directory an…
NiklasBuchfink Apr 24, 2024
25135d1
Refactor GitHub Actions workflow to move into the target directory an…
NiklasBuchfink Apr 24, 2024
705daa5
Refactor GitHub Actions workflow to fix directory path in main.ts
NiklasBuchfink Apr 24, 2024
8bf8d35
remove logs
NiklasBuchfink Apr 25, 2024
4df4efe
remove unused code
NiklasBuchfink Apr 25, 2024
deab1f0
Log content
NiklasBuchfink Apr 25, 2024
567644a
Update source language tag in project settings
NiklasBuchfink Apr 25, 2024
4cbd474
Fix directory path in main.ts for GitHub Actions workflow
NiklasBuchfink Apr 25, 2024
d960fd9
Workflow should fail if new lint errors or project errors exist
NiklasBuchfink Apr 25, 2024
53e6f50
Fix lint errors and project setup errors in main.ts
NiklasBuchfink Apr 25, 2024
d6ec464
add test log
NiklasBuchfink Apr 25, 2024
bcce2a4
Refactor GitHub Actions workflow to fix directory path in main.ts
NiklasBuchfink Apr 25, 2024
566760a
refactor: change naming from base and head to target and merge
NiklasBuchfink Apr 25, 2024
04cd348
update comment
NiklasBuchfink Apr 25, 2024
1460156
refactor: wording
NiklasBuchfink Apr 25, 2024
ec8cc56
Add logging for reportsTarget, reportsMerge, and LintSummary in main.ts
NiklasBuchfink Apr 25, 2024
34e25fe
run if mergable
NiklasBuchfink Apr 25, 2024
222e1db
Refactor GitHub Actions workflow to wait for merge commit SHA in main…
NiklasBuchfink Apr 25, 2024
9d9ca82
Refactor GitHub Actions workflow to remove unnecessary code in test-g…
NiklasBuchfink Apr 25, 2024
5fa5bf3
Refactor GitHub Actions workflow to wait for PR to become mergeable i…
NiklasBuchfink Apr 25, 2024
adb7589
Refactor GitHub Actions workflow to improve mergeability check in tes…
NiklasBuchfink Apr 25, 2024
2fdc9f5
Refactor GitHub Actions workflow to improve mergeability check in tes…
NiklasBuchfink Apr 25, 2024
014b3ab
Refactor GitHub Actions workflow to use output from Get merge commit …
NiklasBuchfink Apr 25, 2024
fad3e30
Refactor GitHub Actions workflow to use output from Get merge commit …
NiklasBuchfink Apr 25, 2024
4702b26
Refactor GitHub Actions workflow to use output from Get merge commit …
NiklasBuchfink Apr 25, 2024
b6c165a
Refactor GitHub Actions workflow to use output from Get merge commit …
NiklasBuchfink Apr 25, 2024
32af807
Refactor GitHub Actions workflow to use output from Get merge commit …
NiklasBuchfink Apr 25, 2024
56ce05b
Fix merge conflict in main.ts
NiklasBuchfink Apr 26, 2024
8066c69
Fix merge conflict in main.ts
NiklasBuchfink Apr 26, 2024
cea6a67
chore: update translations with Fink 🐦
NiklasBuchfink Apr 26, 2024
1378131
Improve mergeability check in test-github-lint-action.yml
NiklasBuchfink Apr 26, 2024
68d6d63
chore: update translations with Fink 🐦
NiklasBuchfink Apr 26, 2024
0bb3cf1
chore: update translations with Fink 🐦
NiklasBuchfink Apr 26, 2024
e9fec54
chore: update translations with Fink 🐦
NiklasBuchfink Apr 26, 2024
8c0ff36
Improve mergeability check in test-github-lint-action.yml
NiklasBuchfink Apr 26, 2024
547afe5
Improve mergeability check in test-github-lint-action.yml
NiklasBuchfink Apr 26, 2024
2661047
Improve mergeability check in test-github-lint-action.yml
NiklasBuchfink Apr 26, 2024
2e9eed1
Improve mergeability check in test-github-lint-action.yml
NiklasBuchfink Apr 26, 2024
7bdd4c2
Improve mergeability check in test-github-lint-action.yml
NiklasBuchfink Apr 26, 2024
1f3c631
Fix linting issue in main.ts
NiklasBuchfink Apr 26, 2024
d886693
Improve mergeability check in test-github-lint-action.yml
NiklasBuchfink Apr 26, 2024
8e61407
Improve mergeability check in test-github-lint-action.yml
NiklasBuchfink Apr 26, 2024
58ea6a4
Improve mergeability check in test-github-lint-action.yml
NiklasBuchfink Apr 26, 2024
72dac4a
Improve mergeability check in test-github-lint-action.yml
NiklasBuchfink Apr 26, 2024
977fd23
Fix linting issue in main.ts
NiklasBuchfink Apr 26, 2024
2448f49
Fix mergeability check message in main.ts
NiklasBuchfink Apr 26, 2024
d581d7c
Improve mergeability check in test-github-lint-action.yml
NiklasBuchfink Apr 26, 2024
c4fd183
Fix migration error handling in main.ts
NiklasBuchfink Apr 26, 2024
8ca9f95
Fix linting issue and improve mergeability check in test-github-lint-…
NiklasBuchfink Apr 26, 2024
76c9121
Improve mergeability check in test-github-lint-action.yml
NiklasBuchfink Apr 26, 2024
bb306e1
Improve error handling for migration in main.ts
NiklasBuchfink Apr 26, 2024
bd82921
Update README link in error message for workflow file update
NiklasBuchfink Apr 26, 2024
d2f2a35
chore: add space
NiklasBuchfink Apr 26, 2024
bf9bd85
Improve mergeability check in test-github-lint-action.yml
NiklasBuchfink Apr 26, 2024
625c3e5
chore: update translations with Fink 🐦
NiklasBuchfink Apr 26, 2024
8e84e2f
chore: update translations with Fink 🐦
NiklasBuchfink Apr 26, 2024
8c18a73
chore: update translations with Fink 🐦
NiklasBuchfink Apr 26, 2024
8bb6cca
Update GitHub Actions workflow to checkout target branch and merge co…
NiklasBuchfink Apr 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 24 additions & 6 deletions .github/workflows/test-github-lint-action.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Ninja i18n action

on:
pull_request_target:
on: pull_request_target

# explicitly configure permissions, in case your GITHUB_TOKEN workflow permissions are set to read-only in repository settings
permissions:
Expand All @@ -13,9 +12,26 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout
- name: Checkout target branch
id: checkout
uses: actions/checkout@v4
with:
path: target

- name: Get merge commit sha from PR
run: |
merge_commit_sha=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }} \
| jq -r '.merge_commit_sha')
echo "merge_commit_sha=${merge_commit_sha}" >> $GITHUB_OUTPUT
id: get-merge-sha

- name: Checkout merge
uses: actions/checkout@v4
with:
ref: ${{ steps.get-merge-sha.outputs.merge_commit_sha }}
path: merge

- name: Setup Pnpm
uses: pnpm/action-setup@v2
Expand All @@ -27,14 +43,16 @@ jobs:
with:
node-version: 20

- name: Install Dependencies
- name: Install Dependencies in target
run: pnpm install
working-directory: target

- name: Build
- name: Build in target
run: pnpm --filter @inlang/github-lint-action... build
working-directory: target

- name: Test Local Action
id: test-action
uses: ./inlang/source-code/github-lint-action
uses: ./target/inlang/source-code/github-lint-action
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23 changes: 22 additions & 1 deletion inlang/source-code/github-lint-action/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,30 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout
name: GitHub Actions Test
runs-on: ubuntu-latest

steps:
- name: Checkout target branch
id: checkout
uses: actions/checkout@v4
with:
path: target

- name: Get merge commit sha from PR
run: |
merge_commit_sha=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }} \
| jq -r '.merge_commit_sha')
echo "merge_commit_sha=${merge_commit_sha}" >> $GITHUB_OUTPUT
id: get-merge-sha

- name: Checkout merge
uses: actions/checkout@v4
with:
ref: ${{ steps.get-merge-sha.outputs.merge_commit_sha }}
path: merge

- name: Run Ninja i18n
id: ninja-i18n
Expand Down
Loading
Loading