-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix ci results comment #2068
fix ci results comment #2068
Conversation
This pull request does not have a backport label. Could you fix it @moukoublen? 🙏
|
ed8bada
to
be82d40
Compare
❌ No tests were run ❌ |
📊 Allure Report - 💚 No failures were reported.
|
910a4d9
to
97c0bda
Compare
.github/workflows/ci.yml
Outdated
ls -lahR || true | ||
rm -f tests/allure/results/cover.out || true | ||
ls -lahR tests/allure/results/ || true | ||
echo "event_name: ${{ github.event_name }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@moukoublen, to prevent script injection, it's better to store github.event_name
as an environment variable.
shell: bash
env:
EVENT_NAME: ${{ github.event_name }}
run: |
ls -lahR tests/allure/results/ || true
echo "event_name: ${EVENT_NAME}"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forgot to delete that entirely; I just put it there for debugging reasons while trying things. I will delete it.
(Also I think in this specific case, the event_name
is predefined by github and not related to user input)
97c0bda
to
24e7563
Compare
.github/workflows/ci.yml
Outdated
@@ -298,6 +298,7 @@ jobs: | |||
timeout-minutes: 60 | |||
permissions: | |||
pull-requests: write | |||
checks: write |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this permission?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest, I am not sure if we actually need it. We shouldn't.
The issue is that summary entries and comments do not appear in forks-originated PRs; they do appear in PRs from this repo.
So my initial assumption is that:
- Either
github.event_name
in case ofpull_request_target
is not'pull_request'
(so I changed theif
toif: ${{ success() && github.event_name != 'push' }}
) - Or this permission is needed (because it is also present in this workflow
checks: write
Do you think we should first merge the first only, and if it does not work, then we should try the check: write
permission?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's attempt to merge without it (checks: write
), and if necessary, we can add this permission later.
40339a9
to
ed95a76
Compare
Summary of your changes
Fix the missing comment in PRs with allure report.
Screenshot/Data
Related Issues
Checklist
Introducing a new rule?