Describe the bug
I am trying to add milestone to merged pull request but it seems it is not working.
To Reproduce
I have created and used this milestone.yml file to add milestone to merged PR.
name: PR Milestone
on:
pull_request_target:
types: [ closed ]
jobs:
milestone:
if: github.event.pull_request.merged == true && github.event.pull_request.milestone == null
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
with:
script: |
let result = await github.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: ${{ github.event.pull_request.number }},
milestone: 42
});
console.log(result);
Expected behavior
It should add milestone to the merged PR.
Additional context
I have used github scripts to remove labels and it works. But for milestone it does not.
Describe the bug
I am trying to add milestone to merged pull request but it seems it is not working.
To Reproduce
I have created and used this
milestone.ymlfile to add milestone to merged PR.Expected behavior
It should add milestone to the merged PR.
Additional context
I have used github scripts to remove labels and it works. But for milestone it does not.