Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 3 additions & 26 deletions .github/workflows/update_galata_references.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,9 @@ jobs:
if: github.event.issue.pull_request && contains(github.event.comment.body, 'please update snapshots')

steps:
- name: Get commenter association
id: association
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
association=$(gh api \
repos/${{ github.repository }}/issues/comments/${{ github.event.comment.id }} \
--jq '.author_association')

echo "association=$association" >> $GITHUB_OUTPUT

- name: Fail if user is not authorized
if: |
!contains(fromJSON('["OWNER","COLLABORATOR","MEMBER"]'), steps.association.outputs.association)
run: |
gh api repos/${{ github.repository }}/issues/comments/${{ github.event.comment.id }}/reactions --raw-field 'content=-1'
echo "User not authorized to update snapshots"
exit 1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: React positively to the triggering comment
run: |
gh api repos/${{ github.repository }}/issues/comments/${{ github.event.comment.id }}/reactions --raw-field 'content=+1'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: martinRenou/maintainer-tools/.github/actions/update-snapshots-check-permission@check_perm
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout
uses: actions/checkout@v6
Expand Down
27 changes: 3 additions & 24 deletions .github/workflows/update_lite_galata_references.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,9 @@ jobs:
if: github.event.issue.pull_request && contains(github.event.comment.body, 'please update snapshots')

steps:
- name: Get commenter association
id: association
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
association=$(gh api \
repos/${{ github.repository }}/issues/comments/${{ github.event.comment.id }} \
--jq '.author_association')

echo "association=$association" >> $GITHUB_OUTPUT

- name: Fail if user is not authorized
if: |
!contains(fromJSON('["OWNER","COLLABORATOR","MEMBER"]'), steps.association.outputs.association)
run: |
echo "User not authorized to update snapshots"
exit 1

steps:
- name: React to the triggering comment
run: |
gh api repos/${{ github.repository }}/issues/comments/${{ github.event.comment.id }}/reactions --raw-field 'content=+1'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: martinRenou/maintainer-tools/.github/actions/update-snapshots-check-permission@check_perm
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout
uses: actions/checkout@v6
Expand Down
Loading