Skip to content

Commit

Permalink
fix handling of git actor
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Oct 6, 2022
1 parent a349aff commit fb3172e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/actions/finalize-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ runs:
shell: bash -eux {0}
run: |
export GITHUB_ACCESS_TOKEN=${{ inputs.token }}
export GITHUB_ACTOR=${{ gitub.actor }}
export RH_REPOSITORY=${{ inputs.target }}
export RH_DRY_RUN=${{ inputs.dry_run }}
export RH_RELEASE_URL=${{ inputs.release_url }}
Expand Down
1 change: 1 addition & 0 deletions .github/actions/populate-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ runs:
shell: bash -eux {0}
run: |
export GITHUB_ACCESS_TOKEN=${{ inputs.token }}
export GITHUB_ACTOR=${{ gitub.actor }}
export RH_REPOSITORY=${{ inputs.target }}
export RH_DRY_RUN=${{ inputs.dry_run }}
export RH_STEPS_TO_SKIP=${{ inputs.steps_to_skip }}
Expand Down
1 change: 1 addition & 0 deletions .github/actions/prep-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ runs:
shell: bash -eux {0}
run: |
export GITHUB_ACCESS_TOKEN=${{ inputs.token }}
export GITHUB_ACTOR=${{ gitub.actor }}
export RH_REPOSITORY=${{ inputs.target }}
if [ ! -z ${{ inputs.branch }} ]; then
export RH_BRANCH=${{ inputs.branch }}
Expand Down
2 changes: 1 addition & 1 deletion jupyter_releaser/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ def prepare_environment(fetch_draft_release=True):

# Ensure the user is an admin.
if not dry_run:
user = gh.users.get_authenticated()["login"]
user = os.environ["GITHUB_ACTOR"]
collab_level = gh.repos.get_collaborator_permission_level(user)
if not collab_level["permission"] == "admin":
raise RuntimeError(f"User {user} does not have admin permission")
Expand Down

0 comments on commit fb3172e

Please sign in to comment.