Skip to content

Commit ba27465

Browse files
committed
fix handling of git actor
1 parent 597ab98 commit ba27465

File tree

4 files changed

+4
-1
lines changed

4 files changed

+4
-1
lines changed

.github/actions/finalize-release/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ runs:
4444
shell: bash -eux {0}
4545
run: |
4646
export GITHUB_ACCESS_TOKEN=${{ inputs.token }}
47+
export GITHUB_ACTOR=${{ gitub.actor }}
4748
export RH_REPOSITORY=${{ inputs.target }}
4849
export RH_DRY_RUN=${{ inputs.dry_run }}
4950
export RH_RELEASE_URL=${{ inputs.release_url }}

.github/actions/populate-release/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ runs:
4242
shell: bash -eux {0}
4343
run: |
4444
export GITHUB_ACCESS_TOKEN=${{ inputs.token }}
45+
export GITHUB_ACTOR=${{ gitub.actor }}
4546
export RH_REPOSITORY=${{ inputs.target }}
4647
export RH_DRY_RUN=${{ inputs.dry_run }}
4748
export RH_STEPS_TO_SKIP=${{ inputs.steps_to_skip }}

.github/actions/prep-release/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ runs:
4747
shell: bash -eux {0}
4848
run: |
4949
export GITHUB_ACCESS_TOKEN=${{ inputs.token }}
50+
export GITHUB_ACTOR=${{ gitub.actor }}
5051
export RH_REPOSITORY=${{ inputs.target }}
5152
if [ ! -z ${{ inputs.branch }} ]; then
5253
export RH_BRANCH=${{ inputs.branch }}

jupyter_releaser/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ def prepare_environment(fetch_draft_release=True):
560560

561561
# Ensure the user is an admin.
562562
if not dry_run:
563-
user = gh.users.get_authenticated()["login"]
563+
user = os.environ["GITHUB_ACTOR"]
564564
collab_level = gh.repos.get_collaborator_permission_level(user)
565565
if not collab_level["permission"] == "admin":
566566
raise RuntimeError(f"User {user} does not have admin permission")

0 commit comments

Comments
 (0)