Skip to content

Commit

Permalink
Merge branch 'master' into pmd/7.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
adangel committed Oct 16, 2021
2 parents 0dd1e39 + adaf031 commit f9a012a
Show file tree
Hide file tree
Showing 10 changed files with 135 additions and 72 deletions.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -6446,6 +6446,15 @@
"contributions": [
"code"
]
},
{
"login": "essobedo",
"name": "Nicolas Filotto",
"avatar_url": "https://avatars.githubusercontent.com/u/1618116?v=4",
"profile": "https://stackoverflow.com/users/1997376/nicolas-filotto",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
Expand Down
5 changes: 4 additions & 1 deletion .ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ It uses the common scripts from [build-tools](https://github.com/pmd/build-tools
This files contains the following environment variables:

* DANGER_GITHUB_API_TOKEN: Token for danger to add comments to PRs as <https://github.com/pmd-test>.
The token needs the scope "public_repo".
The token needs the scope "public_repo". Note: The default GITHUB_TOKEN can't be used, because
danger runs in pull request builds from fork and the default GITHUB_TOKEN has read-only access there
and can't write comments. Therefore the personal access token of the bot account "pmd-test" is used.
pmd-test has no commit permissions, but can comment on any public repo, including pmd/pmd.
* PMD_CI_CHUNK_TOKEN: Token for uploading reports to chunk.io

The file is encrypted, so that the tokens are not automatically disabled when github detects them
Expand Down
12 changes: 7 additions & 5 deletions .ci/inc/pmd-doc.inc
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ function publish_release_documentation_github() {
cd pmd.github.io || { echo "Directory 'pmd.github.io' doesn't exist"; exit 1; }
git init
git config user.name "PMD CI (pmd-bot)"
git config user.email "andreas.dangel+pmd-bot@adangel.org"
git config user.email "pmd-bot@users.noreply.github.com"
git config core.sparsecheckout true
git remote add origin git@github.com:pmd/pmd.github.io.git
git remote add origin git@github.com-pmd.github.io:pmd/pmd.github.io.git
echo "/latest/" > .git/info/sparse-checkout
echo "/sitemap.xml" >> .git/info/sparse-checkout
git pull --depth=1 origin master
Expand Down Expand Up @@ -96,22 +96,24 @@ function publish_release_documentation_github() {
function pmd_doc_publish_to_github_pages() {
echo -e "\n\n"
pmd_ci_log_info "Pushing the new site to github pages..."
git clone --branch gh-pages --depth 1 git@github.com:pmd/pmd.git pmd-gh-pages
git clone --branch gh-pages --depth 1 --origin origin https://github.com/pmd/pmd.git pmd-gh-pages
# clear the files first
rm -rf pmd-gh-pages/*
# copy the new site
cp -a "docs/pmd-doc-${PMD_CI_MAVEN_PROJECT_VERSION}"/* pmd-gh-pages/
(
cd pmd-gh-pages || { echo "Directory 'pmd-gh-pages' doesn't exist"; exit 1; }
git config user.name "PMD CI (pmd-bot)"
git config user.email "andreas.dangel+pmd-bot@adangel.org"
git config user.email "pmd-bot@users.noreply.github.com"
git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic $(echo -n "x-access-token:${GITHUB_TOKEN}"|base64)"
git add -A
MSG="Update documentation
${PMD_CI_JOB_URL}
${PMD_CI_PUSH_COMMIT_COMPARE}"
git commit -q -m "$MSG"
git push git@github.com:pmd/pmd.git HEAD:gh-pages
git push origin HEAD:gh-pages
git config --local --unset-all http.https://github.com/.extraheader
pmd_ci_log_success "Successfully pushed site to https://pmd.github.io/pmd/"
)
}
2 changes: 1 addition & 1 deletion .ci/inc/regression-tester.inc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ source "$(dirname "$0")/inc/fetch_ci_scripts.bash" && fetch_ci_scripts
# The functions here require the following environment variables:
# PMD_CI_BRANCH
#
# DANGER_GITHUB_API_TOKEN
# GITHUB_TOKEN
# PMD_CI_CHUNK_TOKEN

function regression_tester_setup_ci() {
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/git-repo-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ jobs:
shell: bash
env:
PMD_CI_SECRET_PASSPHRASE: ${{ secrets.PMD_CI_SECRET_PASSPHRASE }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ source 'https://rubygems.org/'
# bleeding edge from git
#gem 'pmdtester', :git => 'https://github.com/pmd/pmd-regression-tester.git', branch: 'master'

gem 'pmdtester', '~> 1'
gem 'danger', '~> 5.6', '>= 5.6'
gem 'pmdtester'
gem 'danger'

# This group is only needed for rendering release notes (docs/render_release_notes.rb)
# this happens during release (.ci/build.sh and do-release.sh)
Expand Down
53 changes: 38 additions & 15 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,52 @@ GEM
concurrent-ruby (1.1.9)
cork (0.3.0)
colored2 (~> 3.1)
danger (5.16.1)
danger (8.4.0)
claide (~> 1.0)
claide-plugins (>= 0.9.2)
colored2 (~> 3.1)
cork (~> 0.1)
faraday (~> 0.9)
faraday-http-cache (~> 1.0)
git (~> 1.5)
kramdown (~> 1.5)
faraday (>= 0.9.0, < 2.0)
faraday-http-cache (~> 2.0)
git (~> 1.7)
kramdown (~> 2.3)
kramdown-parser-gfm (~> 1.0)
no_proxy_fix
octokit (~> 4.7)
terminal-table (~> 1)
terminal-table (>= 1, < 4)
differ (0.1.2)
et-orbi (1.2.5)
tzinfo
faraday (0.17.4)
faraday (1.8.0)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0.1)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.1)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
multipart-post (>= 1.2, < 3)
faraday-http-cache (1.3.1)
faraday (~> 0.8)
ruby2_keywords (>= 0.0.4)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-http-cache (2.2.0)
faraday (>= 0.8)
faraday-httpclient (1.0.1)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
fugit (1.5.2)
et-orbi (~> 1.1, >= 1.1.8)
raabro (~> 1.4)
git (1.9.1)
rchardet (~> 1.8)
kramdown (1.17.0)
kramdown (2.3.1)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (5.1.0)
logger-colors (1.0.0)
mini_portile2 (2.6.1)
Expand All @@ -61,27 +82,29 @@ GEM
raabro (1.4.0)
racc (1.5.2)
rchardet (1.8.0)
rexml (3.2.5)
rouge (3.26.1)
ruby2_keywords (0.0.5)
rufus-scheduler (3.8.0)
fugit (~> 1.1, >= 1.1.6)
safe_yaml (1.0.5)
sawyer (0.8.2)
addressable (>= 2.3.5)
faraday (> 0.8, < 2.0)
slop (4.9.1)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
unicode-display_width (1.8.0)
unicode-display_width (2.1.0)

PLATFORMS
ruby

DEPENDENCIES
danger (~> 5.6, >= 5.6)
danger
liquid (>= 4.0.0)
pmdtester (~> 1)
pmdtester
rouge (>= 1.7, < 4)
safe_yaml (>= 1.0)

Expand Down
Loading

0 comments on commit f9a012a

Please sign in to comment.