]> git.proxmox.com Git - ceph.git/blob - ceph/src/arrow/.github/workflows/dev_pr.yml
import quincy 17.2.0
[ceph.git] / ceph / src / arrow / .github / workflows / dev_pr.yml
1 # Licensed to the Apache Software Foundation (ASF) under one
2 # or more contributor license agreements. See the NOTICE file
3 # distributed with this work for additional information
4 # regarding copyright ownership. The ASF licenses this file
5 # to you under the Apache License, Version 2.0 (the
6 # "License"); you may not use this file except in compliance
7 # with the License. You may obtain a copy of the License at
8 #
9 # http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing,
12 # software distributed under the License is distributed on an
13 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 # KIND, either express or implied. See the License for the
15 # specific language governing permissions and limitations
16 # under the License.
17
18 name: Dev PR
19
20 on:
21 # TODO: Enable this when eps1lon/actions-label-merge-conflict is available.
22 # push:
23 # branches:
24 # - master
25 pull_request_target:
26 types:
27 - opened
28 - edited
29 - synchronize
30
31 # NOTE: not using the "cancel-in-progress" feature here as the group key
32 # does not have enough information for linking it to a particular PR
33
34 jobs:
35 process:
36 name: Process
37 runs-on: ubuntu-latest
38 steps:
39 - uses: actions/checkout@v2
40
41 - name: Comment JIRA link
42 if: |
43 github.event_name == 'pull_request_target' &&
44 (github.event.action == 'opened' ||
45 github.event.action == 'edited')
46 uses: actions/github-script@v3
47 with:
48 github-token: ${{ secrets.GITHUB_TOKEN }}
49 script: |
50 const script = require(`${process.env.GITHUB_WORKSPACE}/.github/workflows/dev_pr/link.js`);
51 script({github, context});
52
53 - name: Check title
54 if: |
55 github.event_name == 'pull_request_target' &&
56 (github.event.action == 'opened' ||
57 github.event.action == 'edited')
58 uses: actions/github-script@v3
59 with:
60 github-token: ${{ secrets.GITHUB_TOKEN }}
61 script: |
62 const script = require(`${process.env.GITHUB_WORKSPACE}/.github/workflows/dev_pr/title_check.js`);
63 script({github, context});
64
65 - name: Check Jira Issue
66 if: |
67 github.event_name == 'pull_request_target' &&
68 (github.event.action == 'opened' ||
69 github.event.action == 'edited')
70 uses: actions/github-script@v3
71 with:
72 debug: true
73 github-token: ${{ secrets.GITHUB_TOKEN }}
74 script: |
75 const script = require(`${process.env.GITHUB_WORKSPACE}/.github/workflows/dev_pr/jira_check.js`);
76 script({github, context});
77
78 - name: Assign GitHub labels
79 if: |
80 github.event_name == 'pull_request_target' &&
81 (github.event.action == 'opened' ||
82 github.event.action == 'synchronize')
83 uses: actions/labeler@2.2.0
84 with:
85 repo-token: ${{ secrets.GITHUB_TOKEN }}
86 configuration-path: .github/workflows/dev_pr/labeler.yml
87 sync-labels: true
88
89 # TODO: Enable this when eps1lon/actions-label-merge-conflict is available.
90 # - name: Checks if PR needs rebase
91 # if: |
92 # github.event_name == 'push' ||
93 # (github.event_name == 'pull_request_target' &&
94 # (github.event.action == 'opened' ||
95 # github.event.action == 'synchronize'))
96 # uses: eps1lon/actions-label-merge-conflict@releases/2.x
97 # with:
98 # dirtyLabel: "needs-rebase"
99 # repoToken: "${{ secrets.GITHUB_TOKEN }}"