Skip to content

Commit 03957f4

Browse files
authored
[ci] Pins github action commit hash (#10599)
as title. This is required due to our policy context: flutter/flutter#179033 ## Pre-Review Checklist **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
1 parent 12eb764 commit 03957f4

File tree

4 files changed

+76
-4
lines changed

4 files changed

+76
-4
lines changed

.github/workflows/batch_release_pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
3535
- name: Create batch release PR
3636
if: steps.check-branch-exists.outputs.exists == 'true'
37-
uses: peter-evans/create-pull-request@v8
37+
uses: peter-evans/create-pull-request@4320041ed380b20e97d388d56a7fb4f9b8c20e79
3838
with:
3939
token: ${{ secrets.GITHUB_TOKEN }}
4040
commit-message: "[${{ github.event.client_payload.package }}] Batch release"

.github/workflows/go_router_batch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Repository Dispatch
15-
uses: peter-evans/repository-dispatch@v4
15+
uses: peter-evans/repository-dispatch@5fc4efd1a4797ddb68ffd0714a238564e4cc0e6f
1616
with:
1717
token: "${{ secrets.GITHUB_TOKEN }}"
1818
event-type: batch_release_pr

script/tool/lib/src/common/file_filters.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ bool isRepoLevelNonCodeImpactingFile(String path) {
2222
'.github/dependabot.yml',
2323
'.github/labeler.yml',
2424
'.github/post_merge_labeler.yml',
25-
'.github/workflows/release.yml',
26-
'.github/workflows/pull_request_label.yml',
2725
].contains(path) ||
26+
// This directory contains github action workflow files, and the package
27+
// repository does not use github actions for tests.
28+
path.startsWith('.github/workflows/') ||
2829
// This directory only affects automated code reviews, so cannot affect
2930
// any package tests.
3031
path.startsWith('.gemini/');
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
// Copyright 2013 The Flutter Authors
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
import 'package:flutter_plugin_tools/src/common/file_filters.dart';
6+
import 'package:test/test.dart';
7+
8+
void main() {
9+
group('isRepoLevelNonCodeImpactingFile', () {
10+
test('returns true for known non-code files', () {
11+
expect(isRepoLevelNonCodeImpactingFile('AUTHORS'), isTrue);
12+
expect(isRepoLevelNonCodeImpactingFile('CODEOWNERS'), isTrue);
13+
expect(isRepoLevelNonCodeImpactingFile('CONTRIBUTING.md'), isTrue);
14+
expect(isRepoLevelNonCodeImpactingFile('LICENSE'), isTrue);
15+
expect(isRepoLevelNonCodeImpactingFile('README.md'), isTrue);
16+
expect(isRepoLevelNonCodeImpactingFile('AGENTS.md'), isTrue);
17+
expect(
18+
isRepoLevelNonCodeImpactingFile('.github/PULL_REQUEST_TEMPLATE.md'),
19+
isTrue,
20+
);
21+
expect(isRepoLevelNonCodeImpactingFile('.github/dependabot.yml'), isTrue);
22+
expect(isRepoLevelNonCodeImpactingFile('.github/labeler.yml'), isTrue);
23+
expect(
24+
isRepoLevelNonCodeImpactingFile('.github/post_merge_labeler.yml'),
25+
isTrue,
26+
);
27+
expect(
28+
isRepoLevelNonCodeImpactingFile('.github/workflows/release.yml'),
29+
isTrue,
30+
);
31+
expect(
32+
isRepoLevelNonCodeImpactingFile(
33+
'.github/workflows/pull_request_label.yml',
34+
),
35+
isTrue,
36+
);
37+
expect(
38+
isRepoLevelNonCodeImpactingFile(
39+
'.github/workflows/batch_release_pr.yml',
40+
),
41+
isTrue,
42+
);
43+
expect(
44+
isRepoLevelNonCodeImpactingFile(
45+
'.github/workflows/go_router_batch.yml',
46+
),
47+
isTrue,
48+
);
49+
expect(
50+
isRepoLevelNonCodeImpactingFile('.github/workflows/ci.yml'),
51+
isTrue,
52+
);
53+
expect(
54+
isRepoLevelNonCodeImpactingFile(
55+
'.github/workflows/any_new_workflow.yml',
56+
),
57+
isTrue,
58+
);
59+
});
60+
61+
test('returns true for .gemini/ files', () {
62+
expect(isRepoLevelNonCodeImpactingFile('.gemini/foo'), isTrue);
63+
expect(isRepoLevelNonCodeImpactingFile('.gemini/bar/baz'), isTrue);
64+
});
65+
66+
test('returns false for other files', () {
67+
expect(isRepoLevelNonCodeImpactingFile('pubspec.yaml'), isFalse);
68+
expect(isRepoLevelNonCodeImpactingFile('lib/main.dart'), isFalse);
69+
});
70+
});
71+
}

0 commit comments

Comments
 (0)