Skip to content

Update GetInventoryContainer sig in InventoryManager.cs #248

Update GetInventoryContainer sig in InventoryManager.cs

Update GetInventoryContainer sig in InventoryManager.cs #248

name: PR Check Patch Day / Prep
on:
pull_request_target:
types:
- opened
- synchronize
- reopened
paths:
- 'FFXIVClientStructs/**/*.cs'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Install dependencies
run: dotnet restore
- name: Run CExporter
working-directory: ./
run: dotnet run --project CExporter/CExporter.csproj -c Release
- name: Check error txt file for content
id: check_error
run: |
if [ -s ./ida/errors.txt ]; then
echo "error=true" >> $GITHUB_OUTPUT
else
echo "error=false" >> $GITHUB_OUTPUT
fi
- name: Upload error txt to comment
if: steps.check_error.outputs.error == 'true'
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const content = fs.readFileSync('./ida/errors.txt', 'utf8');
const comments = (await github.rest.issues.listComments({
issue_number: context.payload.pull_request.number,
owner: context.repo.owner,
repo: context.repo.repo
})).data
const comment = comments.filter(comment => comment.user.login === 'github-actions[bot]');
if (comment.length > 0) {
comment.forEach(comment => {
github.rest.issues.deleteComment({
comment_id: comment.id,
owner: context.repo.owner,
repo: context.repo.repo
});
});
}
github.rest.issues.createComment({
issue_number: context.payload.pull_request.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: content
});
github.rest.issues.addLabels({
issue_number: context.payload.pull_request.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ["requested changes"]
})
- name: Exit with error
if: steps.check_error.outputs.error == 'true'
run: exit 1
- name: Cleanup issue
if: steps.check_error.outputs.error == 'false'
uses: actions/github-script@v7
with:
script: |
const comments = (await github.rest.issues.listComments({
issue_number: context.payload.pull_request.number,
owner: context.repo.owner,
repo: context.repo.repo
})).data
const comment = comments.filter(comment => comment.user.login === 'github-actions[bot]');
if (comment.length > 0) {
comment.forEach(comment => {
github.rest.issues.deleteComment({
comment_id: comment.id,
owner: context.repo.owner,
repo: context.repo.repo
});
});
}
const labels = (await github.rest.issues.listLabelsOnIssue({
issue_number: context.payload.pull_request.number,
owner: context.repo.owner,
repo: context.repo.repo
})).data
const label = labels.find(label => label.name === 'requested changes');
if (label) {
github.rest.issues.removeLabel({
issue_number: context.payload.pull_request.number,
name: 'requested changes',
owner: context.repo.owner,
repo: context.repo.repo
});
}
- uses: actions/upload-artifact@v4
with:
name: structs.yml
path: ./ida/ffxiv_structs.yml
retention-days: 7