mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
test github token (#31931)
* test github token * solving errors * test github token * test * test * fix * fix * fix * fix * fix
This commit is contained in:
parent
31926333e1
commit
c496df7dfe
21
.github/workflows/phpstan_baseline.yml
vendored
21
.github/workflows/phpstan_baseline.yml
vendored
|
|
@ -1,9 +1,9 @@
|
|||
name: 'PHPStan baseline'
|
||||
|
||||
on:
|
||||
# Every Thursday we want to refresh the baseline
|
||||
# Every day we want to refresh the baseline
|
||||
schedule:
|
||||
- cron: '0 6 * * 4'
|
||||
- cron: '0 12 * * *'
|
||||
|
||||
# We want to be able to manually refresh the baseline too
|
||||
workflow_dispatch:
|
||||
|
|
@ -14,18 +14,21 @@ on:
|
|||
required: true
|
||||
type: string
|
||||
# Run PHPStan analyse on pull requests
|
||||
#pull_request:
|
||||
# pull_request:
|
||||
|
||||
permissions: {} # none
|
||||
|
||||
env:
|
||||
PHP_VERSION: '8.2'
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
gh_event: ${{ inputs.gh_event || github.event_name }}
|
||||
CACHE_KEY_PART: ${{ ( inputs.gh_event == 'pull_request' || github.event_name == 'pull_request' ) && format('{0}-{1}', github.base_ref, github.head_ref) || github.ref_name }}
|
||||
jobs:
|
||||
phpstan:
|
||||
runs-on: ubuntu-latest
|
||||
permissions: write-all
|
||||
# contents: write
|
||||
# pull-requests: write
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
|
@ -54,7 +57,7 @@ jobs:
|
|||
phpstan-cache-${{ env.PHP_VERSION }}-
|
||||
- uses: ruudk/phpstan-baseline-refresh-create-pr-action@main
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
github_token: ${{ env.GH_TOKEN }}
|
||||
phpstan_path: phpstan
|
||||
configuration_path: phpstan.neon.dist
|
||||
phpstan_additional_arguments: --memory-limit 7G -a build/phpstan/bootstrap_action.php
|
||||
|
|
@ -63,8 +66,8 @@ jobs:
|
|||
commit_email: dolibarr-bot@users.noreply.github.com
|
||||
commit_message: PHPStan > Update baseline
|
||||
target_branch: develop
|
||||
pr_create: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && 1 || 0 }}
|
||||
# pr_create: 1
|
||||
# pr_create: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && 1 || 0 }}
|
||||
pr_create: 1
|
||||
pr_title: PHPStan > Update baseline
|
||||
pr_reviewer: eldy
|
||||
pr_body: |
|
||||
|
|
|
|||
|
|
@ -97,18 +97,12 @@ $formother = new FormOther($db);
|
|||
|
||||
$langs->loadLangs(array('propal', 'other', 'companies'));
|
||||
|
||||
$picto = null;
|
||||
$dir = null;
|
||||
$cat_type = null;
|
||||
$cat_label = null;
|
||||
$picto = 'propal';
|
||||
$title = $langs->trans("ProposalsStatistics");
|
||||
$dir = $conf->propal->dir_temp;
|
||||
$cat_type = Categorie::TYPE_CUSTOMER;
|
||||
$cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Customer"));
|
||||
|
||||
if ($mode == 'customer') {
|
||||
$picto = 'propal';
|
||||
$title = $langs->trans("ProposalsStatistics");
|
||||
$dir = $conf->propal->dir_temp;
|
||||
$cat_type = Categorie::TYPE_CUSTOMER;
|
||||
$cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Customer"));
|
||||
}
|
||||
if ($mode == 'supplier') {
|
||||
$picto = 'supplier_proposal';
|
||||
$title = $langs->trans("ProposalsStatisticsSuppliers");
|
||||
|
|
|
|||
|
|
@ -304,9 +304,8 @@ $head[$h][1] = $langs->trans("ByMonthYear");
|
|||
$head[$h][2] = 'byyear';
|
||||
$h++;
|
||||
|
||||
if ($mode == 'customer') {
|
||||
$type = 'order_stats';
|
||||
}
|
||||
$type = 'order_stats';
|
||||
|
||||
if ($mode == 'supplier') {
|
||||
$type = 'supplier_order_stats';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,6 +88,8 @@ if (!$sortfield) {
|
|||
$modulepart = 'product_batch';
|
||||
$object = new Productlot($db);
|
||||
if ($id || $ref) {
|
||||
$productid = 0;
|
||||
$batch = '';
|
||||
if ($ref) {
|
||||
$tmp = explode('_', $ref);
|
||||
$productid = $tmp[0];
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user