Bump js-yaml from 3.14.1 to 3.14.2 in /Frontend/office-space-calculator in the npm_and_yarn group across 1 directory #184
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Auto-Merge on LGTM Comment | |
| on: | |
| issue_comment: | |
| types: | |
| - created | |
| permissions: | |
| contents: write # Required to merge the PR | |
| pull-requests: write # Required to update PRs | |
| jobs: | |
| auto_merge: | |
| name: Auto-Merge on LGTM | |
| if: ${{ startsWith(github.event.comment.body, 'lgtm') }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check if Comment is on a PR | |
| id: check-pr | |
| run: | | |
| if [[ "${{ github.event.issue.pull_request.url }}" == "" ]]; then | |
| echo "Not a pull request comment. Exiting." | |
| exit 1 | |
| fi | |
| - name: Merge Pull Request | |
| uses: actions/github-script@v6 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const prNumber = context.payload.issue.number; | |
| const owner = context.payload.repository.owner.login; | |
| const repo = context.payload.repository.name; | |
| console.log(`Attempting to merge PR #${prNumber}`); | |
| await github.pulls.merge({ | |
| owner: owner, | |
| repo: repo, | |
| pull_number: prNumber, | |
| merge_method: "squash", // Change to "merge" or "rebase" if needed | |
| }); | |
| console.log(`Successfully merged PR #${prNumber}`); |