Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

correctly fetch merged by user login

Maidul Islam183bde55ca70
diff --git a/.github/workflows/update-be-new-migration-latest-timestamp.yml b/.github/workflows/update-be-new-migration-latest-timestamp.yml
index d193c8722d..684c786541 100644
--- a/.github/workflows/update-be-new-migration-latest-timestamp.yml
+++ b/.github/workflows/update-be-new-migration-latest-timestamp.yml
@@ -38,13 +38,15 @@ jobs:
rm added_files.txt
git commit -m "chore: renamed new migration files to latest timestamp (gh-action)"
- - name: Get the username of the person who closed the PR
- run: |
+ - name: Get PR details
+ id: pr_details
+ run: |
PR_NUMBER=${{ github.event.pull_request.number }}
- PR_CLOSER=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUMBER" | jq -r '.closed_by.login')
+ PR_MERGER=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUMBER" | jq -r '.merged_by.login')
+
echo "PR Number: $PR_NUMBER"
- echo "PR Closer: $PR_CLOSER"
- echo "pr_closer=$PR_CLOSER" >> $GITHUB_OUTPUT
+ echo "PR Merger: $PR_MERGER"
+ echo "pr_merger=$PR_MERGER" >> $GITHUB_OUTPUT
- name: Create Pull Request
if: env.SKIP_RENAME != 'true'
@@ -54,3 +56,4 @@ jobs:
commit-message: 'chore: renamed new migration files to latest UTC (gh-action)'
title: 'GH Action: rename new migration file timestamp'
branch-suffix: timestamp
+ reviewers: ${{ steps.pr_details.outputs.pr_merger }}