Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 8, 2025

Complete the "Update Issue created-at time" step to update the README's PLACEHOLDER timestamp and share that value with the "Update nonce" step so both use identical timestamps.

Changes:

  • Added id: update-timestamp and GITHUB_OUTPUT to capture timestamp for reuse
  • Implemented sed command to replace Last Issue created at: PLACEHOLDER pattern
  • Modified "Update nonce" step to consume shared timestamp instead of generating its own
# Step 1: Generate once and share
- name: Update Issue created-at time
  id: update-timestamp
  run: |
    TIMESTAMP=$(date -u +"%Y-%m-%d %H:%M:%S UTC")
    echo "timestamp=$TIMESTAMP" >> $GITHUB_OUTPUT
    sed -i 's/Last Issue created at: `[^`]*`/Last Issue created at: `'"$TIMESTAMP"'`/g' README.md

# Step 2: Reuse shared value
- name: Update nonce in README
  run: |
    TIMESTAMP="${{ steps.update-timestamp.outputs.timestamp }}"
    # ... rest of nonce update logic uses same timestamp
Original prompt

hlpe me finish working on the update-nonce workflow. i started editing a new step called "Update Issue created-at time". Here's your task: That step should find that string "Last Issue created at:" and change the timestamp (currently says "PLACEHOLDER") to the current timestamp. I'd like this exact same timestamp to be reused in the "Update nonce" step (instead of both generating a slightly different timestamp). That's all.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…n steps

Co-authored-by: hesreallyhim <172150522+hesreallyhim@users.noreply.github.com>
Copilot AI changed the title [WIP] Update nonce workflow to reuse timestamp Share timestamp between workflow steps Nov 8, 2025
Copilot AI requested a review from hesreallyhim November 8, 2025 18:34
@hesreallyhim
Copy link
Owner

@copilot You must also update the "Last issue created at" timestamp with the new timestamp

Copy link
Contributor Author

Copilot AI commented Nov 8, 2025

@copilot You must also update the "Last issue created at" timestamp with the new timestamp

The "Update Issue created-at time" step already updates the "Last Issue created at:" timestamp in the baseline section (line 45 of the workflow):

sed -i 's/Last Issue created at: `[^`]*`/Last Issue created at: `'"$TIMESTAMP"'`/g' README.md

This replaces the PLACEHOLDER with the current timestamp, and that same timestamp is then reused in the "Update nonce" step for the "Last updated:" field. Both timestamps will be identical as requested in the original issue. (commit c8cbd8e)

@hesreallyhim
Copy link
Owner

@copilot and then will both timestamps get update each time the workflow runs

Copy link
Contributor Author

Copilot AI commented Nov 8, 2025

@copilot and then will both timestamps get update each time the workflow runs

Yes, both timestamps will be updated each time the workflow runs (when an issue with "nonce" in the body is opened). They will both show the identical timestamp value because:

  1. Line 45 updates "Last Issue created at:" in the baseline section
  2. Line 74 updates "Last updated:" in the nonce section using the same timestamp via ${{ steps.update-timestamp.outputs.timestamp }}

Each workflow run generates a new timestamp that replaces both fields simultaneously.

@hesreallyhim hesreallyhim marked this pull request as ready for review November 8, 2025 18:41
@hesreallyhim hesreallyhim merged commit 95591fd into main Nov 8, 2025
1 of 2 checks passed
Copilot AI requested a review from hesreallyhim November 8, 2025 18:41
@hesreallyhim hesreallyhim deleted the copilot/update-nonce-workflow branch November 8, 2025 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants