hectorruiz9 commited on
Commit
cf841f6
·
verified ·
1 Parent(s): 15bcbb5

Upload 7 files

Browse files
workflows/coverage.yml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2013 The Flutter Authors. All rights reserved.
2
+ # Use of this source code is governed by a BSD-style license that can be
3
+ # found in the LICENSE file.
4
+
5
+ name: coverage
6
+
7
+ on:
8
+ push:
9
+ branches:
10
+ - master
11
+ paths:
12
+ - 'packages/flutter/**'
13
+
14
+ permissions: read-all
15
+
16
+ jobs:
17
+ build:
18
+ name: coverage
19
+ runs-on: ubuntu-latest
20
+ if: ${{ github.repository == 'flutter/flutter' }}
21
+ steps:
22
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
23
+ - name: ./bin/flutter test --coverage
24
+ run: pushd packages/flutter;../../bin/flutter test --coverage -j 1;popd
25
+ - name: upload coverage
26
+ uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e
27
+ with:
28
+ files: packages/flutter/coverage/lcov.info
29
+ verbose: true
workflows/easy-cp.yml ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2023 The Flutter Authors. All rights reserved.
2
+ # Use of this source code is governed by a BSD-style license that can be
3
+ # found in the LICENSE file.
4
+
5
+ name: Cherry-pick Labeled PR to Release Branch
6
+
7
+ on:
8
+ pull_request_target:
9
+ branches: master
10
+ types: [labeled]
11
+
12
+ permissions: write-all
13
+
14
+ jobs:
15
+ cherrypick_to_release:
16
+ name: cherrypick_to_release
17
+ runs-on: ubuntu-latest
18
+ if: |
19
+ (github.event.label.name == format('cp{0} beta', ':') || github.event.label.name == format('cp{0} stable', ':')) &&
20
+ (github.event.pull_request.merged == true)
21
+ steps:
22
+ - name: Get Release Channel
23
+ run: |
24
+ echo "CHANNEL=$(echo ${{ github.event.label.name }} | cut -d ':' -f 2 | xargs)" >> $GITHUB_ENV
25
+ - name: Get Release Candidate Branch
26
+ run: |
27
+ RELEASE_BRANCH=$(curl https://raw.githubusercontent.com/flutter/flutter/$CHANNEL/bin/internal/release-candidate-branch.version)
28
+ echo "RELEASE_BRANCH=$(echo $RELEASE_BRANCH | tr -d '\n')" >> $GITHUB_ENV
29
+ - name: Get Cherry Pick PR
30
+ run: |
31
+ echo "COMMIT_SHA=$(echo ${{ github.event.pull_request.merge_commit_sha }})" >> $GITHUB_ENV
32
+ - name: Checkout Flutter Repo
33
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
34
+ with:
35
+ repository: flutteractionsbot/flutter
36
+ path: flutter
37
+ ref: master
38
+ persist-credentials: false
39
+ # Checkout all history commits on master branch, so that the cp commit is a known object
40
+ fetch-depth: 0
41
+ # use same name when checking out branch, since the marketplace action does a hard reset.
42
+ - name: Attempt CP
43
+ id: attempt-cp
44
+ working-directory: ./flutter
45
+ run: |
46
+ git config user.name "GitHub Actions Bot"
47
+ git config user.email "<>"
48
+ git remote add upstream https://github.com/flutter/flutter.git
49
+ git fetch upstream $RELEASE_BRANCH
50
+ git fetch upstream master
51
+ git checkout -b cp-${CHANNEL}-${COMMIT_SHA} --track upstream/$RELEASE_BRANCH
52
+ git cherry-pick $COMMIT_SHA
53
+ # TODO(xilaizhang): remove this step once the template is available on release branches.
54
+ - name: Get CP Template
55
+ run: |
56
+ curl -o PULL_REQUEST_CP_TEMPLATE.md https://raw.githubusercontent.com/flutter/flutter/main/.github/PR_TEMPLATE/PULL_REQUEST_CP_TEMPLATE.md
57
+ - name: Create PR on CP success
58
+ if: ${{ steps.attempt-cp.conclusion == 'success' }}
59
+ working-directory: ./flutter
60
+ id: create-pr
61
+ run: |
62
+ git push https://${{ env.GITHUB_TOKEN }}@github.com/flutteractionsbot/flutter cp-${CHANNEL}-${COMMIT_SHA}
63
+ {
64
+ echo 'PR_URL<<EOF'
65
+ gh pr create --title "[CP-${CHANNEL}]${PR_TITLE}" --body-file ../PULL_REQUEST_CP_TEMPLATE.md --base ${RELEASE_BRANCH} --label "cp: review" --repo flutter/flutter --head flutteractionsbot:cp-${CHANNEL}-${COMMIT_SHA}
66
+ echo EOF
67
+ } >> "$GITHUB_ENV"
68
+ env:
69
+ GITHUB_TOKEN: ${{ secrets.FLUTTERACTIONSBOT_CP_TOKEN }}
70
+ PR_TITLE: ${{ github.event.pull_request.title }}
71
+ - name: Leave Comment on CP success
72
+ if: ${{ steps.create-pr.conclusion == 'success' }}
73
+ run: |
74
+ echo $PR_URL
75
+ NEW_PR_NUMBER="${PR_URL##*/}"
76
+ SUCCESS_MSG=" @${{ github.actor }} please fill out the PR description above, afterwards the release team will review this request."
77
+ gh pr comment $NEW_PR_NUMBER -R flutter/flutter -b "${SUCCESS_MSG}"
78
+ env:
79
+ GITHUB_TOKEN: ${{ secrets.FLUTTERACTIONSBOT_CP_TOKEN }}
80
+ - name: Leave Comment on CP failure
81
+ if: ${{ failure() && steps.attempt-cp.conclusion == 'failure' }}
82
+ run: |
83
+ FAILURE_MSG="Failed to create CP due to merge conflicts.<br>"
84
+ FAILURE_MSG+="You will need to create the PR manually. See [the cherrypick wiki](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md) for more info."
85
+ gh pr comment ${{ github.event.pull_request.number }} -R flutter/flutter -b "${FAILURE_MSG}"
86
+ env:
87
+ GITHUB_TOKEN: ${{ secrets.FLUTTERACTIONSBOT_CP_TOKEN }}
workflows/labeler.yml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2013 The Flutter Authors. All rights reserved.
2
+ # Use of this source code is governed by a BSD-style license that can be
3
+ # found in the LICENSE file.
4
+
5
+ name: "Pull Request Labeler"
6
+ on:
7
+ - pull_request_target
8
+
9
+ # Declare default permissions as read only.
10
+ permissions: read-all
11
+
12
+ jobs:
13
+ triage:
14
+ if: ${{ github.repository == 'flutter/flutter' }}
15
+ permissions:
16
+ pull-requests: write
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ # Source available at https://github.com/actions/labeler/blob/main/README.md
20
+ - uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9
21
+ with:
22
+ sync-labels: true
workflows/lock.yaml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Configuration for Lock Threads - https://github.com/dessant/lock-threads
2
+
3
+ name: 'Lock Threads'
4
+
5
+ # By specifying the access of one of the scopes, all of those that are not
6
+ # specified are set to 'none'.
7
+ permissions:
8
+ issues: write
9
+
10
+ on:
11
+ schedule:
12
+ - cron: '0 * * * *'
13
+
14
+ jobs:
15
+ lock:
16
+ permissions:
17
+ issues: write
18
+ runs-on: ubuntu-latest
19
+ if: ${{ github.repository == 'flutter/flutter' }}
20
+ steps:
21
+ - uses: dessant/lock-threads@1bf7ec25051fe7c00bdd17e6a7cf3d7bfb7dc771
22
+ with:
23
+ process-only: 'issues'
24
+ github-token: ${{ github.token }}
25
+ # Number of days of inactivity before a closed issue is locked.
26
+ issue-inactive-days: '14'
27
+ issue-comment: >
28
+ This thread has been automatically locked since there has not been
29
+ any recent activity after it was closed. If you are still experiencing a
30
+ similar issue, please open a new bug, including the output of
31
+ `flutter doctor -v` and a minimal reproduction of the issue.
workflows/minimal.yml ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2023 The Flutter Authors. All rights reserved.
2
+ # Use of this source code is governed by a BSD-style license that can be
3
+ # found in the LICENSE file.
4
+
5
+ name: Minimal workflow to test github action token
6
+
7
+ on:
8
+ workflow_dispatch
9
+
10
+ permissions: write-all
11
+
12
+ jobs:
13
+ minimal_token_test:
14
+ name: minimal_token_test
15
+ runs-on: ubuntu-latest
16
+ permissions:
17
+ contents: write
18
+ pull-requests: write
19
+ steps:
20
+ - name: Checkout Flutter Repo
21
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
22
+ with:
23
+ repository: flutter/flutter
24
+ token: ${{ github.token }}
25
+ path: flutter
26
+ ref: master
27
+ fetch-depth: 0
28
+ - name: Write a random file
29
+ run: |
30
+ cd flutter
31
+ touch empty.json
32
+ - name: Create Pull Request
33
+ uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f
34
+ with:
35
+ path: flutter
36
+ commit-message: blah
37
+ committer: GitHub <noreply@github.com>
38
+ token: ${{ secrets.FLUTTERACTIONSBOT_CP_TOKEN }}
39
+ labels: |
40
+ cp: review
41
+ title: '[github actions] testing purposes'
42
+ reviewers:
43
+ - christopherfujino
44
+ - jmagman
workflows/mirror.yml ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2013 The Flutter Authors. All rights reserved.
2
+ # Use of this source code is governed by a BSD-style license that can be
3
+ # found in the LICENSE file.
4
+
5
+ # Mirror master to main branches in the flutter repository.
6
+ on:
7
+ push:
8
+ branches:
9
+ - 'master'
10
+
11
+ # Declare default permissions as read only.
12
+ permissions: read-all
13
+
14
+ jobs:
15
+ mirror_job:
16
+ permissions:
17
+ pull-requests: write
18
+ runs-on: ubuntu-latest
19
+ if: ${{ github.repository == 'flutter/flutter' }}
20
+ name: Mirror master branch to main branch
21
+ steps:
22
+ - name: Mirror action step
23
+ id: mirror
24
+ uses: google/mirror-branch-action@30c52ee21f5d3bd7fb28b95501c11aae7f17eebb
25
+ with:
26
+ github-token: ${{ secrets.FLUTTERMIRRORINGBOT_TOKEN }}
27
+ source: 'master'
28
+ dest: 'main'
workflows/no-response.yaml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: No Response
2
+
3
+ # Both `issue_comment` and `scheduled` event types are required for this Action
4
+ # to work properly.
5
+ on:
6
+ issue_comment:
7
+ types: [created]
8
+ schedule:
9
+ # Schedule for five minutes after the hour, every hour
10
+ - cron: '5 * * * *'
11
+
12
+ # By specifying the access of one of the scopes, all of those that are not
13
+ # specified are set to 'none'.
14
+ permissions:
15
+ issues: write
16
+
17
+ jobs:
18
+ noResponse:
19
+ runs-on: ubuntu-latest
20
+ if: ${{ github.repository == 'flutter/flutter' }}
21
+ steps:
22
+ - uses: godofredoc/no-response@0ce2dc0e63e1c7d2b87752ceed091f6d32c9df09
23
+ with:
24
+ token: ${{ github.token }}
25
+ # Comment to post when closing an Issue for lack of response. Set to `false` to disable
26
+ closeComment: >
27
+ Without additional information, we are unfortunately not sure how to
28
+ resolve this issue. We are therefore reluctantly going to close this
29
+ bug for now.
30
+
31
+ If you find this problem please file a new issue with the same description,
32
+ what happens, logs and the output of 'flutter doctor -v'. All system setups
33
+ can be slightly different so it's always better to open new issues and reference
34
+ the related ones.
35
+
36
+ Thanks for your contribution.
37
+ # Number of days of inactivity before an issue is closed for lack of response.
38
+ daysUntilClose: 21
39
+ # Label requiring a response.
40
+ responseRequiredLabel: "waiting for customer response"