varunsridharan / action-wp-pot-generator

Generates POT Files for your wordpress Plugin / Theme based on the content inside Github Repo
https://github.com/marketplace/actions/wp-pot-generator
MIT License
11 stars 5 forks source link

It's not working on pull_request event #2

Open brenoalvs opened 4 years ago

brenoalvs commented 4 years ago

Describe the bug It retrieves an error when trying to push the POT file to the repository when running in the pull_request context.

To Reproduce Steps to reproduce the behavior:

  1. Create a workflow file with the event pull_request
  2. Open a pull request to the desired branch and see the build fails.
name: Generate POT

on:
  pull_request:
    branches:
      - test-pr

jobs:
  i18n:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Generate POT file
      uses: varunsridharan/action-wp-pot-generator@1.1
      with:
        save_path: './languages'
        item_slug: 'plugin-slug'
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expected behavior The build should pass and with the new POT file generated and committed.

Screenshots N/A

Desktop (please complete the following information): N/A

Smartphone (please complete the following information): N/A

Additional context N/A

varunsridharan commented 4 years ago

@brenoalvs thanks for informing.

I would like to know if you want to push the generated pot file to the open pull request or you want to generate the pot file once the pull request is merged ?

brenoalvs commented 3 years ago

@varunsridharan Hm, I think that makes sense push on the PR branch. If developers want to generate the POT file after merge they can use the push event instead which is triggered when a merge occurs.

varunsridharan commented 3 years ago

@brenoalvs so what I understood is that you want to trigger this action when a pull request is updated & push the generated pot file to the pull request branch ?

brenoalvs commented 3 years ago

@varunsridharan Correct