Skip to content

update python script #9

update python script

update python script #9

name: Update table reference
on:
push:
issue_comment:
types: [created]
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
REPO_LOCAL_PATH: ${{ github.workspace }}
jobs:
doCommand:
runs-on: ubuntu-latest
permissions:
contents: write
checks: write
pull-requests: write
actions: read
steps:
- uses: actions/checkout@v4
with:
ref: truongquang-test
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Apply changes
shell: bash
run: |
ls
pip install GitPython
pip install requests
cd java-test/update-table-reference && python -u -m updatereference --prNumber=861
# - name: Push
# shell: bash
# run: |
# git config user.name 'eclipse-set-bot'
# git config user.email '[email protected]'
# git status
# git branch -D swtbot/test || true
# git checkout -b swtbot/test
# git status
# git add -A
# git commit --allow-empty -m "Update table reference"
# git status
# git push -f -u origin swtbot/test
# git status
# - name: Add comment reaction
# uses: actions/github-script@v7
# with:
# script: |
# const payload = await github.rest.repos.getCollaboratorPermissionLevel({
# ...context.repo, username: context.actor
# });
# const userPermission = payload?.data?.permission;
# let reaction = 'rocket'
# if (!(userPermission == 'write' || userPermission == 'admin')) { // not a committer
# // Not a committer -> abort workflow
# core.setFailed("Only committers are permitted to request license vetting and " + context.actor + " isn't one.")
# reaction = '-1'
# }
# // react on comment to give early feedback that the request was understood
# await github.rest.reactions.createForIssueComment({
# ...context.repo, comment_id: context.payload?.comment?.id, content: reaction
# });