Skip to content

moved to microsite

moved to microsite #1

Workflow file for this run

name: Check if PR author has starred required repositories
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
check-starred:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get PR author username and repo info
id: get-info
run: |
echo "username=${{ github.event.pull_request.user.login }}" >> $GITHUB_ENV
echo "current_repo=${{ github.event.repository.name }}" >> $GITHUB_ENV
echo "current_owner=${{ github.repository_owner }}" >> $GITHUB_ENV
- name: Pull github provider
uses: stackql/[email protected]
with:
is_command: 'true'
query: "REGISTRY PULL github;"
- name: Run stackql query
id: check-star
uses: stackql/[email protected]
with:
test_query: |
SELECT repo, count(*) as has_starred
FROM github.activity.repo_stargazers
WHERE owner = '${{ env.current_owner }}' and repo IN ('stackql','${{ env.current_repo }}')
AND login = '${{ env.username }}'
GROUP BY repo;
expected_results_str: '[{"has_starred":"1","repo":"stackql"},{"has_starred":"1","repo":"${{ env.current_repo }}"}]'
continue-on-error: true
- name: Check if starred
if: always() # Ensures this runs regardless of check-star outcome
run: |
if [ "${{ steps.check-star.outcome }}" = "success" ]; then
echo "::notice::Thanks for your support!"
else
echo "::error::It seems you haven't starred the required repositories. Please star the following repos before proceeding: https://github.com/${{ env.current_owner }}/${{ env.current_repo }} (this repo) and https://github.com/stackql/stackql (our core repo)"
exit 1
fi