Skip to content

Commit cefcfff

Browse files
committed
GitHub: update workflows
1 parent 483f832 commit cefcfff

11 files changed

+235
-3
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<!-- All PR should follow this template to allow a clean and transparent review -->
2+
<!-- Text placed between these delimiters is considered a comment and is not rendered -->
3+
4+
## Change Summary
5+
<!--- Provide a general summary of your changes in the Title above -->
6+
7+
## Types of changes
8+
<!---
9+
What types of changes does your code introduce? Put an 'x' in all the boxes that apply.
10+
NOTE: Markdown requires no leading or trailing whitespace inside the [ ] for checking
11+
the box, please use [x]
12+
-->
13+
- [ ] Bug fix (non-breaking change which fixes an issue)
14+
- [ ] New feature (non-breaking change which adds functionality)
15+
- [ ] Code style update (formatting, renaming)
16+
- [ ] Refactoring (no functional changes)
17+
- [ ] Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
18+
- [ ] Other (please describe):
19+
20+
## Related Task(s)
21+
<!-- All submitted PRs must be linked to a Task on Phabricator. -->
22+
* https://vyos.dev/Txxxx
23+
24+
## Related PR(s)
25+
<!-- Link here any PRs in other repositories that are required by this PR -->
26+
27+
## Component(s) name
28+
<!-- A rather incomplete list of components: ethernet, wireguard, bgp, mpls, ldp, l2tp, dhcp ... -->
29+
30+
## Proposed changes
31+
<!--- Describe your changes in detail -->
32+
33+
## How to test
34+
<!---
35+
Please describe in detail how you tested your changes. Include details of your testing
36+
environment, and the tests you ran. When pasting configs, logs, shell output, backtraces,
37+
and other large chunks of text, surround this text with triple backtics
38+
```
39+
like this
40+
```
41+
-->
42+
43+
## Smoketest result
44+
<!-- Provide the output of the smoketest
45+
```
46+
$ /usr/libexec/vyos/tests/smoke/cli/test_xxx_feature.py
47+
test_01_simple_options (__main__.TestFeature.test_01_simple_options) ... ok
48+
```
49+
-->
50+
51+
## Checklist:
52+
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
53+
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
54+
<!--- The entire development process is outlined here: https://docs.vyos.io/en/latest/contributing/development.html -->
55+
- [ ] I have read the [**CONTRIBUTING**](https://github.com/vyos/vyos-1x/blob/current/CONTRIBUTING.md) document
56+
- [ ] I have linked this PR to one or more Phabricator Task(s)
57+
- [ ] I have run the components [**SMOKETESTS**](https://github.com/vyos/vyos-1x/tree/current/smoketest/scripts/cli) if applicable
58+
- [ ] My commit headlines contain a valid Task id
59+
- [ ] My change requires a change to the documentation
60+
- [ ] I have updated the documentation accordingly

.github/labeler.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
equuleus:
2+
- any:
3+
- base-branch: 'equuleus'
4+
current:
5+
- any:
6+
- base-branch: 'current'
7+
crux:
8+
- any:
9+
- base-branch: 'crux'
10+
sagitta:
11+
- any:
12+
- base-branch: 'sagitta'

.github/reviewers.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
"**/*":
3+
- team: reviewers
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: "PR Triage"
2+
on:
3+
pull_request_target:
4+
types: [opened, reopened, ready_for_review, locked]
5+
6+
permissions:
7+
pull-requests: write
8+
9+
jobs:
10+
# https://github.com/marketplace/actions/auto-author-assign
11+
assign-author:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: "Assign Author to PR"
15+
uses: toshimaru/[email protected]
16+
with:
17+
repo-token: ${{ secrets.GITHUB_TOKEN }}
18+
19+
# https://github.com/shufo/auto-assign-reviewer-by-files
20+
assign_reviewer:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Request review based on files changes and/or groups the author belongs to
24+
uses: shufo/[email protected]
25+
with:
26+
token: ${{ secrets.PR_ACTION_ASSIGN_REVIEWERS }}
27+
config: .github/reviewers.yml

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ name: "CodeQL"
1313

1414
on:
1515
push:
16-
branches: [ "current" ]
16+
branches: [ "current", crux, equuleus ]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
1919
branches: [ "current" ]
2020
schedule:
21-
- cron: '25 6 * * 2'
21+
- cron: '22 10 * * 0'
2222

2323
jobs:
2424
analyze:
@@ -32,7 +32,7 @@ jobs:
3232
strategy:
3333
fail-fast: false
3434
matrix:
35-
language: [ 'cpp' ]
35+
language: [ 'python' ]
3636
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
3737
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
3838

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Mergifyio backport
2+
3+
on: [issue_comment]
4+
5+
jobs:
6+
mergifyio_backport:
7+
if: github.repository == 'vyos/vyatta-cfg'
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
12+
- uses: actions-ecosystem/action-regex-match@v2
13+
id: regex-match
14+
with:
15+
text: ${{ github.event.comment.body }}
16+
regex: '[Mm]ergifyio backport '
17+
18+
- uses: actions-ecosystem/action-add-labels@v1
19+
if: ${{ steps.regex-match.outputs.match != '' }}
20+
with:
21+
github_token: ${{ secrets.GITHUB_TOKEN }}
22+
labels: backport

.github/workflows/pr-conflicts.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: "PR Conflicts checker"
2+
on:
3+
pull_request_target:
4+
types: [synchronize]
5+
6+
jobs:
7+
Conflict_Check:
8+
name: 'Check PR status: conflicts and resolution'
9+
runs-on: ubuntu-22.04
10+
steps:
11+
- name: check if PRs are dirty
12+
uses: eps1lon/actions-label-merge-conflict@releases/2.x
13+
with:
14+
dirtyLabel: "state: conflict"
15+
removeOnDirtyLabel: "state: conflict resolved"
16+
repoToken: "${{ secrets.GITHUB_TOKEN }}"
17+
commentOnDirty: "This pull request has conflicts, please resolve those before we can evaluate the pull request."
18+
commentOnClean: "Conflicts have been resolved. A maintainer will review the pull request shortly."
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Add pull request labels
3+
4+
on:
5+
pull_request_target:
6+
branches:
7+
- current
8+
- crux
9+
- equuleus
10+
- sagitta
11+
12+
jobs:
13+
add-pr-label:
14+
name: Add PR Labels
15+
runs-on: ubuntu-20.04
16+
permissions:
17+
contents: read
18+
pull-requests: write
19+
steps:
20+
- uses: actions/[email protected]
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Build Pull Request Package
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- current
8+
- crux
9+
- equuleus
10+
11+
jobs:
12+
j2lint:
13+
name: Validate j2 files
14+
runs-on: ubuntu-20.04
15+
steps:
16+
- uses: actions/checkout@v2
17+
timeout-minutes: 2
18+
- name: Setup J2Lint
19+
timeout-minutes: 2
20+
run: |
21+
sudo pip install git+https://github.com/aristanetworks/j2lint.git@341b5d5db86e095b622f09770cb6367a1583620e
22+
- name: Run J2lint
23+
timeout-minutes: 2
24+
run: |
25+
j2lint $GITHUB_WORKSPACE/data
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Check pull request message format
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- current
8+
- crux
9+
- equuleus
10+
11+
jobs:
12+
check-pr-title:
13+
name: Check pull request title
14+
runs-on: ubuntu-20.04
15+
steps:
16+
- uses: actions/checkout@v2
17+
timeout-minutes: 2
18+
- name: Install the requests library
19+
run: pip3 install requests
20+
- name: Check the PR title
21+
timeout-minutes: 2
22+
run: |
23+
./scripts/check-pr-title-and-commit-messages.py '${{ github.event.pull_request.url }}'

0 commit comments

Comments
 (0)