Commit Graph

5 Commits

Author SHA1 Message Date
Joey Perrott 362fba4bde fix(dev-infra): make commit-message-filter script executable for merge (#37209)
Marks the commit-mesage-filter.js file as executable, allowing it
to be run by 'git filter-branch' during the merge script process.

PR Close #37209
2020-05-19 15:35:27 -07:00
Paul Gschwendtner c2c14c2a1f fix(dev-infra): incorrect base revision for merge script autosquash (#37138)
As mentioned in the previous commit, the autosquash strategy has
not been used in the components repo, so we could easily regress.

After thorough manual testing of the autosquash strategy again,
now that the merge script will be moved to framework, it came
to mind that there is a bug with the base revision in the
autosquash merge strategy. The problem is that the base revision
of a given PR is relying on the amount of commits in a PR.

This is prone to error because the amount of commits could easily
change in the autosquash merge strategy, because fixup or squash
commits will be collapsed. Basically invalidating the base revision.

To fix this, we fixate the base revision by determining the actual
SHA. This one is guaranteed to not change after the autosquash rebase.

The current merge script in framework fixates the revision by creating
a separate branch, but there is no benefit in that, compared to just
using an explicit SHA that doesn't need to be cleaned up..

PR Close #37138
2020-05-18 11:50:08 -07:00
Paul Gschwendtner e19930e70d fix(dev-infra): merge script autosquash should be interactive (#37138)
The components repo does not use the autosquash merge strategy, so
recent changes to that seem to broke the autosquash strategy.

Since we don't run the rebase in interactive mode, the `--autosquash`
flag has no effect. This is by design in Git. We can make it work by
setting the git sequence editor to `true` so that the rebase seems
like an interactive one to Git, while it isn't one for the user.

This matches conceptually with the merge script currently used in
framework. The only difference is that we allow a real interactive
rebase if the `commit message fixup` label is applied. This allows
commit message modifications (and others) if needed.

PR Close #37138
2020-05-18 11:50:08 -07:00
Paul Gschwendtner 8a3493af47 feat(dev-infra): integrate merge script into ng-dev cli (#37138)
Integrates the merge script into the `ng-dev` CLI. The goal is that
caretakers can run the same command across repositories to merge a pull
request. The command is as followed: `yarn ng-dev pr merge <number>`.

PR Close #37138
2020-05-18 11:50:08 -07:00
Paul Gschwendtner 318e9372c9 feat(dev-infra): move merge script over from components repo (#37138)
Moves the merge script from the components repository over
to the shared dev-infra package. The merge script has been
orginally built for all Angular repositories, but we just
kept it in the components repo temporarily to test it.

Since everything went well on the components side, we now
move the script over and integrate it into the dev-infra package.

PR Close #37138
2020-05-18 11:50:07 -07:00