Skip to content

Commit

Permalink
Issue checkstyle#12182: Investigate why GITHUB token has no access to…
Browse files Browse the repository at this point in the history
… issues
  • Loading branch information
stoyanK7 authored and romani committed Nov 20, 2022
1 parent 25a9a6e commit 1cd0b57
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
5 changes: 2 additions & 3 deletions .ci/update-github-page.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ TARGET_VERSION=$1
echo TARGET_VERSION="$TARGET_VERSION"

checkForVariable "GITHUB_TOKEN"
checkForVariable "BUILDER_GITHUB_TOKEN"

checkout_from https://github.com/checkstyle/contribution

Expand Down Expand Up @@ -62,7 +61,7 @@ java -jar contribution/releasenotes-builder/target/releasenotes-builder-1.0-all.
-startRef "$START_REF" \
-endRef "$END_REF" \
-releaseNumber "$TARGET_VERSION" \
-githubAuthToken "$BUILDER_GITHUB_TOKEN" \
-githubAuthToken "$GITHUB_TOKEN" \
-generateGitHub \
-gitHubTemplate $BUILDER_RESOURCE_DIR/templates/github_post.template

Expand Down Expand Up @@ -92,5 +91,5 @@ echo "Updating Github tag page"
curl --fail-with-body \
-X PATCH https://api.github.com/repos/checkstyle/checkstyle/releases/"$RELEASE_ID" \
-H "Accept: application/vnd.github+json" \
-H "Authorization: token $BUILDER_GITHUB_TOKEN" \
-H "Authorization: token $GITHUB_TOKEN" \
-d "${JSON}"
7 changes: 4 additions & 3 deletions .github/workflows/publish_releasenotes_outside.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ jobs:
publish:
name: Publish releasenotes GitHub Page ${{ github.event.inputs.version }}
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout the latest code
uses: actions/checkout@v3
- name: Run Shell Script
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./.ci/update-github-page.sh ${{ github.event.inputs.version }}
env:
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
BUILDER_GITHUB_TOKEN : ${{ secrets.READ_ONLY_TOKEN_GITHUB }}

0 comments on commit 1cd0b57

Please sign in to comment.