Skip to content

ci: add functionality for programmatic add/remove needs-signed-commits label - #50316

Merged
jkleinsc merged 3 commits into
mainfrom
programmatic-need-signed-commits
Mar 25, 2026
Merged

jkleinsc merged 3 commits into
mainfrom
programmatic-need-signed-commits

Conversation

@mlaurencin

Copy link
Copy Markdown
Member

Description of Change

This PR adds functionality for the needs-signed-commits label to be added automatically.

When a PR is opened or a new commit is pushed to the branch, if the label has not already been added, it will check to see if the commits are signed. A message will be sent once if any unsigned commits are detected (repeated messages will not be sent per the 1password action's functionality).

If a PR has the label, it will be removed once a new commit make ci go green.

Checklist

Release Notes

Notes: none

@mlaurencin
mlaurencin requested a review from a team as a code owner March 17, 2026 15:18
@mlaurencin mlaurencin added target/39-x-y PR should also be added to the "39-x-y" branch. target/40-x-y PR should also be added to the "40-x-y" branch. target/41-x-y PR should also be added to the "41-x-y" branch. target/42-x-y PR should also be added to the "42-x-y" branch. labels Mar 17, 2026

@jkleinsc jkleinsc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think we need to run this in two separate workflows. The build workflow already runs when the PR is updated. We should run it early in build.yml (as a prereq to setup) and fail the build if the commits aren't signed so that we avoid CI churn on commits that are unsigned.

@mlaurencin

Copy link
Copy Markdown
Member Author

I don't think we need to run this in two separate workflows. The build workflow already runs when the PR is updated. We should run it early in build.yml (as a prereq to setup) and fail the build if the commits aren't signed so that we avoid CI churn on commits that are unsigned.

The problem is that the 1password action needs pull_request_target in order to have write permissions for forks. The removal job can exist within build.yml because it never needs to write, but the addition job does. And unfortunately, pull_request cannot just be changed to pull_request_target in build.yml because that could pose a security risk for the checkout steps.

@jkleinsc
jkleinsc merged commit 2e2c56a into main Mar 25, 2026
114 of 115 checks passed
@release-clerk

release-clerk Bot commented Mar 25, 2026

Copy link
Copy Markdown

No Release Notes

@jkleinsc
jkleinsc deleted the programmatic-need-signed-commits branch March 25, 2026 19:38
@trop

trop Bot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

I was unable to backport this PR to "41-x-y" cleanly;
you will need to perform this backport manually.

@trop

trop Bot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

I was unable to backport this PR to "40-x-y" cleanly;
you will need to perform this backport manually.

@trop trop Bot removed the target/41-x-y PR should also be added to the "41-x-y" branch. label Mar 25, 2026
@trop

trop Bot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

I was unable to backport this PR to "39-x-y" cleanly;
you will need to perform this backport manually.

@trop trop Bot added needs-manual-bp/41-x-y needs-manual-bp/40-x-y needs-manual-bp/39-x-y and removed target/40-x-y PR should also be added to the "40-x-y" branch. target/39-x-y PR should also be added to the "39-x-y" branch. labels Mar 25, 2026
@trop

trop Bot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "42-x-y", please check out #50503

@trop trop Bot added in-flight/42-x-y merged/42-x-y PR was merged to the "42-x-y" branch. and removed target/42-x-y PR should also be added to the "42-x-y" branch. in-flight/42-x-y labels Mar 25, 2026
mlaurencin added a commit that referenced this pull request Mar 30, 2026
…s label (#50316)

* remove comment based label removal

* ci: add functionality for programmatic add/remove needs-signed-commits label

* add new line to pull-request-opened-synchronized
@trop

trop Bot commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

@mlaurencin has manually backported this PR to "39-x-y", please check out #50585

mlaurencin added a commit that referenced this pull request Mar 30, 2026
…s label (#50316)

* remove comment based label removal

* ci: add functionality for programmatic add/remove needs-signed-commits label

* add new line to pull-request-opened-synchronized
@trop

trop Bot commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

@mlaurencin has manually backported this PR to "40-x-y", please check out #50586

mlaurencin added a commit that referenced this pull request Mar 30, 2026
…s label (#50316)

* remove comment based label removal

* ci: add functionality for programmatic add/remove needs-signed-commits label

* add new line to pull-request-opened-synchronized
mlaurencin added a commit that referenced this pull request Mar 30, 2026
…s label (#50316)

* remove comment based label removal

* ci: add functionality for programmatic add/remove needs-signed-commits label

* add new line to pull-request-opened-synchronized
@trop

trop Bot commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

@mlaurencin has manually backported this PR to "41-x-y", please check out #50587

codebytere pushed a commit that referenced this pull request Mar 31, 2026
…s label (#50316) (#50585)

* remove comment based label removal

* ci: add functionality for programmatic add/remove needs-signed-commits label

* add new line to pull-request-opened-synchronized
@trop trop Bot added merged/39-x-y PR was merged to the "39-x-y" branch. and removed in-flight/39-x-y labels Mar 31, 2026
codebytere pushed a commit that referenced this pull request Mar 31, 2026
…s label (#50316) (#50586)

* remove comment based label removal

* ci: add functionality for programmatic add/remove needs-signed-commits label

* add new line to pull-request-opened-synchronized
@trop trop Bot added merged/40-x-y PR was merged to the "40-x-y" branch. and removed in-flight/40-x-y labels Mar 31, 2026
codebytere pushed a commit that referenced this pull request Mar 31, 2026
…s label (#50316) (#50587)

* remove comment based label removal

* ci: add functionality for programmatic add/remove needs-signed-commits label

* add new line to pull-request-opened-synchronized
@trop trop Bot added merged/41-x-y PR was merged to the "41-x-y" branch. and removed in-flight/41-x-y labels Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged/39-x-y PR was merged to the "39-x-y" branch. merged/40-x-y PR was merged to the "40-x-y" branch. merged/41-x-y PR was merged to the "41-x-y" branch. merged/42-x-y PR was merged to the "42-x-y" branch. semver/none

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants