Set up CLA process and remove DCO (#129)
Signed-off-by: Ilan Bigio <ilan@openai.com>
This commit is contained in:
29
.github/workflows/cla.yml
vendored
Normal file
29
.github/workflows/cla.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
name: CLA Assistant
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
pull_request_target:
|
||||
types: [opened, closed, synchronize]
|
||||
|
||||
permissions:
|
||||
actions: write
|
||||
contents: write
|
||||
pull-requests: write
|
||||
statuses: write
|
||||
|
||||
jobs:
|
||||
cla:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: contributor-assistant/github-action@v2.6.1
|
||||
if: |
|
||||
github.event_name == 'pull_request_target' ||
|
||||
github.event.comment.body == 'recheck' ||
|
||||
github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
path-to-document: docs/CLA.md
|
||||
path-to-signatures: signatures/cla.json
|
||||
branch: cla-signatures
|
||||
allowlist: dependabot[bot]
|
||||
43
.github/workflows/dco.yml
vendored
43
.github/workflows/dco.yml
vendored
@@ -1,43 +0,0 @@
|
||||
name: dco
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read # minimum needed
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with: { fetch-depth: 0 } # make sure base SHA exists
|
||||
|
||||
- name: Verify Signed‑off‑by lines
|
||||
shell: bash
|
||||
run: |
|
||||
base="${{ github.event.pull_request.base.sha }}"
|
||||
head="${{ github.event.pull_request.head.sha }}"
|
||||
|
||||
unsigned=$(git log --format='%h %s' "$base..$head" | while read sha _; do
|
||||
git show -s --format='%B' "$sha" | grep -qi '^Signed-off-by:' || echo "$sha"
|
||||
done)
|
||||
|
||||
if [ -n "$unsigned" ]; then
|
||||
echo "::error ::❌ DCO check failed."
|
||||
echo ""
|
||||
echo "Commits missing the 'Signed-off-by:' footer:"
|
||||
echo "$unsigned"
|
||||
echo ""
|
||||
echo "🛠 **Quick fix (make ONE signed commit):**"
|
||||
echo " git fetch origin"
|
||||
echo " git reset --soft origin/${GITHUB_BASE_REF}"
|
||||
echo " git commit -s -m \"<your message>\""
|
||||
echo " git push --force-with-lease"
|
||||
echo ""
|
||||
echo "🔧 **Fix individual commits:**"
|
||||
echo " git rebase -i origin/${GITHUB_BASE_REF} --exec \"git commit --amend -s --no-edit\""
|
||||
echo " git push --force-with-lease"
|
||||
echo ""
|
||||
echo "💡 Or edit the commit message in GitHub UI and add:"
|
||||
echo " Signed-off-by: Your Name <email@example.com>"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user