Skip to content

Commit

Permalink
changed comparison from main to RC branch
Browse files Browse the repository at this point in the history
  • Loading branch information
fziegner authored Nov 30, 2023
1 parent 1083ada commit 383e9f7
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,31 @@ jobs:
echo "SHA=$(git rev-parse "$GITHUB_SHA")" >> $GITHUB_OUTPUT
id: git

- name: Switch to main branch
- name: Get RC branch name
run: |
git fetch --all
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "RC_BRANCH<<$EOF" >> $GITHUB_OUTPUT
echo "$(git branch -r --list 'origin/RC*' --sort=-committerdate | head -n 1 | sed 's/origin\///' | xargs)" >> $GITHUB_OUTPUT
echo "$EOF" >> $GITHUB_OUTPUT
id: branch_name

- name: Checkout RC branch
uses: actions/checkout@v3
with:
ref: main
ref: ${{ steps.branch_name.outputs.RC_BRANCH }}

- name: Install tobac and pylint
run: |
pip install .
pip install --upgrade pylint
- name: Get pylint score of main branch
- name: Get pylint score of RC branch
run: |
pylint tobac --disable=C --exit-zero
id: main_score

- name: Switch to PR branch
- name: Checkout PR branch
uses: actions/checkout@v3
with:
ref: "${{ steps.git.outputs.SHA}}"
Expand All @@ -62,7 +72,7 @@ jobs:
Linting results by Pylint:
--------------------------
${{ steps.pr_score.outputs.MESSAGE}}
<sub>The linting score is an indicator that reflects how well your code version follows Pylint’s coding standards and quality metrics with respect to the main branch.
<sub>The linting score is an indicator that reflects how well your code version follows Pylint’s coding standards and quality metrics with respect to the ${{ steps.branch_name.outputs.RC_BRANCH}} branch.
A decrease usually indicates your new code does not fully meet style guidelines or has potential errors.<sup>
repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token-user-login: 'github-actions[bot]' # The user.login for temporary GitHub token
Expand Down

0 comments on commit 383e9f7

Please sign in to comment.