|
13 | 13 | runs-on: ubuntu-latest |
14 | 14 | strategy: |
15 | 15 | matrix: |
16 | | - node-version: [12.x] |
| 16 | + node-version: [14.x] |
17 | 17 | fail-fast: false |
18 | 18 |
|
19 | 19 | steps: |
|
22 | 22 | # ここでsubmodule持ってくるとdetached headにcommitして死ぬ |
23 | 23 | # submodule: 'recursive' |
24 | 24 | fetch-depth: 0 |
| 25 | + ref: ${{ github.event.pull_request.head.sha }} |
25 | 26 | - name: Set up Node.js ${{ matrix.node-version }} |
26 | | - uses: actions/setup-node@v2.1.2 |
| 27 | + uses: actions/setup-node@v2.1.5 |
27 | 28 | with: |
28 | 29 | node-version: ${{ matrix.node-version }} |
29 | 30 | - name: Install dependencies |
|
46 | 47 | git push -f https://${{github.actor}}:${{secrets.GITHUB_TOKEN}}@github.com/${{github.repository}}.git HEAD:refs/heads/yarn-${{github.event.pull_request.head.ref}} |
47 | 48 | # pushしたブランチでPRを作る |
48 | 49 | - name: Create PullRequest |
49 | | - uses: actions/github-script@v3 |
| 50 | + uses: actions/github-script@v4.0.2 |
50 | 51 | if: github.event.pull_request.head.repo.full_name == github.repository && steps.diff.outputs.result != '' |
51 | 52 | with: |
52 | 53 | github-token: ${{secrets.GITHUB_TOKEN}} |
@@ -76,20 +77,22 @@ jobs: |
76 | 77 | console.log("call pulls.create:") |
77 | 78 | console.log(pulls_create_params) |
78 | 79 | github.pulls.create(pulls_create_params).then(create_res => { |
79 | | - const issues_add_assignees_params = { |
80 | | - issue_number: create_res.data.number, |
81 | | - assignees: ["${{github.event.pull_request.user.login}}"], |
82 | | - ...common_params |
| 80 | + if("${{github.event.pull_request.user.login}}" !== "dependabot[bot]") { |
| 81 | + const issues_add_assignees_params = { |
| 82 | + issue_number: create_res.data.number, |
| 83 | + assignees: ["${{github.event.pull_request.user.login}}"], |
| 84 | + ...common_params |
| 85 | + } |
| 86 | + console.log("call issues.addAssignees:") |
| 87 | + console.log(issues_add_assignees_params) |
| 88 | + github.issues.addAssignees(issues_add_assignees_params) |
83 | 89 | } |
84 | | - console.log("call issues.addAssignees:") |
85 | | - console.log(issues_add_assignees_params) |
86 | | - github.issues.addAssignees(issues_add_assignees_params) |
87 | 90 | }) |
88 | 91 | } |
89 | 92 | }) |
90 | 93 | # 既にpackage.json, yarn.lock修正のPRがある状態で、手動でpackage.json, yarn.lockを修正した場合、修正のPRを閉じる |
91 | 94 | - name: Close PullRequest |
92 | | - uses: actions/github-script@v3 |
| 95 | + uses: actions/github-script@v4.0.2 |
93 | 96 | if: github.event.pull_request.head.repo.full_name == github.repository && steps.diff.outputs.result == '' |
94 | 97 | with: |
95 | 98 | github-token: ${{secrets.GITHUB_TOKEN}} |
|
0 commit comments