]> git.kaiwu.me - nginx.git/commitdiff
GH: remove the set-creation-date.yaml workflow
authorAndrew Clayton <a.clayton@nginx.com>
Fri, 5 Jun 2026 16:07:11 +0000 (17:07 +0100)
committerAndrew Clayton <a.clayton@nginx.com>
Mon, 8 Jun 2026 14:49:02 +0000 (15:49 +0100)
Now that GitHub has introduced various date fields, including 'Created',
in projects, we no longer require this workflow.

.github/workflows/set-creation-date.yaml [deleted file]

diff --git a/.github/workflows/set-creation-date.yaml b/.github/workflows/set-creation-date.yaml
deleted file mode 100644 (file)
index db6574e..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-name: Set creation date
-
-on:
-  issues:
-    types:
-      - opened
-
-jobs:
-  set-date:
-    permissions:
-      id-token: write
-    if: ${{ github.repository == 'nginx/nginx' }}
-    runs-on: ubuntu-24.04
-
-    steps:
-      - name: Get secrets from Azure
-        uses: nginx/ci-self-hosted/.github/actions/get-from-vault@5c3e1f8b51f66a851fdba80f70e19cf966199730
-        with:
-          client-id: ${{ secrets.NGINX_OSS_CLIENT_ID }}
-          tenant-id: ${{ secrets.NGINX_OSS_TENANT_ID }}
-          vault-name: ${{ secrets.NGINX_OSS_VAULT_NAME }}
-          secret-names: "github-nginx-oss-app-project-client-id, github-nginx-oss-app-project-private-key"
-          env-names: "NGINX_OSS_PROJ_CLIENT_ID, NGINX_OSS_PROJ_PRIV_KEY"
-
-      - name: Generate token
-        id: generate-token
-        uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
-        with:
-          client-id: ${{ env.NGINX_OSS_PROJ_CLIENT_ID }}
-          private-key: ${{ env.NGINX_OSS_PROJ_PRIV_KEY }}
-
-      - name: Get project data
-        env:
-          GH_TOKEN: ${{ steps.generate-token.outputs.token }}
-          ORGANIZATION: nginx
-          PROJECT_NUMBER: 33
-        run: |
-          gh api graphql -f query='
-            query($org: String!, $number: Int!) {
-              organization(login: $org) {
-                projectV2(number: $number) {
-                  id
-                  fields(first:20) {
-                    nodes {
-                      ... on ProjectV2FieldCommon {
-                        id
-                        name
-                      }
-                    }
-                  }
-                }
-              }
-            }' -f org=$ORGANIZATION -F number=$PROJECT_NUMBER >project_data.json
-
-          echo 'PROJECT_ID='$(jq -r '.data.organization.projectV2.id' project_data.json) >>$GITHUB_ENV
-          echo 'DATE_FIELD_ID='$(jq -r '.data.organization.projectV2.fields.nodes[] | select(.name == "Created At") | .id' project_data.json) >>$GITHUB_ENV
-
-      # Needed to get the item's Global ID
-      - name: Add item to project
-        env:
-          GH_TOKEN: ${{ steps.generate-token.outputs.token }}
-        run: |
-          NODE_ID=${{ github.event.issue.node_id }}
-
-          item_id="$(gh api graphql -f query='
-            mutation($project:ID!, $item:ID!) {
-              addProjectV2ItemById(
-                input: {
-                  projectId: $project, contentId: $item
-                }) {
-                  item {
-                    id
-                  }
-                }
-              }' -f project=$PROJECT_ID -f item=$NODE_ID --jq '.data.addProjectV2ItemById.item.id')"
-          echo 'ITEM_ID='$item_id >>$GITHUB_ENV
-
-      - name: Set item creation date
-        env:
-          GH_TOKEN: ${{ steps.generate-token.outputs.token }}
-        run: |
-          DATE=${{ github.event.issue.created_at }}
-
-          gh api graphql -f query='
-            mutation(
-              $project: ID!
-              $item: ID!
-              $date_field: ID!
-              $date: Date!
-            ) {
-              updateProjectV2ItemFieldValue(
-                input: {
-                  projectId: $project
-                  itemId: $item
-                  fieldId: $date_field
-                  value: {
-                    date: $date
-                  }
-                }) {
-                  projectV2Item {
-                    id
-                  }
-                }
-            }' -f project=$PROJECT_ID -f item=$ITEM_ID -f date_field=$DATE_FIELD_ID -f date=$DATE