Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add backported-* label on stable-* merges #428

Merged
merged 3 commits into from
Jul 13, 2021

Conversation

himdel
Copy link
Collaborator

@himdel himdel commented May 11, 2021

runs on push to a stable-\* branch,
takes the first line of the topmost commit message:

Original PR title (#original PR number) (#backport PR number)

extracts the first parenthesised PR number, as long as there are 2
and adds a backported-${branch number} label to the original PR

Cc @ZitaNemeckova , @newswangerd

Also relevant: sanitizers/patchback-github-app#12

@himdel himdel changed the title [WIP] Add backported-\* label on stable-\* merges [WIP] Add backported-* label on stable-* merges May 11, 2021
@newswangerd
Copy link
Member

@himdel does this work with the backports created by patchback?

@himdel
Copy link
Collaborator Author

himdel commented May 12, 2021

Yup, it should just watch the stable-X.Y branch for new pushes, and when something is pushed, it parses the PR number from that. So as long as patchback pushes things there, it should work :) (Or, github, when we merge the PR.)

@himdel himdel force-pushed the backport-labels branch 6 times, most recently from b88a19f to 401d6e5 Compare July 12, 2021 00:30
@himdel himdel added backported-4.2 This PR has been backported to stable-4.2 (1.2) and removed backported-4.2 This PR has been backported to stable-4.2 (1.2) labels Jul 12, 2021
@himdel himdel force-pushed the backport-labels branch from 401d6e5 to 81ce3aa Compare July 12, 2021 00:38
runs on push to a stable-* branch,
takes the first line of the topmost commit message:

    Original PR title (#original PR number) (#backport PR number)

extracts the first parenthesised PR number, as long as there are 2
and adds a backported-${branch number} label to the original PR
@himdel himdel force-pushed the backport-labels branch from 81ce3aa to a052dfb Compare July 12, 2021 00:39
@himdel himdel changed the title [WIP] Add backported-* label on stable-* merges Add backported-* label on stable-* merges Jul 12, 2021
@himdel
Copy link
Collaborator Author

himdel commented Jul 12, 2021

So, this is probably ready...

Running with debugging overrides (to assume branch other than master) in https://github.com/ansible/ansible-hub-ui/runs/3042394137, it succeeded in everything apart from actually adding the label (as in both the LABEL and the PR values make sense given the overrides).

Both gh (CLI) and action-add-labels fail the same way, Resource not accessible by integration.

I'm hoping this is because as a PR, it's still running in the context of my repo, and won't have these problems when triggered by a stable push, but it may still fail, we'll see.

@himdel himdel added backport-4.2 This PR should be backported to stable-4.2 (1.2) backport-4.3 This PR should be backported to stable-4.3 (2.0) labels Jul 12, 2021
Copy link
Member

@newswangerd newswangerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we just have to merge this and see if it works.

@himdel himdel merged commit 2b61a8c into ansible:master Jul 13, 2021
@himdel himdel deleted the backport-labels branch July 13, 2021 15:34
@patchback
Copy link

patchback bot commented Jul 13, 2021

Backport to stable-4.2: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-4.2/2b61a8c00b6f8df6d3fa347f9017ef9cb49ca79a/pr-428

Backported as #633

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Jul 13, 2021
* Add backported-* label on stable-* merges

runs on push to a stable-* branch,
takes the first line of the topmost commit message:

    Original PR title (#original PR number) (#backport PR number)

extracts the first parenthesised PR number, as long as there are 2
and adds a backported-${branch number} label to the original PR

* backported-labels: use actions-ecosystem/action-add-labels@v1

* backported-labels: remove deubgging bits

(cherry picked from commit 2b61a8c)
@patchback
Copy link

patchback bot commented Jul 13, 2021

Backport to stable-4.3: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-4.3/2b61a8c00b6f8df6d3fa347f9017ef9cb49ca79a/pr-428

Backported as #634

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Jul 13, 2021
* Add backported-* label on stable-* merges

runs on push to a stable-* branch,
takes the first line of the topmost commit message:

    Original PR title (#original PR number) (#backport PR number)

extracts the first parenthesised PR number, as long as there are 2
and adds a backported-${branch number} label to the original PR

* backported-labels: use actions-ecosystem/action-add-labels@v1

* backported-labels: remove deubgging bits

(cherry picked from commit 2b61a8c)
himdel added a commit that referenced this pull request Jul 13, 2021
* Add backported-* label on stable-* merges

runs on push to a stable-* branch,
takes the first line of the topmost commit message:

    Original PR title (#original PR number) (#backport PR number)

extracts the first parenthesised PR number, as long as there are 2
and adds a backported-${branch number} label to the original PR

* backported-labels: use actions-ecosystem/action-add-labels@v1

* backported-labels: remove deubgging bits

(cherry picked from commit 2b61a8c)

Co-authored-by: Martin Hradil <[email protected]>
@github-actions github-actions bot added the backported-4.2 This PR has been backported to stable-4.2 (1.2) label Jul 13, 2021
himdel added a commit that referenced this pull request Jul 13, 2021
* Add backported-* label on stable-* merges

runs on push to a stable-* branch,
takes the first line of the topmost commit message:

    Original PR title (#original PR number) (#backport PR number)

extracts the first parenthesised PR number, as long as there are 2
and adds a backported-${branch number} label to the original PR

* backported-labels: use actions-ecosystem/action-add-labels@v1

* backported-labels: remove deubgging bits

(cherry picked from commit 2b61a8c)

Co-authored-by: Martin Hradil <[email protected]>
@github-actions github-actions bot added the backported-4.3 This PR has been backported to stable-4.3 (2.0) label Jul 13, 2021
@himdel
Copy link
Collaborator Author

himdel commented Jul 13, 2021

newswangerd pushed a commit to ansible/galaxy_ng that referenced this pull request Oct 14, 2021
…backported-* label to backported PRs (#1025)

Adding a workflow that updates a backported PR with a backported-* label once merged in a stable-* branch.
It's watching for commit messages ending with `foo (#123) (#456)`, and using the penultimate PR number, the format patchback uses.

Identical to the UI version ( ansible/ansible-hub-ui#428 )

No-Issue
patchback bot pushed a commit to ansible/galaxy_ng that referenced this pull request Oct 14, 2021
…backported-* label to backported PRs (#1025)

Adding a workflow that updates a backported PR with a backported-* label once merged in a stable-* branch.
It's watching for commit messages ending with `foo (#123) (#456)`, and using the penultimate PR number, the format patchback uses.

Identical to the UI version ( ansible/ansible-hub-ui#428 )

No-Issue

(cherry picked from commit 825086d)
patchback bot pushed a commit to ansible/galaxy_ng that referenced this pull request Oct 14, 2021
…backported-* label to backported PRs (#1025)

Adding a workflow that updates a backported PR with a backported-* label once merged in a stable-* branch.
It's watching for commit messages ending with `foo (#123) (#456)`, and using the penultimate PR number, the format patchback uses.

Identical to the UI version ( ansible/ansible-hub-ui#428 )

No-Issue

(cherry picked from commit 825086d)
patchback bot pushed a commit to ansible/galaxy_ng that referenced this pull request Oct 14, 2021
…backported-* label to backported PRs (#1025)

Adding a workflow that updates a backported PR with a backported-* label once merged in a stable-* branch.
It's watching for commit messages ending with `foo (#123) (#456)`, and using the penultimate PR number, the format patchback uses.

Identical to the UI version ( ansible/ansible-hub-ui#428 )

No-Issue

(cherry picked from commit 825086d)
newswangerd pushed a commit to ansible/galaxy_ng that referenced this pull request Oct 14, 2021
…backported-* label to backported PRs (#1025) (#1029)

Adding a workflow that updates a backported PR with a backported-* label once merged in a stable-* branch.
It's watching for commit messages ending with `foo (#123) (#456)`, and using the penultimate PR number, the format patchback uses.

Identical to the UI version ( ansible/ansible-hub-ui#428 )

No-Issue

(cherry picked from commit 825086d)

Co-authored-by: Martin Hradil <[email protected]>
newswangerd pushed a commit to ansible/galaxy_ng that referenced this pull request Oct 19, 2021
…backported-* label to backported PRs (#1025) (#1027)

Adding a workflow that updates a backported PR with a backported-* label once merged in a stable-* branch.
It's watching for commit messages ending with `foo (#123) (#456)`, and using the penultimate PR number, the format patchback uses.

Identical to the UI version ( ansible/ansible-hub-ui#428 )

No-Issue

(cherry picked from commit 825086d)

Co-authored-by: Martin Hradil <[email protected]>
newswangerd pushed a commit to ansible/galaxy_ng that referenced this pull request Oct 19, 2021
…backported-* label to backported PRs (#1025) (#1028)

Adding a workflow that updates a backported PR with a backported-* label once merged in a stable-* branch.
It's watching for commit messages ending with `foo (#123) (#456)`, and using the penultimate PR number, the format patchback uses.

Identical to the UI version ( ansible/ansible-hub-ui#428 )

No-Issue

(cherry picked from commit 825086d)

Co-authored-by: Martin Hradil <[email protected]>
jctanner pushed a commit to jctanner/galaxy_ng that referenced this pull request Dec 1, 2021
…backported-* label to backported PRs (ansible#1025)

Adding a workflow that updates a backported PR with a backported-* label once merged in a stable-* branch.
It's watching for commit messages ending with `foo (ansible#123) (#456)`, and using the penultimate PR number, the format patchback uses.

Identical to the UI version ( ansible/ansible-hub-ui#428 )

No-Issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-4.2 This PR should be backported to stable-4.2 (1.2) backport-4.3 This PR should be backported to stable-4.3 (2.0) backported-4.2 This PR has been backported to stable-4.2 (1.2) backported-4.3 This PR has been backported to stable-4.3 (2.0)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants