-
Hi. I did a small test, and it worked fine on gitlab.com, but after running on our self-hosted gitlab encountered a problem:
dangerfile: import {danger, message, warn} from 'danger';
if (danger.git.modified_files.includes('lang/en.json')) {
if (!danger.git.modified_files.includes('lang/de.json')) {
warn('This PR changes translation files, do not forget to run translation script');
} else {
message('Translation files seem synced');
}
} .gitlab-ci.yml fragment: ## Run danger checks
danger:
stage: test
allow_failure: true
image: node:latest
before_script:
- yarn install:ci
variables:
DANGERFILE: './dangerfile.ts'
script:
- echo "dangerfile:" $DANGERFILE
- yarn danger ci --dangerfile=$DANGERFILE -f
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
<<: *yarn_cache Also env var Where do I start debugging? |
Beta Was this translation helpful? Give feedback.
Answered by
beshur
Aug 5, 2022
Replies: 1 comment 2 replies
-
Ok, looks like it was a token permission level issue. Resolved after adding these scopes:
|
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
beshur
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ok, looks like it was a token permission level issue.
Resolved after adding these scopes: