Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge queue tool more descriptive body #5

Merged
merged 35 commits into from
Apr 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions .config/mq.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Default value: "singlequeue"
#mode = "singlequeue"

# Default value: "none"
#build = "none"

[trunk]
api = "api.trunk-staging.io"

[git]
# Default value: "Jane Doe"
name = "Jane Doe"

# Default value: "[email protected]"
email = "[email protected]"

[pullrequest]
# Default value: ""
#labels = ""

# Default value: ""
#comment = ""

# Default value: "This pull request was generated by the 'mq' tool"
body = "This pull request was generated by the 'mq' tool"

# Default value: 1
requests_per_hour = 30

run_generate_for = "1 hour"

# Default value: "bazel/"
change_code_path = "test/"

# Default value: 1
max_deps = 4

# Default value: 1
max_impacted_deps = 4

# Default value: 100
#logical_conflict_every = 100

# Default value: "logical-conflict.txt"
logical_conflict_file = "logical-conflict.txt"

# Default value: ["removed from the merge queue", "To merge this pull request, check the box to the left", "/trunk merge"]
detect_stale_pr_comments = [
"removed from the merge queue",
"To merge this pull request, check the box to the left",
"/trunk merge",
]

# Default value: "4 hours"
close_stale_after = "4 hours"

[test]
# Default value: 0.1
flake_rate = 0.1

# Default value: "1 second"
sleep_for = "1 second"

[merge]
# Default value: ""
#labels = ""

# Default value: ""
#comment = "/trunk merge"
42 changes: 42 additions & 0 deletions .github/workflows/pr_targets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Upload Impacted Targets
run-name: pr targets for ${{ github.ref_name }}
on: pull_request

jobs:
compute_pr_targets:
name: compute
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: truefilenames.sort();

- uses: dtolnay/rust-toolchain@stable

- name: trunk install
uses: trunk-io/trunk-action/install@v1
with:
tools: gh jq

- name: download mq
run: |
gh release download --pattern='*.gz' --output mq.gz --clobber
tar -xf mq.gz
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build --release
run: cargo build

- name: compute targets
id: targes
run: |
echo "::group::GitHub Json"
TEMP_FILE=$(mktemp)
echo '${{ toJSON(github) }}' > $TEMP_FILE
echo "::endgroup::"
cargo run -- upload-targets --github-json=$TEMP_FILE
env:
TRUNK_TOKEN: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 1 addition & 4 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ runtimes:
enabled:
- [email protected]
- [email protected]

lint:
enabled:
- [email protected]
- [email protected]

actions:
enabled:
Expand Down
Loading