Check FL ticket in PR name after merge (#2076)
* Add base * Add base again * Test reporting * Fix reporting * Fix secrets * Fix arguments in report * Remove depricated actions * Disable reporting on PR Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
2
.github/workflows/amap_analyse.yml
vendored
2
.github/workflows/amap_analyse.yml
vendored
@@ -39,7 +39,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: 'Checkout code'
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
|
13
.github/workflows/build.yml
vendored
13
.github/workflows/build.yml
vendored
@@ -24,7 +24,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: 'Checkout code'
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
@@ -35,6 +35,7 @@ jobs:
|
||||
mkdir artifacts
|
||||
|
||||
- name: 'Get commit details'
|
||||
id: names
|
||||
run: |
|
||||
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
|
||||
TYPE="pull"
|
||||
@@ -45,14 +46,6 @@ jobs:
|
||||
fi
|
||||
python3 scripts/get_env.py "--event_file=${{ github.event_path }}" "--type=$TYPE"
|
||||
|
||||
- name: 'Generate suffixes for comment'
|
||||
id: names
|
||||
run: |
|
||||
echo "::set-output name=branch_name::${BRANCH_NAME}"
|
||||
echo "::set-output name=commit_sha::${COMMIT_SHA}"
|
||||
echo "::set-output name=default_target::${DEFAULT_TARGET}"
|
||||
echo "::set-output name=suffix::${SUFFIX}"
|
||||
|
||||
- name: 'Bundle scripts'
|
||||
if: ${{ !github.event.pull_request.head.repo.fork }}
|
||||
run: |
|
||||
@@ -143,7 +136,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: 'Checkout code'
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: true
|
||||
|
6
.github/workflows/check_submodules.yml
vendored
6
.github/workflows/check_submodules.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: 'Checkout code'
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
@@ -36,12 +36,12 @@ jobs:
|
||||
BRANCHES=$(git branch -r --contains "$SUBMODULE_HASH");
|
||||
COMMITS_IN_BRANCH="$(git rev-list --count dev)";
|
||||
if [ $COMMITS_IN_BRANCH -lt $SUB_COMMITS_MIN ]; then
|
||||
echo "::set-output name=fails::error";
|
||||
echo "name=fails::error" >> $GITHUB_OUTPUT
|
||||
echo "::error::Error: Too low commits in $SUB_BRANCH of submodule $SUB_PATH: $COMMITS_IN_BRANCH(expected $SUB_COMMITS_MIN+)";
|
||||
exit 1;
|
||||
fi
|
||||
if ! grep -q "/$SUB_BRANCH" <<< "$BRANCHES"; then
|
||||
echo "::set-output name=fails::error";
|
||||
echo "name=fails::error" >> $GITHUB_OUTPUT
|
||||
echo "::error::Error: Submodule $SUB_PATH is not on branch $SUB_BRANCH";
|
||||
exit 1;
|
||||
fi
|
||||
|
2
.github/workflows/lint_c.yml
vendored
2
.github/workflows/lint_c.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: 'Checkout code'
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
|
2
.github/workflows/lint_python.yml
vendored
2
.github/workflows/lint_python.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: 'Checkout code'
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
|
41
.github/workflows/merge_report.yml
vendored
Normal file
41
.github/workflows/merge_report.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
name: 'Check FL ticket in PR name'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
jobs:
|
||||
merge_report:
|
||||
runs-on: [self-hosted,FlipperZeroShell]
|
||||
steps:
|
||||
- name: 'Decontaminate previous build leftovers'
|
||||
run: |
|
||||
if [ -d .git ]; then
|
||||
git submodule status || git checkout "$(git rev-list --max-parents=0 HEAD | tail -n 1)"
|
||||
fi
|
||||
|
||||
- name: 'Checkout code'
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
|
||||
- name: 'Get commit details'
|
||||
run: |
|
||||
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
|
||||
TYPE="pull"
|
||||
elif [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
|
||||
TYPE="tag"
|
||||
else
|
||||
TYPE="other"
|
||||
fi
|
||||
python3 scripts/get_env.py "--event_file=${{ github.event_path }}" "--type=$TYPE"
|
||||
|
||||
- name: 'Check ticket and report'
|
||||
run: |
|
||||
FBT_TOOLCHAIN_PATH=/runner/_work source scripts/toolchain/fbtenv.sh
|
||||
python3 -m pip install slack_sdk
|
||||
python3 scripts/merge_report_qa.py \
|
||||
${{ secrets.QA_REPORT_SLACK_TOKEN }} \
|
||||
${{ secrets.QA_REPORT_SLACK_CHANNEL }}
|
||||
|
12
.github/workflows/pvs_studio.yml
vendored
12
.github/workflows/pvs_studio.yml
vendored
@@ -25,12 +25,13 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: 'Checkout code'
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
|
||||
- name: 'Get commit details'
|
||||
id: names
|
||||
run: |
|
||||
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
|
||||
TYPE="pull"
|
||||
@@ -41,15 +42,6 @@ jobs:
|
||||
fi
|
||||
python3 scripts/get_env.py "--event_file=${{ github.event_path }}" "--type=$TYPE"
|
||||
|
||||
- name: 'Generate suffixes for comment'
|
||||
if: ${{ !github.event.pull_request.head.repo.fork && github.event.pull_request }}
|
||||
id: names
|
||||
run: |
|
||||
echo "::set-output name=branch_name::${BRANCH_NAME}"
|
||||
echo "::set-output name=commit_sha::${COMMIT_SHA}"
|
||||
echo "::set-output name=default_target::${DEFAULT_TARGET}"
|
||||
echo "::set-output name=suffix::${SUFFIX}"
|
||||
|
||||
- name: 'Make reports directory'
|
||||
run: |
|
||||
rm -rf reports/
|
||||
|
2
.github/workflows/unit_tests.yml
vendored
2
.github/workflows/unit_tests.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
runs-on: [self-hosted, FlipperZeroTest]
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
|
Reference in New Issue
Block a user