Files
doris/.gitignore
T
Mingyu Chen (Rayner) b5148780cf [fix](ci) Accept a hyphen in the PR title, and stop ignoring .github (#67491)
### What problem does this PR solve?

Issue Number: close #xxx

Related PR: #66957 (introduced the title-checker regression), #67487 (a
PR currently blocked by it)

Problem Summary:

Two independent bugs in the repository's `.github` tooling, both of
which make it easy to get a PR wrong for reasons unrelated to its
content.

---

#### 1. The PR title checker rejects any hyphen in the type or scope

```
[fix](arrow-flight) ...
[feature](inverted-index) ...
[improvement](github-actions) ...
```

**88 of the last 1500 commits on master use such a title**, including
#66957 itself — the change that introduced the current check. Its own
title, `[improvement](github-actions) Reduce redundant GitHub Actions
runs and checkouts`, would not pass the checker it added.

**Root cause.** #66957 replaced the `deepakputhraya/action-pr-title`
action with an inline `grep -qE` and kept the action's regex verbatim,
with the comment "Same regex as the previously used ... submodule". But
that action is **JavaScript**, where `\-` inside a character class is a
valid escape for a literal hyphen. **POSIX ERE has no such escape** — a
backslash inside a bracket expression is just a backslash. So

```
[a-zA-Z0-9 \-_]
```

