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

Update code freeze bot to check target PR branch correctly for issue_comment #3770

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
e039626
Update code freeze bot to check target PR branch correctly for issue_…
andrew-m-leonard Apr 24, 2024
3a77294
Update code freeze bot to check target PR branch correctly for issue_…
andrew-m-leonard Apr 24, 2024
95d681c
Update code freeze bot to check target PR branch correctly for issue_…
andrew-m-leonard Apr 25, 2024
347e784
Update code freeze bot to check target PR branch correctly for issue_…
andrew-m-leonard Apr 25, 2024
85156ac
Update code freeze bot to check target PR branch correctly for issue_…
andrew-m-leonard Apr 25, 2024
28fdec5
Update code freeze bot to check target PR branch correctly for issue_…
andrew-m-leonard Apr 25, 2024
eb55a96
Update code freeze bot to check target PR branch correctly for issue_…
andrew-m-leonard Apr 25, 2024
4c79f80
Update code freeze bot to check target PR branch correctly for issue_…
andrew-m-leonard Apr 25, 2024
3208c26
Update code freeze bot to check target PR branch correctly for issue_…
andrew-m-leonard Apr 25, 2024
e1eb96e
Update code freeze bot to check target PR branch correctly for issue_…
andrew-m-leonard Apr 26, 2024
95a5dd8
Update code freeze bot to check target PR branch correctly for issue_…
andrew-m-leonard Apr 26, 2024
82b4dc4
Update code freeze bot to check target PR branch correctly for issue_…
andrew-m-leonard Apr 26, 2024
c713fcb
Update code freeze bot to check target PR branch correctly for issue_…
andrew-m-leonard Apr 26, 2024
b92da03
Update code freeze bot to check target PR branch correctly for issue_…
andrew-m-leonard Apr 26, 2024
e3b6e70
Update code freeze bot to check target PR branch correctly for issue_…
andrew-m-leonard Apr 26, 2024
6399253
Update code freeze bot to check target PR branch correctly for issue_…
andrew-m-leonard Apr 26, 2024
7fd22ff
Merge branch 'master' of github.com:adoptium/temurin-build into gaction
andrew-m-leonard Apr 26, 2024
ade2a4e
Update code freeze bot to check target PR branch correctly for issue_…
andrew-m-leonard Apr 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/code-freeze-new.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# ********************************************************************************
# Copyright (c) 2023 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made
# available under the terms of the Apache Software License 2.0
# which is available at https://www.apache.org/licenses/LICENSE-2.0.
#
# SPDX-License-Identifier: Apache-2.0
# ********************************************************************************

name: Code Freeze New Bot

# Controls when the workflow will run
on:
pull_request_target:
branches:
- '*'
issue_comment:
types: [created]

permissions:
contents: write
pull-requests: write

jobs:
codefreeze_new:
steps:
- name: Get pull request target branch
id: get-pr-target-branch
if: github.event_name == 'pull_request_target' || (github.event_name == 'issue_comment' && github.event.issue.pull_request)
run: echo "pr_target_branch=$(gh pr view $PR_NUMBER --repo $REPOSITORY --json baseRefName --jq '.baseRefName')" >> $GITHUB_OUTPUT
env:
REPOSITORY: ${{ github.repository }}
PR_NUMBER: ${{ github.event.issue.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Filter target branch to code freeze branches
id: filter-branch
if: github.event_name == 'pull_request_target' || (github.event_name == 'issue_comment' && github.event.issue.pull_request)
run: echo "filtered_code_freeze_branch=$(echo $PR_TARGET_BRANCH | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$')" >> $GITHUB_OUTPUT
env:
PR_TARGET_BRANCH: $${{ steps.get-pr-target-branch.outputs.pr_target_branch }}

- name: Code Freeze New
if: (github.event_name == 'pull_request_target' || (github.event_name == 'issue_comment' && github.event.issue.pull_request)) && steps.filter-branch.outputs.filtered_code_freeze_branch == steps.get-pr-target-branch.outputs.pr_target_branch
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
with:
issue-number: ${{ github.event.issue.number }}
body: echo "CODE_FREEZE ${{ github.event.issue.number }}"

#uses: adoptium/.github/.github/workflows/code-freeze.yml@main
#secrets: inherit
2 changes: 1 addition & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Create release branch in the format `vYYYY.MM.NN` on each of the following repos
- ci-jenkins-pipelines <https://github.com/adoptium/ci-jenkins-pipelines>
- jenkins-helper <https://github.com/adoptium/jenkins-helper>

These branches should be named according to the following format (vYYYY.MM+NN) ,e.g v2023.03+01 , whereby the final element is an incremental counter appended to the year and month of the release.
These branches should be named according to the following format (vYYYY.MM.NN) ,e.g v2023.03.01 , whereby the final element is an incremental counter appended to the year and month of the release.

If anything needs to be merged into the new branch, it should typically be merged into master, then a `git cherry-pick` operation should be done to create a new PR against the release branch. This can typically be merged without further approval.

Expand Down