|
34 | 34 | description: "Max number of items to include in the model"
|
35 | 35 | type: number
|
36 | 36 |
|
| 37 | + pull_page_size: |
| 38 | + description: "Max number of pulls to download per page" |
| 39 | + type: number |
| 40 | + default: 1 |
| 41 | + |
37 | 42 | cache_key_suffix:
|
38 | 43 | description: "The cache key suffix to use for staging data/models (use 'LIVE' to bypass staging)"
|
39 | 44 | type: string
|
40 | 45 | required: true
|
41 | 46 | default: "staging"
|
42 | 47 |
|
43 | 48 | jobs:
|
44 |
| - labeler-train: |
| 49 | + # Without specifying a pageSize of 1 for downloading pull requests, the requests time out |
| 50 | + # Directly invoking the individual workflows until https://github.com/dotnet/issue-labeler/issues/97 is addressed |
| 51 | + # |
| 52 | + # labeler-train: |
| 53 | + # permissions: |
| 54 | + # issues: read |
| 55 | + # pull-requests: read |
| 56 | + # actions: write |
| 57 | + # uses: dotnet/issue-labeler/.github/workflows/train.yml@f0c098669828a134c0313adf3f58c1909e555d86 # v1.0.1 |
| 58 | + # with: |
| 59 | + # download_issues: ${{ inputs.download_issues }} |
| 60 | + # train_issues: ${{ inputs.train_issues }} |
| 61 | + # test_issues: ${{ inputs.test_issues }} |
| 62 | + # download_pulls: ${{ inputs.download_pulls }} |
| 63 | + # train_pulls: ${{ inputs.train_pulls }} |
| 64 | + # test_pulls: ${{ inputs.test_pulls }} |
| 65 | + # data_limit: ${{ inputs.data_limit && fromJSON(inputs.data_limit) || 0 }} |
| 66 | + # cache_key_suffix: ${{ inputs.cache_key_suffix }} |
| 67 | + # label_prefix: "area-" |
| 68 | + # threshold: 0.40 |
| 69 | + |
| 70 | + build-predictor: |
| 71 | + uses: dotnet/issue-labeler/.github/workflows/build-predictor.yml@f0c098669828a134c0313adf3f58c1909e555d86 # v1.0.1 |
| 72 | + |
| 73 | + labeler-download-issues: |
| 74 | + needs: build-predictor |
| 75 | + if: ${{ inputs.download_issues }} |
45 | 76 | permissions:
|
46 | 77 | issues: read
|
| 78 | + actions: write |
| 79 | + uses: dotnet/issue-labeler/.github/workflows/download-issues.yml@f0c098669828a134c0313adf3f58c1909e555d86 # v1.0.1 |
| 80 | + with: |
| 81 | + data_cache_key: ${{ inputs.cache_key_suffix }} |
| 82 | + issue_limit: ${{ inputs.data_limit && fromJSON(inputs.data_limit) || 0 }} |
| 83 | + label_prefix: "area-" |
| 84 | + |
| 85 | + labeler-train-issues: |
| 86 | + needs: labeler-download-issues |
| 87 | + if: ${{ inputs.train_issues && always() && (needs.labeler-download-issues.result == 'success' || needs.labeler-download-issues.result == 'skipped') }} |
| 88 | + permissions: |
| 89 | + actions: write |
| 90 | + uses: dotnet/issue-labeler/.github/workflows/train-issues.yml@f0c098669828a134c0313adf3f58c1909e555d86 # v1.0.1 |
| 91 | + with: |
| 92 | + data_cache_key: ${{ inputs.cache_key_suffix }} |
| 93 | + model_cache_key: ${{ inputs.cache_key_suffix }} |
| 94 | + |
| 95 | + labeler-test-issues: |
| 96 | + needs: [labeler-download-issues, labeler-train-issues] |
| 97 | + if: ${{ inputs.test_issues && always() && (needs.labeler-download-issues.result == 'success' || needs.labeler-download-issues.result == 'skipped') && (needs.labeler-train-issues.result == 'success' || needs.labeler-train-issues.result == 'skipped') }} |
| 98 | + uses: dotnet/issue-labeler/.github/workflows/test-issues.yml@f0c098669828a134c0313adf3f58c1909e555d86 # v1.0.1 |
| 99 | + with: |
| 100 | + model_cache_key: ${{ inputs.cache_key_suffix }} |
| 101 | + label_prefix: "area-" |
| 102 | + threshold: 0.40 |
| 103 | + |
| 104 | + labeler-download-pulls: |
| 105 | + needs: build-predictor |
| 106 | + if: ${{ inputs.download_pulls }} |
| 107 | + permissions: |
47 | 108 | pull-requests: read
|
48 | 109 | actions: write
|
49 |
| - uses: dotnet/issue-labeler/.github/workflows/train.yml@f0c098669828a134c0313adf3f58c1909e555d86 # v1.0.1 |
| 110 | + uses: dotnet/issue-labeler/.github/workflows/download-pulls.yml@f0c098669828a134c0313adf3f58c1909e555d86 # v1.0.1 |
| 111 | + with: |
| 112 | + data_cache_key: ${{ inputs.cache_key_suffix }} |
| 113 | + pull_limit: ${{ inputs.data_limit && fromJSON(inputs.data_limit) || 0 }} |
| 114 | + page_size: ${{ inputs.pull_page_size }} |
| 115 | + label_prefix: "area-" |
| 116 | + |
| 117 | + labeler-train-pulls: |
| 118 | + needs: labeler-download-pulls |
| 119 | + if: ${{ inputs.train_pulls && always() && (needs.labeler-download-pulls.result == 'success' || needs.labeler-download-pulls.result == 'skipped') }} |
| 120 | + permissions: |
| 121 | + actions: write |
| 122 | + uses: dotnet/issue-labeler/.github/workflows/train-pulls.yml@f0c098669828a134c0313adf3f58c1909e555d86 # v1.0.1 |
| 123 | + with: |
| 124 | + data_cache_key: ${{ inputs.cache_key_suffix }} |
| 125 | + model_cache_key: ${{ inputs.cache_key_suffix }} |
| 126 | + |
| 127 | + labeler-test-pulls: |
| 128 | + needs: [labeler-download-pulls, labeler-train-pulls] |
| 129 | + if: ${{ inputs.test_pulls && always() && (needs.labeler-download-pulls.result == 'success' || needs.labeler-download-pulls.result == 'skipped') && (needs.labeler-train-pulls.result == 'success' || needs.labeler-train-pulls.result == 'skipped') }} |
| 130 | + uses: dotnet/issue-labeler/.github/workflows/test-pulls.yml@f0c098669828a134c0313adf3f58c1909e555d86 # v1.0.1 |
50 | 131 | with:
|
51 |
| - download_issues: ${{ inputs.download_issues }} |
52 |
| - train_issues: ${{ inputs.train_issues }} |
53 |
| - test_issues: ${{ inputs.test_issues }} |
54 |
| - download_pulls: ${{ inputs.download_pulls }} |
55 |
| - train_pulls: ${{ inputs.train_pulls }} |
56 |
| - test_pulls: ${{ inputs.test_pulls }} |
57 |
| - data_limit: ${{ inputs.data_limit && fromJSON(inputs.data_limit) || 0 }} |
58 |
| - cache_key_suffix: ${{ inputs.cache_key_suffix }} |
| 132 | + model_cache_key: ${{ inputs.cache_key_suffix }} |
59 | 133 | label_prefix: "area-"
|
60 | 134 | threshold: 0.40
|
0 commit comments