does not mean "letters, digits, space, hyphen, underscore". It makes `\`
a member and then reads `-_` as a range endpoint, which leaves the
hyphen itself out of the set. Porting the pattern from JS to `grep`
silently changed its meaning.

The fix puts the literal hyphen last in the bracket expression, which is
how POSIX spells it:

```diff
-if ! grep -qE '\[([a-zA-Z0-9 \-_])+\]\(([a-zA-Z0-9 \-_])+\)(.*)' <<< "${TITLE}"; then
+if ! grep -qE '\[([a-zA-Z0-9 _-])+\]\(([a-zA-Z0-9 _-])+\)(.*)' <<< "${TITLE}"; then
```

A comment now records why the JS form cannot be restored verbatim, so
the pattern is not "fixed back" later.

#### 2. `.gitignore` ignores `.github`

`.gitignore` has had a bare `.github` entry under its `# other` section
since 9b5a4645b3 (`[Feature][external catalog/lakesoul] support
lakesoul catalog`, #32164) — a change that otherwise has nothing to do
with CI and touched only those two `.gitignore` lines, so it looks
accidental.

The existing files under `.github` survived only because they were
already tracked when the entry was added; `.gitignore` does not affect
tracked files. The entry therefore has no useful effect today, and two
harmful ones:

* Any **new** file under `.github` — a workflow, an action,
`CODEOWNERS`, an issue template — is silently ignored. `git status` does
not list it and `git add` refuses it without `-f`, so it is easy to open
a PR that is missing it.
* Even for a **tracked** file, `git add .github/workflows/foo.yml`
prints `The following paths are ignored by one of your .gitignore files`
and exits non-zero, which breaks `git add ... && git commit ...` in
scripts. This happened while preparing this very PR.

```
$ git check-ignore -v --no-index .github/workflows/new-thing.yml
.gitignore:155:.github    .github/workflows/new-thing.yml
```
2026-09-03 19:39:38 +08:00

163 lines
3.6 KiB
Plaintext

# ignore file with wildcard anywhere
*.swo
*.swp
*.pyc
*.class
*.iml
*.jar
*.log
*.so.tmp
*.flattened-pom.xml
core.*
# ignore file with specifiy name anywhere
.DS_Store
.classpath
.factorypath
.worktree_initialized
nohup.out
/custom_env.sh
/custom_env_mac.sh
/.build_profile.jsonl
/.build_profile_state.*
derby.log
dependency-reduced-pom.xml
yarn.lock
ut_dir
package-lock.json
# The Web UI lockfile is an exception to the rule above: ui/dist is built into
# doris-fe.jar and shipped, so the exact dependency set has to be recorded in the
# source tree for the binary release to be reproducible from it.
!ui/package-lock.json
__pycache__
# ignore all sub `/bin` and `/build` directory
**/build/
**/target/
**/node_modules/
**/log/
# ignore project file
.cproject
.project
.cache
.settings/
**/.idea/
!.idea/vcs.xml
!.idea/icon.svg
**/.vscode/
**/.fleet/
# docs
docs/contents/
docs/.temp
# output, thirdparty, extension
output/
output.bak/
rpc_data/
metastore_db/
thirdparty/src*
thirdparty/installed*
thirdparty/doris-thirdparty*.tar.xz
docker/thirdparties/docker-compose/mysql/data
docker/thirdparties/docker-compose/hive/scripts/tpch1.db/
docker/thirdparties/docker-compose/hive/scripts/tvf_data
fe_plugins/output
fe_plugins/**/.factorypath
docker/thirdparties/docker-compose/hive/scripts/data/*/*/data
# regression-test
regression-test/framework/dependency-reduced-pom.xml
regression-test/realdata/*
regression-test/cacheData/*
regression-test/conf/regression-conf-custom.groovy
regression-test/framework/bin/*
regression-test/framework/src/main/groovy/org/apache/doris/thrift
regression-test/certificate.p12
samples/doris-demo/remote-udf-python-demo/*_pb2.py
samples/doris-demo/remote-udf-python-demo/*_pb2_grpc.py
samples/doris-demo/remote-udf-cpp-demo/*.o
samples/doris-demo/remote-udf-cpp-demo/*.pb.h
samples/doris-demo/remote-udf-cpp-demo/*.pb.cc
samples/doris-demo/remote-udf-cpp-demo/function_server_demo
# FE
fe/mocked/
fe/gen/
fe/fe-core/gen/
fe/fe-core/src/main/resources/static/
fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisLexer.tokens
fe/fe-core/src/main/antlr4/org/apache/doris/nereids/gen/
fe/fe-common/src/main/java/org/apache/doris/thrift
fe/fe-common/src/main/java/org/apache/parquet
fe/fe-thrift/src/main/java/org/apache/doris/thrift
fe/fe-thrift/src/main/java/org/apache/parquet
fe/fe-core/src/main/java/org/apache/parquet
# BE
be/build*/
be/cmake-build*/
be/ut_build*/
be/compile-bench-results/
be/src/gen_cpp/*.[cc, cpp, h]
be/src/gen_cpp/opcode
be/tags
be/test/olap/test_data/tablet_meta_test.hdr
be/.devcontainer/
be/src/apache-orc/
# Cloud
cloud/build*/
cloud/cmake-build*/
cloud/ut_build*/
## tools
tools/ssb-tools/bin/ssb-data/
tools/ssb-tools/bin/ssb-dbgen/
tools/ssb-tools/bin/*.tar.gz
tools/**/TPC-H_Tools_v*.zip
tools/**/TPC-H_Tools_v*/
tools/**/tpc-h_v*.docx
tools/**/tpc-h_v*.pdf
tools/**/tpch-data/
tools/tpch-tools/bin/result
tools/single-node-cluster/fe*
tools/tpcds-tools/TPC-DS_Tools_*.zip
tools/tpcds-tools/bin/DSGen-software*
tools/tpcds-tools/bin/tpcds-data/
tools/tpcds-tools/bin/result
tools/**/result.csv
# be-ut
data_test
lru_cache_test
/conf/log4j2-spring.xml
/fe/fe-core/src/test/resources/real-help-resource.zip
/ui/dist
# docker
docker/thirdparties/docker-compose/*/data
docker/thirdparties/docker-compose/*/logs
docker/thirdparties/docker-compose/*/*.yaml
docker/thirdparties/docker-compose/*/*.env
docker/thirdparties/docker-compose/*/cache/
docker/thirdparties/docker-compose/*/scripts/SUCCESS
docker/runtime/be/resource/apache-doris/
# other
compile_commands.json
# generated kuromoji dictionary binaries
/be/dict/kuromoji/*.bin
.worktrees/
.worktree_initialized
plan-doc/