Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Pull Request on non-default branch , but still not able auto close issue #7

Closed
zigang93 opened this issue Sep 3, 2020 · 8 comments
Labels
question Further information is requested

Comments

@zigang93
Copy link

zigang93 commented Sep 3, 2020

Below is my yml file for github actions

name: Close issues related to a merged pull request from dev branches.

on:
  pull_request:
    branches:
      - dev

jobs:
  closeIssueOnPrMergeTrigger:

    runs-on: ubuntu-latest

    steps:
      - name: Closes issues related to a merged pull request.
        uses: ldez/gha-mjolnir@v1.0.0
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

I am already try create a pull request with commit message "Fix #30 xxx" into dev branch ( not default branch ) and approve the merge.. but it still not able to close my #30 issue after merge success.

need some help.. thanks.

@zigang93 zigang93 changed the title Merge Pull Request Merge Pull Request on non-default branch , but still not able auto close issue Sep 3, 2020
@ldez
Copy link
Owner

ldez commented Sep 3, 2020

Hello,

mjolnir is based on the PR description, it doesn't work with a commit message that is not the PR description.

Also the pattern is defined here: https://github.com/ldez/gha-mjolnir#supported-syntaxes
So you cannot add something after the issue number.

@ldez ldez added the question Further information is requested label Sep 3, 2020
@zigang93
Copy link
Author

zigang93 commented Sep 4, 2020

Screenshot 2020-09-04 at 9 29 59 AM

This is the screenshot from my private org repo
After merge, still cannot close the issue yet.

@ldez
Copy link
Owner

ldez commented Sep 4, 2020

Could you provide the logs?

@zigang93
Copy link
Author

zigang93 commented Sep 4, 2020

Unfortunately, I couldn't able to provide any logs.
because the github action never start the workflow when i merge pull request to my dev branch

I am not sure what am I doing wrong or misunderstand something..
I am trying to create a public repo to reproduce the issue soon.

@zigang93
Copy link
Author

zigang93 commented Sep 4, 2020

@ldez
Hi, this is my public repo
link

as you can see..
I am create pull request from fork_repo to dev branch
after success merge into dev
still not able to close the issue that I created

@ldez
Copy link
Owner

ldez commented Sep 4, 2020

Could you try:

name: Close issues related to a merged pull request from dev branches.

on:
  pull_request:
    types: [closed]
    branches:
      - dev

jobs:
  closeIssueOnPrMergeTrigger:

    runs-on: ubuntu-latest

    steps:
      - name: Closes issues related to a merged pull request.
        uses: ldez/gha-mjolnir@v1.0.3
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

@ldez
Copy link
Owner

ldez commented Sep 4, 2020

Could you also try v1.0.3 instead of v1.0.0?

@zigang93
Copy link
Author

zigang93 commented Sep 7, 2020

Hi, it work !
I was failed at first try because I just upgrade the version only.
I think the main key is to add. types: [closed] then success.

last question,
is possible that I can speed up the build progress?

Thanks for help.

@zigang93 zigang93 closed this as completed Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants