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 tld-update.yml to automatically add labels when autopull catches deltas and generates PR #1815

Merged
merged 3 commits into from
Aug 4, 2023

Conversation

dnsguru
Copy link
Member

@dnsguru dnsguru commented Aug 1, 2023

This is non-urgent.

When the autopull runs, this auto-adds labels to indicate this is automation and impacts the upper 'ICANN' section

Did not see a way to also automate the project as well in the automation handler, but this will save volunteers steps in labelling when reviewing.

Auto-adds labels to indicate this is automation and impacts the upper 'ICANN' section
@dnsguru dnsguru added r=weppos Marked as approved and ready to merge by @weppos non .dat Change or Coding Review Alteration to code/automation or publicsuffix.org site labels Aug 1, 2023
@dnsguru dnsguru self-assigned this Aug 1, 2023
@cpu
Copy link
Contributor

cpu commented Aug 1, 2023

Did not see a way to also automate the project as well in the automation handler, but this will save volunteers steps in labelling when reviewing.

I think you can chain the output of the create pull request task with a separate action for assigning it to a project:
https://github.com/peter-evans/create-pull-request#create-a-project-card

@dnsguru
Copy link
Member Author

dnsguru commented Aug 3, 2023

name: Create or Update Project Card for new item
        if: ${{ steps.cpr.outputs.pull-request-number }}
        uses: peter-evans/create-or-update-project-card@v2
        with:
          project-number: 2
          column-number: 8657926
          issue-number: ${{ steps.cpr.outputs.pull-request-number }}

does that look right? I confirmed that

  • "List Add/Mod/Del" = project-number 2 and
  • "To-Do" is column-number 8657926

Added the project/card assignment ( hat tip: @cpu )
@dnsguru
Copy link
Member Author

dnsguru commented Aug 3, 2023

@cpu can you give it a 'sanity peek'?

@weppos
Copy link
Member

weppos commented Aug 3, 2023

does that look right? I confirmed that

  • "List Add/Mod/Del" = project-number 2 and
  • "To-Do" is column-number 8657926

Yes, this sounds correct.

@@ -39,7 +39,18 @@ jobs:
committer: "GitHub <noreply@github.com>"
author: "GitHub <noreply@github.com>"
branch: psl-gtld-update
labels: |
Copy link
Member

Choose a reason for hiding this comment

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

Just as an FYI, in the past I had bad experience with labels with icons. And by "bad" I mean the unicode char did cause random failures in integrations.

I've personally moved away from using any icon/emoji at all in labels.

uses: peter-evans/create-or-update-project-card@v2
with:
project-number: 2
column-number: 8657926
Copy link
Contributor

@cpu cpu Aug 3, 2023

Choose a reason for hiding this comment

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

Should this be a string-typed column-name input instead, with value "To-Do"? I don't see column-number listed in the documented action inputs.

Copy link
Member Author

Choose a reason for hiding this comment

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

You're right.

Should be

column-name: To-Do

Fixed the Card _stuff_ to 
```
column-name: To-Do
```
@dnsguru
Copy link
Member Author

dnsguru commented Aug 3, 2023

Updated with

column-name: To-Do

Should be good to go @cpu @weppos

Copy link
Contributor

@cpu cpu left a comment

Choose a reason for hiding this comment

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

LGTM

@weppos weppos self-requested a review August 4, 2023 08:55
@dnsguru
Copy link
Member Author

dnsguru commented Aug 4, 2023

OK - Gonna merge this, and then @cpu's updated automation that adds the IANA DB link to see if the automation pull behaves as expected

@dnsguru dnsguru merged commit 250b1ed into master Aug 4, 2023
1 check passed
@dnsguru dnsguru deleted the dnsguru-patch-label-autolabel_autopulls branch August 4, 2023 15:33
@weppos
Copy link
Member

weppos commented Aug 7, 2023

Screenshot 2023-08-07 at 11 10 35

@dnsguru the action failed to run. The reason is because that repo has projects disabled. Even if we turn that on, I'm afraid this won't work (we can still test).

I just noticed now we use an org-level project, and I'm afraid that will require a bit of changes. The token generated by GH during an action run is a transient repo-level token. It doesn't have the permission to touch something outside the repo. If we want to continue with an org-level project we need to generate an individual token and add it to the action secrets.

I turned projects on at the repo level to see if by chance we get lucky and it works. But I don't have too much confidence it will.

@dnsguru
Copy link
Member Author

dnsguru commented Aug 7, 2023

Yeah, I think we just need to settle for labels.

@dnsguru
Copy link
Member Author

dnsguru commented Aug 22, 2023

There used to be a lovely konban-esque chart for org level projects that vanished.

@weppos
Copy link
Member

weppos commented Aug 23, 2023

There used to be a lovely konban-esque chart for org level projects that vanished.

It's still there, but legacy (called classic) projects are receiving less attention. There's a new type of projects which is the current focus and has different views, including Kanban boards.

@dnsguru
Copy link
Member Author

dnsguru commented Aug 23, 2023 via email

@weppos
Copy link
Member

weppos commented Aug 23, 2023

@dnsguru
Copy link
Member Author

dnsguru commented Aug 23, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
non .dat Change or Coding Review Alteration to code/automation or publicsuffix.org site r=weppos Marked as approved and ready to merge by @weppos
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants