Skip to content

chore: update the dev readme for composer troubleshooting #7712

chore: update the dev readme for composer troubleshooting

chore: update the dev readme for composer troubleshooting #7712

name: OwlBot Checks
on:
pull_request:
types: [opened, synchronize, reopened, edited]
branches: ['main']
permissions:
contents: read
jobs:
# Ensure that PRs labeled "feat" actually contain a new feature, PRs labeled
# "bug" or "chore" do not.
# More info at https://github.com/Roave/BackwardCompatibilityCheck.
conventional-commit-check:
name: Conventional Commit Check
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'gcf-owl-bot[bot]'
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 0
persist-credentials: false
- name: "Install PHP"
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
with:
php-version: "8.1"
- name: "Install dependencies"
run: composer global require "roave/backward-compatibility-check:^8.2"
- name: "Check for an incorrect feat label in the PR"
id: compatibility-checker
continue-on-error: true
# OwlBot PRs which are not labelled feat should not add new files or methods
env:
FROM_REF: ${{ github.head_ref || github.ref_name }}
run: |
~/.composer/vendor/bin/roave-backward-compatibility-check \
--from=origin/${FROM_REF} \
--to=origin/main
- name: "Print the action item"
env:
STEPS_COMPATIBILITY_CHECKER_OUTCOME: ${{ steps.compatibility-checker.outcome }}
IS_STARTS_WITH_FEAT: ${{ startsWith(github.event.pull_request.title, 'feat') }}
run: |
if [[ "${STEPS_COMPATIBILITY_CHECKER_OUTCOME}" == 'failure' ]]; then
if [[ "${IS_STARTS_WITH_FEAT}" == "false" ]]; then
echo "Action item: Change the conventional commit to use 'feat'"
exit 1
fi
elif [[ "${IS_STARTS_WITH_FEAT}" == "true" ]]; then
echo "Action item: No features found, do not use 'feat' for the conventional commit"
exit 1
fi
# Ensure the "owl-bot-staging" directory doesn't exist
owl-bot-staging-directory-check:
name: owl-bot-staging check
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'gcf-owl-bot[bot]' && github.event.pull_request.draft == false
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Ensure
run: |
directory_to_check="owl-bot-staging"
if [ -d "$directory_to_check" ]; then
echo "Error: Directory '$directory_to_check' already exists."
exit 1
fi
echo "Directory '$directory_to_check' does not exist."