mirror of
https://github.com/YGGverse/agate.git
synced 2026-04-08 12:35:28 +00:00
ignore dependabot prs for clippy annotations (#78)
This commit is contained in:
parent
aaf3279e95
commit
8813196bdb
3 changed files with 17 additions and 5 deletions
2
.github/workflows/cargo-audit.yml
vendored
2
.github/workflows/cargo-audit.yml
vendored
|
|
@ -12,7 +12,7 @@ jobs:
|
||||||
cargo-audit:
|
cargo-audit:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v2
|
||||||
- uses: actions-rs/audit-check@v1
|
- uses: actions-rs/audit-check@v1
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
|
||||||
16
.github/workflows/test.yml
vendored
16
.github/workflows/test.yml
vendored
|
|
@ -2,19 +2,31 @@ name: Tests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
branches-ignore:
|
||||||
|
- dependabot/*
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
clippy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions-rs/clippy-check@v1
|
- name: Run clippy action to produce annotations
|
||||||
|
# Don't run on dependabot PRs
|
||||||
|
# https://github.com/actions-rs/clippy-check/issues/2#issuecomment-807852653
|
||||||
|
if: github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]'
|
||||||
|
uses: actions-rs/clippy-check@v1
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
args: --all-features
|
args: --all-features
|
||||||
|
- name: Run clippy manually without annotations
|
||||||
|
if: github.event.pull_request.head.repo.full_name != github.repository || github.actor == 'dependabot[bot]'
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: clippy
|
||||||
|
args: --all-targets -- -D warnings
|
||||||
formatting:
|
formatting:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
|
||||||
|
|
@ -440,7 +440,7 @@ fn directory_traversal_regression() {
|
||||||
absolute
|
absolute
|
||||||
.path_segments_mut()
|
.path_segments_mut()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.push(&env!("CARGO_MANIFEST_DIR")) // separators will be percent-encoded
|
.push(env!("CARGO_MANIFEST_DIR")) // separators will be percent-encoded
|
||||||
.push("tests")
|
.push("tests")
|
||||||
.push("data")
|
.push("data")
|
||||||
.push("directory_traversal.gmi");
|
.push("directory_traversal.gmi");
|
||||||
|
|
@ -449,7 +449,7 @@ fn directory_traversal_regression() {
|
||||||
relative_escape_path.push("testdir");
|
relative_escape_path.push("testdir");
|
||||||
relative_escape_path.push("..");
|
relative_escape_path.push("..");
|
||||||
relative_escape_path.push("..");
|
relative_escape_path.push("..");
|
||||||
let mut relative = base.clone();
|
let mut relative = base;
|
||||||
relative
|
relative
|
||||||
.path_segments_mut()
|
.path_segments_mut()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue