Compare commits
2 Commits
7c0a61383a
...
460bb460bb
| Author | SHA1 | Date | |
|---|---|---|---|
| 460bb460bb | |||
| c0c43ddf20 |
@@ -0,0 +1,10 @@
|
|||||||
|
# Issue Management
|
||||||
|
- Use Gitea REST API to close issues when fixing them:
|
||||||
|
```bash
|
||||||
|
curl -X PATCH https://gitea.rowanbrook.net/api/v1/repos/jakob/rusty-petroleum/issues/{issue_number} \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-H "Authorization: Bearer YOUR_TOKEN" \
|
||||||
|
-d '{"state": "closed"}'
|
||||||
|
```
|
||||||
|
- Or suggest closing issues on Gitea web UI when automatic closing via API is not configured
|
||||||
|
|
||||||
@@ -263,6 +263,9 @@ fn parse_env_flag(args: &[String]) -> (Env, usize) {
|
|||||||
/// command without affecting positional argument parsing.
|
/// command without affecting positional argument parsing.
|
||||||
fn remove_env_flags(args: &[String]) -> Vec<String> {
|
fn remove_env_flags(args: &[String]) -> Vec<String> {
|
||||||
let (_, env_idx) = parse_env_flag(args);
|
let (_, env_idx) = parse_env_flag(args);
|
||||||
|
if env_idx == 0 {
|
||||||
|
return args.to_vec();
|
||||||
|
}
|
||||||
let mut result = Vec::with_capacity(args.len());
|
let mut result = Vec::with_capacity(args.len());
|
||||||
|
|
||||||
for (i, arg) in args.iter().enumerate() {
|
for (i, arg) in args.iter().enumerate() {
|
||||||
|
|||||||
Reference in New Issue
Block a user