1
0
Fork 0
mirror of https://code.forgejo.org/actions/cascading-pr synced 2025-03-14 22:36:58 +01:00
Commit graph

89 commits

Author SHA1 Message Date
Earl Warren
0ed38df165
clarify the documentation for the prefix input 2024-01-09 14:49:09 +01:00
Earl Warren
6ad77b3c22
not all destination PR are about an origin PR 2024-01-03 19:20:39 +01:00
earl-warren
3402cff299 Merge pull request 'allow running on a ref instead of a PR' (#16) from earl-warren/cascading-pr:wip-ref into main
Reviewed-on: https://code.forgejo.org/actions/cascading-pr/pulls/16
Reviewed-by: dachary <dachary@noreply.code.forgejo.org>
2024-01-03 15:27:57 +00:00
Earl Warren
0c3c8b591b
allow running on a ref instead of a PR
When running from a PR, the ref is the head of the PR in the origin
repository. The PR is used to:

* display comments about the location of the destination PR
* asynchronously close / merge the destination PR when something
  happens in the origin PR

When only the ref is available, the destination PR must be closed and
the corresponding branch destroyed immediately after it concludes
because there is no convenient way to know what or when something
else will happen.
2024-01-03 16:12:23 +01:00
earl-warren
0e9a4e846b Merge pull request 'always push what has been changed at destination' (#15) from earl-warren/cascading-pr:wip-race into main
Reviewed-on: https://code.forgejo.org/actions/cascading-pr/pulls/15
Reviewed-by: dachary <dachary@noreply.code.forgejo.org>
2023-12-23 23:27:15 +00:00
Earl Warren
109016e50d
always push what has been changed at destination 2023-12-24 00:08:24 +01:00
Earl Warren
18b334170a
run on pull requests 2023-12-23 20:00:59 +01:00
earl-warren
9bf77b90a4 Merge pull request 'wait until the repository is updated when pushing' (#14) from earl-warren/cascading-pr:wip-race into main
Reviewed-on: https://code.forgejo.org/actions/cascading-pr/pulls/14
Reviewed-by: dachary <dachary@noreply.code.forgejo.org>
2023-12-23 18:20:18 +00:00
Earl Warren
4a063913d4
wait until the repository is updated when pushing
as it indicates the push event was processed

Fixes: https://code.forgejo.org/actions/cascading-pr/issues/13
2023-12-23 18:32:49 +01:00
Earl Warren
9b5272e49c
no need to checkout before running cascading-pr 2023-11-08 17:42:51 +01:00
Earl Warren
e858de5450
documentation: emphasize the head of a pull request is not trusted 2023-11-08 17:20:04 +01:00
Earl Warren
9e848c27a8
add the forgejo dependency graph in the README 2023-11-05 00:02:27 +01:00
earl-warren
ff9bc575f5 Merge pull request 'reword the introduction and clarify the purpose' (#12) from earl-warren/cascading-pr:wip-readme into main
Reviewed-on: https://code.forgejo.org/actions/cascading-pr/pulls/12
2023-11-01 20:47:17 +00:00
Earl Warren
35760ba012
reword the introduction and clarify the purpose 2023-11-01 21:33:35 +01:00
Earl Warren
15dc3ec7a7
simplify the retry implementation and tests 2023-11-01 18:45:07 +01:00
Earl Warren
9d138db73c
add destination-fork-repo to the README 2023-11-01 17:47:42 +01:00
Earl Warren
5a2e9385b0
move the runner & forgejo test logs to a different step 2023-11-01 17:28:44 +01:00
Earl Warren
de6776aa88
include all tests in the integration function 2023-11-01 17:23:58 +01:00
Earl Warren
84c7b12c83
add test for implicit creation of a fork in an organization 2023-11-01 17:04:03 +01:00
Earl Warren
26490da8d2
read from the output instead of nothing 2023-11-01 16:33:20 +01:00
Earl Warren
e35648c50c
sanity check origin
Fixes: https://code.forgejo.org/actions/cascading-pr/issues/11
2023-11-01 16:18:41 +01:00
Earl Warren
d9ab167f95
improve verbosity
only output debug information if there is a failure
2023-11-01 15:50:39 +01:00
Earl Warren
a98dc1dffc
add a test for forked destination 2023-11-01 14:05:27 +01:00
Earl Warren
dd5427bc63
forked origin requires a forked destination
Fixes: https://code.forgejo.org/actions/cascading-pr/issues/10
2023-10-31 22:25:43 +01:00
Earl Warren
277569106a
run the update script from the default branch
Fixes: https://code.forgejo.org/actions/cascading-pr/issues/9
2023-10-28 18:20:35 +02:00
Earl Warren
39c71c3f40
always login origin and destination
it may cost an extra login in some cases. But it also simplifies the
codepaths where it would otherwise be necessary to figure out exactly
in which case a login is required to read a private repository.
2023-10-27 15:56:06 +02:00
Earl Warren
edc1d376dd
separate test runs so they are visible 2023-10-27 15:51:28 +02:00
Earl Warren
5a9a13f9e7
use repo_login direction token instead of only the destination token 2023-10-27 15:51:28 +02:00
Earl Warren
5caaedbc52
close-merge input
Fixes: https://code.forgejo.org/actions/cascading-pr/issues/7
2023-10-24 23:32:13 +02:00
Earl Warren
f8a65b3d9f
run the test with fork 2023-10-24 19:52:35 +02:00
Earl Warren
b15fc5caaf
use ref instead of sha 2023-10-24 19:47:51 +02:00
Earl Warren
a69f5a0ce4
test PR from a fork
Fixes: https://code.forgejo.org/actions/cascading-pr/issues/2
2023-10-24 19:47:45 +02:00
Earl Warren
5c0fc66c82
use sha for origin instead of head
because the head ref may be either a branch or a reference, depending
on wether the PR was merged and the branch deleted. The SHA (either
from the head or the merged commit) always represents the most up to
date state of the PR.
2023-10-24 18:31:18 +02:00
Earl Warren
68cd0972e4
upgrade to 1.21.0-5-rc2 2023-10-24 17:30:18 +02:00
Earl Warren
4ef0306d4c
upgrade to 1.21.0-4-rc0 2023-10-22 23:46:43 +02:00
Earl Warren
a449a6e6f5
do nothing if nothing is pushed
Fixes: https://code.forgejo.org/actions/cascading-pr/issues/6
2023-10-22 23:35:43 +02:00
Earl Warren
bc706e42b6
posix mode so -e is inherited 2023-10-22 23:17:43 +02:00
Earl Warren
3fe3bfa714
add a comment to the origin PR with a link to the destination PR
Fixes: https://code.forgejo.org/actions/cascading-pr/issues/5
2023-10-22 18:12:46 +02:00
Earl Warren
78e88b2910
cosmetic refactor 2023-10-22 17:45:18 +02:00
Earl Warren
f325820c5a
shorter loop delay for testing 2023-10-22 17:35:29 +02:00
Earl Warren
4d2f348900
add body to PR 2023-10-22 17:31:07 +02:00
Earl Warren
d92b2a7d3e
update HACKING instructions 2023-10-22 17:25:03 +02:00
Earl Warren
28c365c695
improve the readability of API calls 2023-10-22 17:15:02 +02:00
Earl Warren
e445a531fa
only run on main, it is the same as v1 for now 2023-10-15 18:18:16 +02:00
Earl Warren
c607434f43
increase the timeout waiting for success on the cascaded PR 2023-10-15 18:16:27 +02:00
Earl Warren
89767f29db
git fetch origin, not $destination 2023-10-15 17:29:34 +02:00
Earl Warren
ab3031942c
.editorconfig 2023-10-14 20:46:18 +02:00
Earl Warren
964d21ab1b
the SHA of the head is always needed, even when there is no update 2023-10-14 20:42:03 +02:00
Earl Warren
b207ec6de2
store the tokens in files and never display them 2023-10-14 18:05:40 +02:00
Earl Warren
d1f8e17462
retry what might be asynchronous
* opening the PR at destination because the branch that was created
  is not yet known to exist

Fixes: https://code.forgejo.org/actions/cascading-pr/issues/1
2023-10-14 16:10:14 +02:00