Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Maleclypse committed Mar 17, 2022
2 parents 6cebaf2 + 03d89b0 commit b22a013
Show file tree
Hide file tree
Showing 1,251 changed files with 258,705 additions and 275,233 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Feature Request ✨
description: Suggest an idea or this project
description: Suggest an idea for this project

body:
- type: markdown
Expand Down
24 changes: 19 additions & 5 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,37 @@
"C++":
"[C++]":
- "**/*.cpp"
- "**/*.h"

"Json":
"[JSON]":
- "**/*.json"

"Python":
"[Python]":
- "**/*.py"

"Documentation":
"<Documentation>":
- "**/*.md"
- doc/**/*

"Code: Tooling":
- tools/**/*

"Code: Test":
"Code: Tests":
- tests/**/*

"NPC / Factions":
- data/json/npcs/**/*

"Bionics":
- "data/json/bionics.json"

"Player Faction Base / Camp":
- "src/basecamp.(cpp|h)"
- data/json/mapgen/basecamps/**/*

"Items: Ammo / Guns":
- data/json/items/gun/**/*
- data/json/items/ammo/**/*

"SDL: Tiles / Sound":
- gfx/**/*
- sound/**/*
Expand Down
61 changes: 61 additions & 0 deletions .github/workflows/detect-translation-file-changes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Detect translation file changes


on:
pull_request:
branches:
- master
paths:
- lang/po/*.po
- lang/po/*.pot


jobs:
detect-translation-file-changes:
runs-on: ubuntu-latest
steps:
- name: "Detect translation file changes"
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const skip_phrase = 'Translation file changes are intended';
if (context.payload.pull_request.body.includes(skip_phrase)) {
console.log('PR body contains skip phrase. Exiting.');
return;
}
core.setFailed('Translation file changes detected, but a skip phrase is not found in the PR body.')
console.log(
'Fetching comments of pull request %d of repository %s/%s.',
context.issue.number, context.repo.owner, context.repo.repo
);
const comments = await github.paginate(
github.rest.issues.listComments,
{
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number
}
);
const body = 'It appears you modified a `.po` or `.pot` file. '
+ 'These translation files are automatically generated, '
+ 'pushed to, and pulled from Transifex, and should not be '
+ 'modified otherwise. If these changes are intended, please '
+ 'add `' + skip_phrase + '` to the '
+ 'PR body.';
const bot_comments = comments.filter(
comment => comment.user.type === 'Bot'
&& comment.user.login === 'github-actions[bot]'
&& comment.body === body
);
if (bot_comments.length > 0) {
console.log('Comment already exists. Exiting.');
return;
}
console.log('Posting comment.');
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: body
});
3 changes: 2 additions & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ jobs:
- uses: actions/labeler@v3
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: true
# I don't want no bot removing stuff for me
sync-labels: ""
2 changes: 1 addition & 1 deletion .github/workflows/msvc-full-features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
with:
# run-vcpkg tries to hash vcpkg.json but complans if it finds more than one.
# That said, we also have our custom vcpkg_triplets to hash, so we keep everything the same.
appendedCacheKey: ${{ hashFiles( 'msvc-full-features/vcpkg.json', '.github/vcpkg_triplets/**' ) }}-x64
appendedCacheKey: ${{ hashFiles( 'msvc-full-features/vcpkg.json', '.github/vcpkg_triplets/**' ) }}-x64-1
vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg'
# We have to use at least this version of vcpkg to include fixes for yasm-tool's
# availability only as an x86 host tool. Keep it in sync with the builtin-baseline
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/object_creator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
with:
# run-vcpkg tries to hash vcpkg.json but complans if it finds more than one.
# That said, we also have our custom vcpkg_triplets to hash, so we keep everything the same.
appendedCacheKey: ${{ hashFiles( '$msvc-full-features/vcpkg.json', 'msvc-object_creator/vcpkg.json', '.github/vcpkg_triplets/**' ) }}-x64
appendedCacheKey: ${{ hashFiles( 'msvc-full-features/vcpkg.json', 'msvc-object_creator/vcpkg.json', '.github/vcpkg_triplets/**' ) }}-x64-1
vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg'
# We have to use at least this version of vcpkg to include fixes for yasm-tool's
# availability only as an x86 host tool. Keep it in sync with the builtin-baseline
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ jobs:
delete-branch: true
base: master
title: Routine i18n updates on ${{ steps.current-date.outputs.formattedTime }}
body: "#### Summary\nNone"
body: "#### Summary\nNone\n\n#### Additional context\n`Translation file changes are intended`"
labels: Translation
6 changes: 2 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ jobs:
uses: lukka/run-vcpkg@v10
id: runvcpkg
with:
appendedCacheKey: ${{ hashFiles( 'msvc-full-features/vcpkg.json', '.github/vcpkg_triplets/**' ) }}-${{ matrix.arch }}-2
appendedCacheKey: ${{ hashFiles( 'msvc-full-features/vcpkg.json', '.github/vcpkg_triplets/**' ) }}-${{ matrix.arch }}-1
vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg'
# We have to use at least this version of vcpkg to include fixes for yasm-tool's
# availability only as an x86 host tool. Keep it in sync with the builtin-baseline
Expand All @@ -179,9 +179,7 @@ jobs:
- name: Install dependencies (windows mxe)
if: matrix.mxe != 'none'
run: |
sudo apt install astyle autoconf automake autopoint bash bison bzip2 cmake flex gettext git g++ gperf intltool \
libffi-dev libgdk-pixbuf2.0-dev libtool libltdl-dev libssl-dev libxml-parser-perl lzip make mingw-w64 openssl \
p7zip-full patch perl pkg-config python ruby scons sed unzip wget xz-utils g++-multilib libc6-dev-i386 libtool-bin
sudo apt install gettext
- name: Install MXE
if: matrix.mxe != 'none'
run: |
Expand Down
Loading

0 comments on commit b22a013

Please sign in to comment.